armmediaservices

package module
v3.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2023 License: MIT Imports: 15 Imported by: 7

README

Azure Media Services Module for Go

PkgGoDev

The armmediaservices module provides operations for working with Azure Media Services.

Source code

Getting started

Prerequisites

  • an Azure subscription
  • Go 1.18 or above (You could download and install the latest version of Go from here. It will replace the existing Go on your machine. If you want to install multiple Go versions on the same machine, you could refer this doc.)

Install the package

This project uses Go modules for versioning and dependency management.

Install the Azure Media Services module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices/v3

Authorization

When creating a client, you will need to provide a credential for authenticating with Azure Media Services. The azidentity module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more.

cred, err := azidentity.NewDefaultAzureCredential(nil)

For more information on authentication, please see the documentation for azidentity at pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity.

Client Factory

Azure Media Services module consists of one or more clients. We provide a client factory which could be used to create any client in this module.

clientFactory, err := armmediaservices.NewClientFactory(<subscription ID>, cred, nil)

You can use ClientOptions in package github.com/Azure/azure-sdk-for-go/sdk/azcore/arm to set endpoint to connect with public and sovereign clouds as well as Azure Stack. For more information, please see the documentation for azcore at pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore.

options := arm.ClientOptions {
    ClientOptions: azcore.ClientOptions {
        Cloud: cloud.AzureChina,
    },
}
clientFactory, err := armmediaservices.NewClientFactory(<subscription ID>, cred, &options)

Clients

A client groups a set of related APIs, providing access to its functionality. Create one or more clients to access the APIs you require using client factory.

client := clientFactory.NewClient()

Fakes

The fake package contains types used for constructing in-memory fake servers used in unit tests. This allows writing tests to cover various success/error conditions without the need for connecting to a live service.

Please see https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/samples/fakes for details and examples on how to use fakes.

Major Version Upgrade

Go uses semantic import versioning to ensure a good backward compatibility for modules. For Azure Go management SDK, we usually upgrade module version according to cooresponding service's API version. Regarding it could be a complicated experience for major version upgrade, we will try our best to keep the SDK API stable and release new version in backward compatible way. However, if any unavoidable breaking changes and a new major version releases for SDK modules, you could use these commands under your module folder to upgrade:

go install github.com/icholy/gomajor@latest
gomajor get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute@latest

Provide Feedback

If you encounter bugs or have suggestions, please open an issue and assign the Media Services label.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AacAudio

type AacAudio struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string

	// The bitrate, in bits per second, of the output encoded audio.
	Bitrate *int32

	// The number of channels in the audio.
	Channels *int32

	// An optional label for the codec. The label can be used to control muxing behavior.
	Label *string

	// The encoding profile to be used when encoding audio with AAC.
	Profile *AacAudioProfile

	// The sampling rate to use for encoding in hertz.
	SamplingRate *int32
}

AacAudio - Describes Advanced Audio Codec (AAC) audio encoding settings.

func (*AacAudio) GetAudio

func (a *AacAudio) GetAudio() *Audio

GetAudio implements the AudioClassification interface for type AacAudio.

func (*AacAudio) GetCodec

func (a *AacAudio) GetCodec() *Codec

GetCodec implements the CodecClassification interface for type AacAudio.

func (AacAudio) MarshalJSON

func (a AacAudio) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AacAudio.

func (*AacAudio) UnmarshalJSON

func (a *AacAudio) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AacAudio.

type AacAudioProfile

type AacAudioProfile string

AacAudioProfile - The encoding profile to be used when encoding audio with AAC.

const (
	// AacAudioProfileAacLc - Specifies that the output audio is to be encoded into AAC Low Complexity profile (AAC-LC).
	AacAudioProfileAacLc AacAudioProfile = "AacLc"
	// AacAudioProfileHeAacV1 - Specifies that the output audio is to be encoded into HE-AAC v1 profile.
	AacAudioProfileHeAacV1 AacAudioProfile = "HeAacV1"
	// AacAudioProfileHeAacV2 - Specifies that the output audio is to be encoded into HE-AAC v2 profile.
	AacAudioProfileHeAacV2 AacAudioProfile = "HeAacV2"
)

func PossibleAacAudioProfileValues

func PossibleAacAudioProfileValues() []AacAudioProfile

PossibleAacAudioProfileValues returns the possible values for the AacAudioProfile const type.

type AbsoluteClipTime

type AbsoluteClipTime struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string

	// REQUIRED; The time position on the timeline of the input media. It is usually specified as an ISO8601 period. e.g PT30S
	// for 30 seconds.
	Time *string
}

AbsoluteClipTime - Specifies the clip time as an absolute time position in the media file. The absolute time can point to a different position depending on whether the media file starts from a timestamp of zero or not.

func (*AbsoluteClipTime) GetClipTime

func (a *AbsoluteClipTime) GetClipTime() *ClipTime

GetClipTime implements the ClipTimeClassification interface for type AbsoluteClipTime.

func (AbsoluteClipTime) MarshalJSON

func (a AbsoluteClipTime) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AbsoluteClipTime.

func (*AbsoluteClipTime) UnmarshalJSON

func (a *AbsoluteClipTime) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AbsoluteClipTime.

type AccessControl

type AccessControl struct {
	// The behavior for IP access control in Key Delivery.
	DefaultAction *DefaultAction

	// The IP allow list for access control in Key Delivery. If the default action is set to 'Allow', the IP allow list must be
	// empty.
	IPAllowList []*string
}

func (AccessControl) MarshalJSON

func (a AccessControl) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AccessControl.

func (*AccessControl) UnmarshalJSON

func (a *AccessControl) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AccessControl.

type AccountEncryption

type AccountEncryption struct {
	// REQUIRED; The type of key used to encrypt the Account Key.
	Type *AccountEncryptionKeyType

	// The Key Vault identity.
	Identity *ResourceIdentity

	// The properties of the key used to encrypt the account.
	KeyVaultProperties *KeyVaultProperties

	// READ-ONLY; The current status of the Key Vault mapping.
	Status *string
}

func (AccountEncryption) MarshalJSON

func (a AccountEncryption) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AccountEncryption.

func (*AccountEncryption) UnmarshalJSON

func (a *AccountEncryption) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AccountEncryption.

type AccountEncryptionKeyType

type AccountEncryptionKeyType string

AccountEncryptionKeyType - The type of key used to encrypt the Account Key.

const (
	// AccountEncryptionKeyTypeCustomerKey - The Account Key is encrypted with a Customer Key.
	AccountEncryptionKeyTypeCustomerKey AccountEncryptionKeyType = "CustomerKey"
	// AccountEncryptionKeyTypeSystemKey - The Account Key is encrypted with a System Key.
	AccountEncryptionKeyTypeSystemKey AccountEncryptionKeyType = "SystemKey"
)

func PossibleAccountEncryptionKeyTypeValues

func PossibleAccountEncryptionKeyTypeValues() []AccountEncryptionKeyType

PossibleAccountEncryptionKeyTypeValues returns the possible values for the AccountEncryptionKeyType const type.

type AccountFilter

type AccountFilter struct {
	// The Media Filter properties.
	Properties *MediaFilterProperties

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; The system metadata relating to this resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

AccountFilter - An Account Filter.

func (AccountFilter) MarshalJSON

func (a AccountFilter) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AccountFilter.

func (*AccountFilter) UnmarshalJSON

func (a *AccountFilter) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AccountFilter.

type AccountFilterCollection

type AccountFilterCollection struct {
	// A link to the next page of the collection (when the collection contains too many results to return in one response).
	ODataNextLink *string

	// A collection of AccountFilter items.
	Value []*AccountFilter
}

AccountFilterCollection - A collection of AccountFilter items.

func (AccountFilterCollection) MarshalJSON

func (a AccountFilterCollection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AccountFilterCollection.

func (*AccountFilterCollection) UnmarshalJSON

func (a *AccountFilterCollection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AccountFilterCollection.

type AccountFiltersClient

type AccountFiltersClient struct {
	// contains filtered or unexported fields
}

AccountFiltersClient contains the methods for the AccountFilters group. Don't use this type directly, use NewAccountFiltersClient() instead.

func NewAccountFiltersClient

func NewAccountFiltersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AccountFiltersClient, error)

NewAccountFiltersClient creates a new instance of AccountFiltersClient with the specified values.

  • subscriptionID - The unique identifier for a Microsoft Azure subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*AccountFiltersClient) CreateOrUpdate

func (client *AccountFiltersClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, filterName string, parameters AccountFilter, options *AccountFiltersClientCreateOrUpdateOptions) (AccountFiltersClientCreateOrUpdateResponse, error)

CreateOrUpdate - Creates or updates an Account Filter in the Media Services account. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • filterName - The Account Filter name
  • parameters - The request parameters
  • options - AccountFiltersClientCreateOrUpdateOptions contains the optional parameters for the AccountFiltersClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/accountFilters-create.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAccountFiltersClient().CreateOrUpdate(ctx, "contoso", "contosomedia", "newAccountFilter", armmediaservices.AccountFilter{
	Properties: &armmediaservices.MediaFilterProperties{
		FirstQuality: &armmediaservices.FirstQuality{
			Bitrate: to.Ptr[int32](128000),
		},
		PresentationTimeRange: &armmediaservices.PresentationTimeRange{
			EndTimestamp:               to.Ptr[int64](170000000),
			ForceEndTimestamp:          to.Ptr(false),
			LiveBackoffDuration:        to.Ptr[int64](0),
			PresentationWindowDuration: to.Ptr[int64](9223372036854775000),
			StartTimestamp:             to.Ptr[int64](0),
			Timescale:                  to.Ptr[int64](10000000),
		},
		Tracks: []*armmediaservices.FilterTrackSelection{
			{
				TrackSelections: []*armmediaservices.FilterTrackPropertyCondition{
					{
						Operation: to.Ptr(armmediaservices.FilterTrackPropertyCompareOperationEqual),
						Property:  to.Ptr(armmediaservices.FilterTrackPropertyTypeType),
						Value:     to.Ptr("Audio"),
					},
					{
						Operation: to.Ptr(armmediaservices.FilterTrackPropertyCompareOperationNotEqual),
						Property:  to.Ptr(armmediaservices.FilterTrackPropertyTypeLanguage),
						Value:     to.Ptr("en"),
					},
					{
						Operation: to.Ptr(armmediaservices.FilterTrackPropertyCompareOperationNotEqual),
						Property:  to.Ptr(armmediaservices.FilterTrackPropertyTypeFourCC),
						Value:     to.Ptr("EC-3"),
					}},
			},
			{
				TrackSelections: []*armmediaservices.FilterTrackPropertyCondition{
					{
						Operation: to.Ptr(armmediaservices.FilterTrackPropertyCompareOperationEqual),
						Property:  to.Ptr(armmediaservices.FilterTrackPropertyTypeType),
						Value:     to.Ptr("Video"),
					},
					{
						Operation: to.Ptr(armmediaservices.FilterTrackPropertyCompareOperationEqual),
						Property:  to.Ptr(armmediaservices.FilterTrackPropertyTypeBitrate),
						Value:     to.Ptr("3000000-5000000"),
					}},
			}},
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.AccountFilter = armmediaservices.AccountFilter{
// 	Name: to.Ptr("newAccountFilter"),
// 	Type: to.Ptr("Microsoft.Media/mediaservices/accountFilters"),
// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/accountFilters/newAccountFilter"),
// 	Properties: &armmediaservices.MediaFilterProperties{
// 		FirstQuality: &armmediaservices.FirstQuality{
// 			Bitrate: to.Ptr[int32](128000),
// 		},
// 		PresentationTimeRange: &armmediaservices.PresentationTimeRange{
// 			EndTimestamp: to.Ptr[int64](170000000),
// 			ForceEndTimestamp: to.Ptr(false),
// 			LiveBackoffDuration: to.Ptr[int64](0),
// 			PresentationWindowDuration: to.Ptr[int64](9223372036854775000),
// 			StartTimestamp: to.Ptr[int64](0),
// 			Timescale: to.Ptr[int64](10000000),
// 		},
// 		Tracks: []*armmediaservices.FilterTrackSelection{
// 			{
// 				TrackSelections: []*armmediaservices.FilterTrackPropertyCondition{
// 					{
// 						Operation: to.Ptr(armmediaservices.FilterTrackPropertyCompareOperationEqual),
// 						Property: to.Ptr(armmediaservices.FilterTrackPropertyTypeType),
// 						Value: to.Ptr("Audio"),
// 					},
// 					{
// 						Operation: to.Ptr(armmediaservices.FilterTrackPropertyCompareOperationNotEqual),
// 						Property: to.Ptr(armmediaservices.FilterTrackPropertyTypeLanguage),
// 						Value: to.Ptr("en"),
// 					},
// 					{
// 						Operation: to.Ptr(armmediaservices.FilterTrackPropertyCompareOperationNotEqual),
// 						Property: to.Ptr(armmediaservices.FilterTrackPropertyTypeFourCC),
// 						Value: to.Ptr("EC-3"),
// 				}},
// 			},
// 			{
// 				TrackSelections: []*armmediaservices.FilterTrackPropertyCondition{
// 					{
// 						Operation: to.Ptr(armmediaservices.FilterTrackPropertyCompareOperationEqual),
// 						Property: to.Ptr(armmediaservices.FilterTrackPropertyTypeType),
// 						Value: to.Ptr("Video"),
// 					},
// 					{
// 						Operation: to.Ptr(armmediaservices.FilterTrackPropertyCompareOperationEqual),
// 						Property: to.Ptr(armmediaservices.FilterTrackPropertyTypeBitrate),
// 						Value: to.Ptr("3000000-5000000"),
// 				}},
// 		}},
// 	},
// }
Output:

func (*AccountFiltersClient) Delete

func (client *AccountFiltersClient) Delete(ctx context.Context, resourceGroupName string, accountName string, filterName string, options *AccountFiltersClientDeleteOptions) (AccountFiltersClientDeleteResponse, error)

Delete - Deletes an Account Filter in the Media Services account. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • filterName - The Account Filter name
  • options - AccountFiltersClientDeleteOptions contains the optional parameters for the AccountFiltersClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/accountFilters-delete.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewAccountFiltersClient().Delete(ctx, "contoso", "contosomedia", "accountFilterWithTimeWindowAndTrack", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*AccountFiltersClient) Get

func (client *AccountFiltersClient) Get(ctx context.Context, resourceGroupName string, accountName string, filterName string, options *AccountFiltersClientGetOptions) (AccountFiltersClientGetResponse, error)

Get - Get the details of an Account Filter in the Media Services account. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • filterName - The Account Filter name
  • options - AccountFiltersClientGetOptions contains the optional parameters for the AccountFiltersClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/accountFilters-get-by-name.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAccountFiltersClient().Get(ctx, "contoso", "contosomedia", "accountFilterWithTrack", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.AccountFilter = armmediaservices.AccountFilter{
// 	Name: to.Ptr("accountFilterWithTrack"),
// 	Type: to.Ptr("Microsoft.Media/mediaservices/accountFilters"),
// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/accountFilters/accountFilterWithTrack"),
// 	Properties: &armmediaservices.MediaFilterProperties{
// 		Tracks: []*armmediaservices.FilterTrackSelection{
// 			{
// 				TrackSelections: []*armmediaservices.FilterTrackPropertyCondition{
// 					{
// 						Operation: to.Ptr(armmediaservices.FilterTrackPropertyCompareOperationEqual),
// 						Property: to.Ptr(armmediaservices.FilterTrackPropertyTypeType),
// 						Value: to.Ptr("Audio"),
// 					},
// 					{
// 						Operation: to.Ptr(armmediaservices.FilterTrackPropertyCompareOperationNotEqual),
// 						Property: to.Ptr(armmediaservices.FilterTrackPropertyTypeLanguage),
// 						Value: to.Ptr("en"),
// 					},
// 					{
// 						Operation: to.Ptr(armmediaservices.FilterTrackPropertyCompareOperationNotEqual),
// 						Property: to.Ptr(armmediaservices.FilterTrackPropertyTypeFourCC),
// 						Value: to.Ptr("EC-3"),
// 				}},
// 			},
// 			{
// 				TrackSelections: []*armmediaservices.FilterTrackPropertyCondition{
// 					{
// 						Operation: to.Ptr(armmediaservices.FilterTrackPropertyCompareOperationEqual),
// 						Property: to.Ptr(armmediaservices.FilterTrackPropertyTypeType),
// 						Value: to.Ptr("Video"),
// 					},
// 					{
// 						Operation: to.Ptr(armmediaservices.FilterTrackPropertyCompareOperationEqual),
// 						Property: to.Ptr(armmediaservices.FilterTrackPropertyTypeBitrate),
// 						Value: to.Ptr("3000000-5000000"),
// 				}},
// 		}},
// 	},
// }
Output:

func (*AccountFiltersClient) NewListPager

func (client *AccountFiltersClient) NewListPager(resourceGroupName string, accountName string, options *AccountFiltersClientListOptions) *runtime.Pager[AccountFiltersClientListResponse]

NewListPager - List Account Filters in the Media Services account.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • options - AccountFiltersClientListOptions contains the optional parameters for the AccountFiltersClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/accountFilters-list-all.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewAccountFiltersClient().NewListPager("contoso", "contosomedia", nil)
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.AccountFilterCollection = armmediaservices.AccountFilterCollection{
	// 	Value: []*armmediaservices.AccountFilter{
	// 		{
	// 			Name: to.Ptr("accountFilterWithTimeWindowAndTrack"),
	// 			Type: to.Ptr("Microsoft.Media/mediaservices/accountFilters"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/accountFilters/accountFilterWithTimeWindowAndTrack"),
	// 			Properties: &armmediaservices.MediaFilterProperties{
	// 				FirstQuality: &armmediaservices.FirstQuality{
	// 					Bitrate: to.Ptr[int32](128000),
	// 				},
	// 				PresentationTimeRange: &armmediaservices.PresentationTimeRange{
	// 					EndTimestamp: to.Ptr[int64](170000000),
	// 					ForceEndTimestamp: to.Ptr(false),
	// 					LiveBackoffDuration: to.Ptr[int64](0),
	// 					PresentationWindowDuration: to.Ptr[int64](9223372036854775000),
	// 					StartTimestamp: to.Ptr[int64](0),
	// 					Timescale: to.Ptr[int64](10000000),
	// 				},
	// 				Tracks: []*armmediaservices.FilterTrackSelection{
	// 					{
	// 						TrackSelections: []*armmediaservices.FilterTrackPropertyCondition{
	// 							{
	// 								Operation: to.Ptr(armmediaservices.FilterTrackPropertyCompareOperationEqual),
	// 								Property: to.Ptr(armmediaservices.FilterTrackPropertyTypeType),
	// 								Value: to.Ptr("Audio"),
	// 							},
	// 							{
	// 								Operation: to.Ptr(armmediaservices.FilterTrackPropertyCompareOperationNotEqual),
	// 								Property: to.Ptr(armmediaservices.FilterTrackPropertyTypeLanguage),
	// 								Value: to.Ptr("en"),
	// 							},
	// 							{
	// 								Operation: to.Ptr(armmediaservices.FilterTrackPropertyCompareOperationNotEqual),
	// 								Property: to.Ptr(armmediaservices.FilterTrackPropertyTypeFourCC),
	// 								Value: to.Ptr("EC-3"),
	// 						}},
	// 					},
	// 					{
	// 						TrackSelections: []*armmediaservices.FilterTrackPropertyCondition{
	// 							{
	// 								Operation: to.Ptr(armmediaservices.FilterTrackPropertyCompareOperationEqual),
	// 								Property: to.Ptr(armmediaservices.FilterTrackPropertyTypeType),
	// 								Value: to.Ptr("Video"),
	// 							},
	// 							{
	// 								Operation: to.Ptr(armmediaservices.FilterTrackPropertyCompareOperationEqual),
	// 								Property: to.Ptr(armmediaservices.FilterTrackPropertyTypeBitrate),
	// 								Value: to.Ptr("3000000-5000000"),
	// 						}},
	// 				}},
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("accountFilterWithTrack"),
	// 			Type: to.Ptr("Microsoft.Media/mediaservices/accountFilters"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/accountFilters/accountFilterWithTrack"),
	// 			Properties: &armmediaservices.MediaFilterProperties{
	// 				Tracks: []*armmediaservices.FilterTrackSelection{
	// 					{
	// 						TrackSelections: []*armmediaservices.FilterTrackPropertyCondition{
	// 							{
	// 								Operation: to.Ptr(armmediaservices.FilterTrackPropertyCompareOperationEqual),
	// 								Property: to.Ptr(armmediaservices.FilterTrackPropertyTypeType),
	// 								Value: to.Ptr("Audio"),
	// 							},
	// 							{
	// 								Operation: to.Ptr(armmediaservices.FilterTrackPropertyCompareOperationNotEqual),
	// 								Property: to.Ptr(armmediaservices.FilterTrackPropertyTypeLanguage),
	// 								Value: to.Ptr("en"),
	// 							},
	// 							{
	// 								Operation: to.Ptr(armmediaservices.FilterTrackPropertyCompareOperationNotEqual),
	// 								Property: to.Ptr(armmediaservices.FilterTrackPropertyTypeFourCC),
	// 								Value: to.Ptr("EC-3"),
	// 						}},
	// 					},
	// 					{
	// 						TrackSelections: []*armmediaservices.FilterTrackPropertyCondition{
	// 							{
	// 								Operation: to.Ptr(armmediaservices.FilterTrackPropertyCompareOperationEqual),
	// 								Property: to.Ptr(armmediaservices.FilterTrackPropertyTypeType),
	// 								Value: to.Ptr("Video"),
	// 							},
	// 							{
	// 								Operation: to.Ptr(armmediaservices.FilterTrackPropertyCompareOperationEqual),
	// 								Property: to.Ptr(armmediaservices.FilterTrackPropertyTypeBitrate),
	// 								Value: to.Ptr("3000000-5000000"),
	// 						}},
	// 				}},
	// 			},
	// 	}},
	// }
}
Output:

func (*AccountFiltersClient) Update

func (client *AccountFiltersClient) Update(ctx context.Context, resourceGroupName string, accountName string, filterName string, parameters AccountFilter, options *AccountFiltersClientUpdateOptions) (AccountFiltersClientUpdateResponse, error)

Update - Updates an existing Account Filter in the Media Services account. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • filterName - The Account Filter name
  • parameters - The request parameters
  • options - AccountFiltersClientUpdateOptions contains the optional parameters for the AccountFiltersClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/accountFilters-update.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAccountFiltersClient().Update(ctx, "contoso", "contosomedia", "accountFilterWithTimeWindowAndTrack", armmediaservices.AccountFilter{
	Properties: &armmediaservices.MediaFilterProperties{
		FirstQuality: &armmediaservices.FirstQuality{
			Bitrate: to.Ptr[int32](128000),
		},
		PresentationTimeRange: &armmediaservices.PresentationTimeRange{
			EndTimestamp:               to.Ptr[int64](170000000),
			ForceEndTimestamp:          to.Ptr(false),
			LiveBackoffDuration:        to.Ptr[int64](0),
			PresentationWindowDuration: to.Ptr[int64](9223372036854775000),
			StartTimestamp:             to.Ptr[int64](10),
			Timescale:                  to.Ptr[int64](10000000),
		},
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.AccountFilter = armmediaservices.AccountFilter{
// 	Name: to.Ptr("accountFilterWithTimeWindowAndTrack"),
// 	Type: to.Ptr("Microsoft.Media/mediaservices/accountFilters"),
// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/accountFilters/accountFilterWithTimeWindowAndTrack"),
// 	Properties: &armmediaservices.MediaFilterProperties{
// 		FirstQuality: &armmediaservices.FirstQuality{
// 			Bitrate: to.Ptr[int32](128000),
// 		},
// 		PresentationTimeRange: &armmediaservices.PresentationTimeRange{
// 			EndTimestamp: to.Ptr[int64](170000000),
// 			ForceEndTimestamp: to.Ptr(false),
// 			LiveBackoffDuration: to.Ptr[int64](0),
// 			PresentationWindowDuration: to.Ptr[int64](9223372036854775000),
// 			StartTimestamp: to.Ptr[int64](10),
// 			Timescale: to.Ptr[int64](10000000),
// 		},
// 		Tracks: []*armmediaservices.FilterTrackSelection{
// 			{
// 				TrackSelections: []*armmediaservices.FilterTrackPropertyCondition{
// 					{
// 						Operation: to.Ptr(armmediaservices.FilterTrackPropertyCompareOperationEqual),
// 						Property: to.Ptr(armmediaservices.FilterTrackPropertyTypeType),
// 						Value: to.Ptr("Audio"),
// 					},
// 					{
// 						Operation: to.Ptr(armmediaservices.FilterTrackPropertyCompareOperationNotEqual),
// 						Property: to.Ptr(armmediaservices.FilterTrackPropertyTypeLanguage),
// 						Value: to.Ptr("en"),
// 					},
// 					{
// 						Operation: to.Ptr(armmediaservices.FilterTrackPropertyCompareOperationNotEqual),
// 						Property: to.Ptr(armmediaservices.FilterTrackPropertyTypeFourCC),
// 						Value: to.Ptr("EC-3"),
// 				}},
// 			},
// 			{
// 				TrackSelections: []*armmediaservices.FilterTrackPropertyCondition{
// 					{
// 						Operation: to.Ptr(armmediaservices.FilterTrackPropertyCompareOperationEqual),
// 						Property: to.Ptr(armmediaservices.FilterTrackPropertyTypeType),
// 						Value: to.Ptr("Video"),
// 					},
// 					{
// 						Operation: to.Ptr(armmediaservices.FilterTrackPropertyCompareOperationEqual),
// 						Property: to.Ptr(armmediaservices.FilterTrackPropertyTypeBitrate),
// 						Value: to.Ptr("3000000-5000000"),
// 				}},
// 		}},
// 	},
// }
Output:

type AccountFiltersClientCreateOrUpdateOptions

type AccountFiltersClientCreateOrUpdateOptions struct {
}

AccountFiltersClientCreateOrUpdateOptions contains the optional parameters for the AccountFiltersClient.CreateOrUpdate method.

type AccountFiltersClientCreateOrUpdateResponse

type AccountFiltersClientCreateOrUpdateResponse struct {
	// An Account Filter.
	AccountFilter
}

AccountFiltersClientCreateOrUpdateResponse contains the response from method AccountFiltersClient.CreateOrUpdate.

type AccountFiltersClientDeleteOptions

type AccountFiltersClientDeleteOptions struct {
}

AccountFiltersClientDeleteOptions contains the optional parameters for the AccountFiltersClient.Delete method.

type AccountFiltersClientDeleteResponse

type AccountFiltersClientDeleteResponse struct {
}

AccountFiltersClientDeleteResponse contains the response from method AccountFiltersClient.Delete.

type AccountFiltersClientGetOptions

type AccountFiltersClientGetOptions struct {
}

AccountFiltersClientGetOptions contains the optional parameters for the AccountFiltersClient.Get method.

type AccountFiltersClientGetResponse

type AccountFiltersClientGetResponse struct {
	// An Account Filter.
	AccountFilter
}

AccountFiltersClientGetResponse contains the response from method AccountFiltersClient.Get.

type AccountFiltersClientListOptions

type AccountFiltersClientListOptions struct {
}

AccountFiltersClientListOptions contains the optional parameters for the AccountFiltersClient.NewListPager method.

type AccountFiltersClientListResponse

type AccountFiltersClientListResponse struct {
	// A collection of AccountFilter items.
	AccountFilterCollection
}

AccountFiltersClientListResponse contains the response from method AccountFiltersClient.NewListPager.

type AccountFiltersClientUpdateOptions

type AccountFiltersClientUpdateOptions struct {
}

AccountFiltersClientUpdateOptions contains the optional parameters for the AccountFiltersClient.Update method.

type AccountFiltersClientUpdateResponse

type AccountFiltersClientUpdateResponse struct {
	// An Account Filter.
	AccountFilter
}

AccountFiltersClientUpdateResponse contains the response from method AccountFiltersClient.Update.

type ActionType

type ActionType string

ActionType - Indicates the action type.

const (
	// ActionTypeInternal - An internal action.
	ActionTypeInternal ActionType = "Internal"
)

func PossibleActionTypeValues

func PossibleActionTypeValues() []ActionType

PossibleActionTypeValues returns the possible values for the ActionType const type.

type AkamaiAccessControl

type AkamaiAccessControl struct {
	// authentication key list
	AkamaiSignatureHeaderAuthenticationKeyList []*AkamaiSignatureHeaderAuthenticationKey
}

AkamaiAccessControl - Akamai access control

func (AkamaiAccessControl) MarshalJSON

func (a AkamaiAccessControl) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AkamaiAccessControl.

func (*AkamaiAccessControl) UnmarshalJSON

func (a *AkamaiAccessControl) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AkamaiAccessControl.

type AkamaiSignatureHeaderAuthenticationKey

type AkamaiSignatureHeaderAuthenticationKey struct {
	// authentication key
	Base64Key *string

	// The expiration time of the authentication key.
	Expiration *time.Time

	// identifier of the key
	Identifier *string
}

AkamaiSignatureHeaderAuthenticationKey - Akamai Signature Header authentication key.

func (AkamaiSignatureHeaderAuthenticationKey) MarshalJSON

func (a AkamaiSignatureHeaderAuthenticationKey) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AkamaiSignatureHeaderAuthenticationKey.

func (*AkamaiSignatureHeaderAuthenticationKey) UnmarshalJSON

func (a *AkamaiSignatureHeaderAuthenticationKey) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AkamaiSignatureHeaderAuthenticationKey.

type AnalysisResolution

type AnalysisResolution string

AnalysisResolution - Specifies the maximum resolution at which your video is analyzed. The default behavior is "SourceResolution," which will keep the input video at its original resolution when analyzed. Using "StandardDefinition" will resize input videos to standard definition while preserving the appropriate aspect ratio. It will only resize if the video is of higher resolution. For example, a 1920x1080 input would be scaled to 640x360 before processing. Switching to "StandardDefinition" will reduce the time it takes to process high resolution video. It may also reduce the cost of using this component (see https://azure.microsoft.com/en-us/pricing/details/media-services/#analytics for details). However, faces that end up being too small in the resized video may not be detected.

const (
	AnalysisResolutionSourceResolution   AnalysisResolution = "SourceResolution"
	AnalysisResolutionStandardDefinition AnalysisResolution = "StandardDefinition"
)

func PossibleAnalysisResolutionValues

func PossibleAnalysisResolutionValues() []AnalysisResolution

PossibleAnalysisResolutionValues returns the possible values for the AnalysisResolution const type.

type ArmStreamingEndpointCapacity

type ArmStreamingEndpointCapacity struct {
	// The streaming endpoint default capacity.
	Default *int32

	// The streaming endpoint maximum capacity.
	Maximum *int32

	// The streaming endpoint minimum capacity.
	Minimum *int32

	// READ-ONLY
	ScaleType *string
}

ArmStreamingEndpointCapacity - The streaming endpoint sku capacity.

func (ArmStreamingEndpointCapacity) MarshalJSON

func (a ArmStreamingEndpointCapacity) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ArmStreamingEndpointCapacity.

func (*ArmStreamingEndpointCapacity) UnmarshalJSON

func (a *ArmStreamingEndpointCapacity) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ArmStreamingEndpointCapacity.

type ArmStreamingEndpointCurrentSKU

type ArmStreamingEndpointCurrentSKU struct {
	// The streaming endpoint sku capacity.
	Capacity *int32

	// READ-ONLY; The streaming endpoint sku name.
	Name *string
}

ArmStreamingEndpointCurrentSKU - The streaming endpoint current sku.

func (ArmStreamingEndpointCurrentSKU) MarshalJSON

func (a ArmStreamingEndpointCurrentSKU) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ArmStreamingEndpointCurrentSKU.

func (*ArmStreamingEndpointCurrentSKU) UnmarshalJSON

func (a *ArmStreamingEndpointCurrentSKU) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ArmStreamingEndpointCurrentSKU.

type ArmStreamingEndpointSKU

type ArmStreamingEndpointSKU struct {
	// READ-ONLY; The streaming endpoint sku name.
	Name *string
}

ArmStreamingEndpointSKU - The streaming endpoint sku.

func (ArmStreamingEndpointSKU) MarshalJSON

func (a ArmStreamingEndpointSKU) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ArmStreamingEndpointSKU.

func (*ArmStreamingEndpointSKU) UnmarshalJSON

func (a *ArmStreamingEndpointSKU) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ArmStreamingEndpointSKU.

type ArmStreamingEndpointSKUInfo

type ArmStreamingEndpointSKUInfo struct {
	// The streaming endpoint sku capacity.
	Capacity     *ArmStreamingEndpointCapacity
	ResourceType *string

	// The streaming endpoint sku.
	SKU *ArmStreamingEndpointSKU
}

func (ArmStreamingEndpointSKUInfo) MarshalJSON

func (a ArmStreamingEndpointSKUInfo) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ArmStreamingEndpointSKUInfo.

func (*ArmStreamingEndpointSKUInfo) UnmarshalJSON

func (a *ArmStreamingEndpointSKUInfo) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ArmStreamingEndpointSKUInfo.

type Asset

type Asset struct {
	// The resource properties.
	Properties *AssetProperties

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; The system metadata relating to this resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

Asset - An Asset.

func (Asset) MarshalJSON

func (a Asset) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Asset.

func (*Asset) UnmarshalJSON

func (a *Asset) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Asset.

type AssetCollection

type AssetCollection struct {
	// A link to the next page of the collection (when the collection contains too many results to return in one response).
	ODataNextLink *string

	// A collection of Asset items.
	Value []*Asset
}

AssetCollection - A collection of Asset items.

func (AssetCollection) MarshalJSON

func (a AssetCollection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AssetCollection.

func (*AssetCollection) UnmarshalJSON

func (a *AssetCollection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AssetCollection.

type AssetContainerPermission

type AssetContainerPermission string

AssetContainerPermission - The permissions to set on the SAS URL.

const (
	// AssetContainerPermissionRead - The SAS URL will allow read access to the container.
	AssetContainerPermissionRead AssetContainerPermission = "Read"
	// AssetContainerPermissionReadWrite - The SAS URL will allow read and write access to the container.
	AssetContainerPermissionReadWrite AssetContainerPermission = "ReadWrite"
	// AssetContainerPermissionReadWriteDelete - The SAS URL will allow read, write and delete access to the container.
	AssetContainerPermissionReadWriteDelete AssetContainerPermission = "ReadWriteDelete"
)

func PossibleAssetContainerPermissionValues

func PossibleAssetContainerPermissionValues() []AssetContainerPermission

PossibleAssetContainerPermissionValues returns the possible values for the AssetContainerPermission const type.

type AssetContainerSas

type AssetContainerSas struct {
	// The list of Asset container SAS URLs.
	AssetContainerSasUrls []*string
}

AssetContainerSas - The Asset Storage container SAS URLs.

func (AssetContainerSas) MarshalJSON

func (a AssetContainerSas) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AssetContainerSas.

func (*AssetContainerSas) UnmarshalJSON

func (a *AssetContainerSas) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AssetContainerSas.

type AssetFileEncryptionMetadata

type AssetFileEncryptionMetadata struct {
	// REQUIRED; The Asset File Id.
	AssetFileID *string

	// The Asset File name.
	AssetFileName *string

	// The Asset File initialization vector.
	InitializationVector *string
}

AssetFileEncryptionMetadata - The Asset File Storage encryption metadata.

func (AssetFileEncryptionMetadata) MarshalJSON

func (a AssetFileEncryptionMetadata) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AssetFileEncryptionMetadata.

func (*AssetFileEncryptionMetadata) UnmarshalJSON

func (a *AssetFileEncryptionMetadata) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AssetFileEncryptionMetadata.

type AssetFilter

type AssetFilter struct {
	// The Media Filter properties.
	Properties *MediaFilterProperties

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; The system metadata relating to this resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

AssetFilter - An Asset Filter.

func (AssetFilter) MarshalJSON

func (a AssetFilter) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AssetFilter.

func (*AssetFilter) UnmarshalJSON

func (a *AssetFilter) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AssetFilter.

type AssetFilterCollection

type AssetFilterCollection struct {
	// A link to the next page of the collection (when the collection contains too many results to return in one response).
	ODataNextLink *string

	// A collection of AssetFilter items.
	Value []*AssetFilter
}

AssetFilterCollection - A collection of AssetFilter items.

func (AssetFilterCollection) MarshalJSON

func (a AssetFilterCollection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AssetFilterCollection.

func (*AssetFilterCollection) UnmarshalJSON

func (a *AssetFilterCollection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AssetFilterCollection.

type AssetFiltersClient

type AssetFiltersClient struct {
	// contains filtered or unexported fields
}

AssetFiltersClient contains the methods for the AssetFilters group. Don't use this type directly, use NewAssetFiltersClient() instead.

func NewAssetFiltersClient

func NewAssetFiltersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AssetFiltersClient, error)

NewAssetFiltersClient creates a new instance of AssetFiltersClient with the specified values.

  • subscriptionID - The unique identifier for a Microsoft Azure subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*AssetFiltersClient) CreateOrUpdate

func (client *AssetFiltersClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, assetName string, filterName string, parameters AssetFilter, options *AssetFiltersClientCreateOrUpdateOptions) (AssetFiltersClientCreateOrUpdateResponse, error)

CreateOrUpdate - Creates or updates an Asset Filter associated with the specified Asset. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • assetName - The Asset name.
  • filterName - The Asset Filter name
  • parameters - The request parameters
  • options - AssetFiltersClientCreateOrUpdateOptions contains the optional parameters for the AssetFiltersClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/assetFilters-create.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAssetFiltersClient().CreateOrUpdate(ctx, "contoso", "contosomedia", "ClimbingMountRainer", "newAssetFilter", armmediaservices.AssetFilter{
	Properties: &armmediaservices.MediaFilterProperties{
		FirstQuality: &armmediaservices.FirstQuality{
			Bitrate: to.Ptr[int32](128000),
		},
		PresentationTimeRange: &armmediaservices.PresentationTimeRange{
			EndTimestamp:               to.Ptr[int64](170000000),
			ForceEndTimestamp:          to.Ptr(false),
			LiveBackoffDuration:        to.Ptr[int64](0),
			PresentationWindowDuration: to.Ptr[int64](9223372036854775000),
			StartTimestamp:             to.Ptr[int64](0),
			Timescale:                  to.Ptr[int64](10000000),
		},
		Tracks: []*armmediaservices.FilterTrackSelection{
			{
				TrackSelections: []*armmediaservices.FilterTrackPropertyCondition{
					{
						Operation: to.Ptr(armmediaservices.FilterTrackPropertyCompareOperationEqual),
						Property:  to.Ptr(armmediaservices.FilterTrackPropertyTypeType),
						Value:     to.Ptr("Audio"),
					},
					{
						Operation: to.Ptr(armmediaservices.FilterTrackPropertyCompareOperationNotEqual),
						Property:  to.Ptr(armmediaservices.FilterTrackPropertyTypeLanguage),
						Value:     to.Ptr("en"),
					},
					{
						Operation: to.Ptr(armmediaservices.FilterTrackPropertyCompareOperationNotEqual),
						Property:  to.Ptr(armmediaservices.FilterTrackPropertyTypeFourCC),
						Value:     to.Ptr("EC-3"),
					}},
			},
			{
				TrackSelections: []*armmediaservices.FilterTrackPropertyCondition{
					{
						Operation: to.Ptr(armmediaservices.FilterTrackPropertyCompareOperationEqual),
						Property:  to.Ptr(armmediaservices.FilterTrackPropertyTypeType),
						Value:     to.Ptr("Video"),
					},
					{
						Operation: to.Ptr(armmediaservices.FilterTrackPropertyCompareOperationEqual),
						Property:  to.Ptr(armmediaservices.FilterTrackPropertyTypeBitrate),
						Value:     to.Ptr("3000000-5000000"),
					}},
			}},
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.AssetFilter = armmediaservices.AssetFilter{
// 	Name: to.Ptr("newAssetFilter"),
// 	Type: to.Ptr("Microsoft.Media/mediaservices/assets/assetFilters"),
// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingMountRainer/assetFilters/newAssetFilter"),
// 	Properties: &armmediaservices.MediaFilterProperties{
// 		FirstQuality: &armmediaservices.FirstQuality{
// 			Bitrate: to.Ptr[int32](128000),
// 		},
// 		PresentationTimeRange: &armmediaservices.PresentationTimeRange{
// 			EndTimestamp: to.Ptr[int64](170000000),
// 			ForceEndTimestamp: to.Ptr(false),
// 			LiveBackoffDuration: to.Ptr[int64](0),
// 			PresentationWindowDuration: to.Ptr[int64](9223372036854775000),
// 			StartTimestamp: to.Ptr[int64](0),
// 			Timescale: to.Ptr[int64](10000000),
// 		},
// 		Tracks: []*armmediaservices.FilterTrackSelection{
// 			{
// 				TrackSelections: []*armmediaservices.FilterTrackPropertyCondition{
// 					{
// 						Operation: to.Ptr(armmediaservices.FilterTrackPropertyCompareOperationEqual),
// 						Property: to.Ptr(armmediaservices.FilterTrackPropertyTypeType),
// 						Value: to.Ptr("Audio"),
// 					},
// 					{
// 						Operation: to.Ptr(armmediaservices.FilterTrackPropertyCompareOperationNotEqual),
// 						Property: to.Ptr(armmediaservices.FilterTrackPropertyTypeLanguage),
// 						Value: to.Ptr("en"),
// 					},
// 					{
// 						Operation: to.Ptr(armmediaservices.FilterTrackPropertyCompareOperationNotEqual),
// 						Property: to.Ptr(armmediaservices.FilterTrackPropertyTypeFourCC),
// 						Value: to.Ptr("EC-3"),
// 				}},
// 			},
// 			{
// 				TrackSelections: []*armmediaservices.FilterTrackPropertyCondition{
// 					{
// 						Operation: to.Ptr(armmediaservices.FilterTrackPropertyCompareOperationEqual),
// 						Property: to.Ptr(armmediaservices.FilterTrackPropertyTypeType),
// 						Value: to.Ptr("Video"),
// 					},
// 					{
// 						Operation: to.Ptr(armmediaservices.FilterTrackPropertyCompareOperationEqual),
// 						Property: to.Ptr(armmediaservices.FilterTrackPropertyTypeBitrate),
// 						Value: to.Ptr("3000000-5000000"),
// 				}},
// 		}},
// 	},
// }
Output:

func (*AssetFiltersClient) Delete

func (client *AssetFiltersClient) Delete(ctx context.Context, resourceGroupName string, accountName string, assetName string, filterName string, options *AssetFiltersClientDeleteOptions) (AssetFiltersClientDeleteResponse, error)

Delete - Deletes an Asset Filter associated with the specified Asset. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • assetName - The Asset name.
  • filterName - The Asset Filter name
  • options - AssetFiltersClientDeleteOptions contains the optional parameters for the AssetFiltersClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/assetFilters-delete.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewAssetFiltersClient().Delete(ctx, "contoso", "contosomedia", "ClimbingMountRainer", "assetFilterWithTimeWindowAndTrack", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*AssetFiltersClient) Get

func (client *AssetFiltersClient) Get(ctx context.Context, resourceGroupName string, accountName string, assetName string, filterName string, options *AssetFiltersClientGetOptions) (AssetFiltersClientGetResponse, error)

Get - Get the details of an Asset Filter associated with the specified Asset. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • assetName - The Asset name.
  • filterName - The Asset Filter name
  • options - AssetFiltersClientGetOptions contains the optional parameters for the AssetFiltersClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/assetFilters-get-by-name.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAssetFiltersClient().Get(ctx, "contoso", "contosomedia", "ClimbingMountRainer", "assetFilterWithTimeWindowAndTrack", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.AssetFilter = armmediaservices.AssetFilter{
// 	Name: to.Ptr("assetFilterWithTimeWindowAndTrack"),
// 	Type: to.Ptr("Microsoft.Media/mediaservices/assets/assetFilters"),
// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingMountRainer/assetFilters/assetFilterWithTimeWindowAndTrack"),
// 	Properties: &armmediaservices.MediaFilterProperties{
// 		FirstQuality: &armmediaservices.FirstQuality{
// 			Bitrate: to.Ptr[int32](128000),
// 		},
// 		PresentationTimeRange: &armmediaservices.PresentationTimeRange{
// 			EndTimestamp: to.Ptr[int64](170000000),
// 			ForceEndTimestamp: to.Ptr(false),
// 			LiveBackoffDuration: to.Ptr[int64](0),
// 			PresentationWindowDuration: to.Ptr[int64](9223372036854775000),
// 			StartTimestamp: to.Ptr[int64](0),
// 			Timescale: to.Ptr[int64](10000000),
// 		},
// 		Tracks: []*armmediaservices.FilterTrackSelection{
// 			{
// 				TrackSelections: []*armmediaservices.FilterTrackPropertyCondition{
// 					{
// 						Operation: to.Ptr(armmediaservices.FilterTrackPropertyCompareOperationEqual),
// 						Property: to.Ptr(armmediaservices.FilterTrackPropertyTypeType),
// 						Value: to.Ptr("Audio"),
// 					},
// 					{
// 						Operation: to.Ptr(armmediaservices.FilterTrackPropertyCompareOperationNotEqual),
// 						Property: to.Ptr(armmediaservices.FilterTrackPropertyTypeLanguage),
// 						Value: to.Ptr("en"),
// 					},
// 					{
// 						Operation: to.Ptr(armmediaservices.FilterTrackPropertyCompareOperationNotEqual),
// 						Property: to.Ptr(armmediaservices.FilterTrackPropertyTypeFourCC),
// 						Value: to.Ptr("EC-3"),
// 				}},
// 			},
// 			{
// 				TrackSelections: []*armmediaservices.FilterTrackPropertyCondition{
// 					{
// 						Operation: to.Ptr(armmediaservices.FilterTrackPropertyCompareOperationEqual),
// 						Property: to.Ptr(armmediaservices.FilterTrackPropertyTypeType),
// 						Value: to.Ptr("Video"),
// 					},
// 					{
// 						Operation: to.Ptr(armmediaservices.FilterTrackPropertyCompareOperationEqual),
// 						Property: to.Ptr(armmediaservices.FilterTrackPropertyTypeBitrate),
// 						Value: to.Ptr("3000000-5000000"),
// 				}},
// 		}},
// 	},
// }
Output:

func (*AssetFiltersClient) NewListPager

func (client *AssetFiltersClient) NewListPager(resourceGroupName string, accountName string, assetName string, options *AssetFiltersClientListOptions) *runtime.Pager[AssetFiltersClientListResponse]

NewListPager - List Asset Filters associated with the specified Asset.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • assetName - The Asset name.
  • options - AssetFiltersClientListOptions contains the optional parameters for the AssetFiltersClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/assetFilters-list-all.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewAssetFiltersClient().NewListPager("contoso", "contosomedia", "ClimbingMountRainer", nil)
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.AssetFilterCollection = armmediaservices.AssetFilterCollection{
	// 	Value: []*armmediaservices.AssetFilter{
	// 		{
	// 			Name: to.Ptr("assetFilterWithTimeWindowAndTrack"),
	// 			Type: to.Ptr("Microsoft.Media/mediaservices/assets/assetFilters"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingMountRainer/assetFilters/assetFilterWithTimeWindowAndTrack"),
	// 			Properties: &armmediaservices.MediaFilterProperties{
	// 				FirstQuality: &armmediaservices.FirstQuality{
	// 					Bitrate: to.Ptr[int32](128000),
	// 				},
	// 				PresentationTimeRange: &armmediaservices.PresentationTimeRange{
	// 					EndTimestamp: to.Ptr[int64](170000000),
	// 					ForceEndTimestamp: to.Ptr(false),
	// 					LiveBackoffDuration: to.Ptr[int64](0),
	// 					PresentationWindowDuration: to.Ptr[int64](9223372036854775000),
	// 					StartTimestamp: to.Ptr[int64](0),
	// 					Timescale: to.Ptr[int64](10000000),
	// 				},
	// 				Tracks: []*armmediaservices.FilterTrackSelection{
	// 					{
	// 						TrackSelections: []*armmediaservices.FilterTrackPropertyCondition{
	// 							{
	// 								Operation: to.Ptr(armmediaservices.FilterTrackPropertyCompareOperationEqual),
	// 								Property: to.Ptr(armmediaservices.FilterTrackPropertyTypeType),
	// 								Value: to.Ptr("Audio"),
	// 							},
	// 							{
	// 								Operation: to.Ptr(armmediaservices.FilterTrackPropertyCompareOperationNotEqual),
	// 								Property: to.Ptr(armmediaservices.FilterTrackPropertyTypeLanguage),
	// 								Value: to.Ptr("en"),
	// 							},
	// 							{
	// 								Operation: to.Ptr(armmediaservices.FilterTrackPropertyCompareOperationNotEqual),
	// 								Property: to.Ptr(armmediaservices.FilterTrackPropertyTypeFourCC),
	// 								Value: to.Ptr("EC-3"),
	// 						}},
	// 					},
	// 					{
	// 						TrackSelections: []*armmediaservices.FilterTrackPropertyCondition{
	// 							{
	// 								Operation: to.Ptr(armmediaservices.FilterTrackPropertyCompareOperationEqual),
	// 								Property: to.Ptr(armmediaservices.FilterTrackPropertyTypeType),
	// 								Value: to.Ptr("Video"),
	// 							},
	// 							{
	// 								Operation: to.Ptr(armmediaservices.FilterTrackPropertyCompareOperationEqual),
	// 								Property: to.Ptr(armmediaservices.FilterTrackPropertyTypeBitrate),
	// 								Value: to.Ptr("3000000-5000000"),
	// 						}},
	// 				}},
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("assetFilterWithTimeWindow"),
	// 			Type: to.Ptr("Microsoft.Media/mediaservices/assets/assetFilters"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingMountRainer/assetFilters/assetFilterWithTimeWindow"),
	// 			Properties: &armmediaservices.MediaFilterProperties{
	// 				FirstQuality: &armmediaservices.FirstQuality{
	// 					Bitrate: to.Ptr[int32](128000),
	// 				},
	// 				PresentationTimeRange: &armmediaservices.PresentationTimeRange{
	// 					EndTimestamp: to.Ptr[int64](170000000),
	// 					ForceEndTimestamp: to.Ptr(false),
	// 					LiveBackoffDuration: to.Ptr[int64](0),
	// 					PresentationWindowDuration: to.Ptr[int64](9223372036854775000),
	// 					StartTimestamp: to.Ptr[int64](0),
	// 					Timescale: to.Ptr[int64](10000000),
	// 				},
	// 				Tracks: []*armmediaservices.FilterTrackSelection{
	// 				},
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("assetFilterWithTrack"),
	// 			Type: to.Ptr("Microsoft.Media/mediaservices/assets/assetFilters"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingMountRainer/assetFilters/assetFilterWithTrack"),
	// 			Properties: &armmediaservices.MediaFilterProperties{
	// 				Tracks: []*armmediaservices.FilterTrackSelection{
	// 					{
	// 						TrackSelections: []*armmediaservices.FilterTrackPropertyCondition{
	// 							{
	// 								Operation: to.Ptr(armmediaservices.FilterTrackPropertyCompareOperationEqual),
	// 								Property: to.Ptr(armmediaservices.FilterTrackPropertyTypeType),
	// 								Value: to.Ptr("Audio"),
	// 							},
	// 							{
	// 								Operation: to.Ptr(armmediaservices.FilterTrackPropertyCompareOperationNotEqual),
	// 								Property: to.Ptr(armmediaservices.FilterTrackPropertyTypeLanguage),
	// 								Value: to.Ptr("en"),
	// 							},
	// 							{
	// 								Operation: to.Ptr(armmediaservices.FilterTrackPropertyCompareOperationNotEqual),
	// 								Property: to.Ptr(armmediaservices.FilterTrackPropertyTypeFourCC),
	// 								Value: to.Ptr("EC-3"),
	// 						}},
	// 					},
	// 					{
	// 						TrackSelections: []*armmediaservices.FilterTrackPropertyCondition{
	// 							{
	// 								Operation: to.Ptr(armmediaservices.FilterTrackPropertyCompareOperationEqual),
	// 								Property: to.Ptr(armmediaservices.FilterTrackPropertyTypeType),
	// 								Value: to.Ptr("Video"),
	// 							},
	// 							{
	// 								Operation: to.Ptr(armmediaservices.FilterTrackPropertyCompareOperationEqual),
	// 								Property: to.Ptr(armmediaservices.FilterTrackPropertyTypeBitrate),
	// 								Value: to.Ptr("3000000-5000000"),
	// 						}},
	// 				}},
	// 			},
	// 	}},
	// }
}
Output:

func (*AssetFiltersClient) Update

func (client *AssetFiltersClient) Update(ctx context.Context, resourceGroupName string, accountName string, assetName string, filterName string, parameters AssetFilter, options *AssetFiltersClientUpdateOptions) (AssetFiltersClientUpdateResponse, error)

Update - Updates an existing Asset Filter associated with the specified Asset. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • assetName - The Asset name.
  • filterName - The Asset Filter name
  • parameters - The request parameters
  • options - AssetFiltersClientUpdateOptions contains the optional parameters for the AssetFiltersClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/assetFilters-update.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAssetFiltersClient().Update(ctx, "contoso", "contosomedia", "ClimbingMountRainer", "assetFilterWithTimeWindowAndTrack", armmediaservices.AssetFilter{
	Properties: &armmediaservices.MediaFilterProperties{
		FirstQuality: &armmediaservices.FirstQuality{
			Bitrate: to.Ptr[int32](128000),
		},
		PresentationTimeRange: &armmediaservices.PresentationTimeRange{
			EndTimestamp:               to.Ptr[int64](170000000),
			ForceEndTimestamp:          to.Ptr(false),
			LiveBackoffDuration:        to.Ptr[int64](0),
			PresentationWindowDuration: to.Ptr[int64](9223372036854775000),
			StartTimestamp:             to.Ptr[int64](10),
			Timescale:                  to.Ptr[int64](10000000),
		},
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.AssetFilter = armmediaservices.AssetFilter{
// 	Name: to.Ptr("assetFilterWithTimeWindowAndTrack"),
// 	Type: to.Ptr("Microsoft.Media/mediaservices/assets/assetFilters"),
// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingMountRainer/assetFilters/assetFilterWithTimeWindowAndTrack"),
// 	Properties: &armmediaservices.MediaFilterProperties{
// 		FirstQuality: &armmediaservices.FirstQuality{
// 			Bitrate: to.Ptr[int32](128000),
// 		},
// 		PresentationTimeRange: &armmediaservices.PresentationTimeRange{
// 			EndTimestamp: to.Ptr[int64](170000000),
// 			ForceEndTimestamp: to.Ptr(false),
// 			LiveBackoffDuration: to.Ptr[int64](0),
// 			PresentationWindowDuration: to.Ptr[int64](9223372036854775000),
// 			StartTimestamp: to.Ptr[int64](10),
// 			Timescale: to.Ptr[int64](10000000),
// 		},
// 		Tracks: []*armmediaservices.FilterTrackSelection{
// 			{
// 				TrackSelections: []*armmediaservices.FilterTrackPropertyCondition{
// 					{
// 						Operation: to.Ptr(armmediaservices.FilterTrackPropertyCompareOperationEqual),
// 						Property: to.Ptr(armmediaservices.FilterTrackPropertyTypeType),
// 						Value: to.Ptr("Audio"),
// 					},
// 					{
// 						Operation: to.Ptr(armmediaservices.FilterTrackPropertyCompareOperationNotEqual),
// 						Property: to.Ptr(armmediaservices.FilterTrackPropertyTypeLanguage),
// 						Value: to.Ptr("en"),
// 					},
// 					{
// 						Operation: to.Ptr(armmediaservices.FilterTrackPropertyCompareOperationNotEqual),
// 						Property: to.Ptr(armmediaservices.FilterTrackPropertyTypeFourCC),
// 						Value: to.Ptr("EC-3"),
// 				}},
// 			},
// 			{
// 				TrackSelections: []*armmediaservices.FilterTrackPropertyCondition{
// 					{
// 						Operation: to.Ptr(armmediaservices.FilterTrackPropertyCompareOperationEqual),
// 						Property: to.Ptr(armmediaservices.FilterTrackPropertyTypeType),
// 						Value: to.Ptr("Video"),
// 					},
// 					{
// 						Operation: to.Ptr(armmediaservices.FilterTrackPropertyCompareOperationEqual),
// 						Property: to.Ptr(armmediaservices.FilterTrackPropertyTypeBitrate),
// 						Value: to.Ptr("3000000-5000000"),
// 				}},
// 		}},
// 	},
// }
Output:

type AssetFiltersClientCreateOrUpdateOptions

type AssetFiltersClientCreateOrUpdateOptions struct {
}

AssetFiltersClientCreateOrUpdateOptions contains the optional parameters for the AssetFiltersClient.CreateOrUpdate method.

type AssetFiltersClientCreateOrUpdateResponse

type AssetFiltersClientCreateOrUpdateResponse struct {
	// An Asset Filter.
	AssetFilter
}

AssetFiltersClientCreateOrUpdateResponse contains the response from method AssetFiltersClient.CreateOrUpdate.

type AssetFiltersClientDeleteOptions

type AssetFiltersClientDeleteOptions struct {
}

AssetFiltersClientDeleteOptions contains the optional parameters for the AssetFiltersClient.Delete method.

type AssetFiltersClientDeleteResponse

type AssetFiltersClientDeleteResponse struct {
}

AssetFiltersClientDeleteResponse contains the response from method AssetFiltersClient.Delete.

type AssetFiltersClientGetOptions

type AssetFiltersClientGetOptions struct {
}

AssetFiltersClientGetOptions contains the optional parameters for the AssetFiltersClient.Get method.

type AssetFiltersClientGetResponse

type AssetFiltersClientGetResponse struct {
	// An Asset Filter.
	AssetFilter
}

AssetFiltersClientGetResponse contains the response from method AssetFiltersClient.Get.

type AssetFiltersClientListOptions

type AssetFiltersClientListOptions struct {
}

AssetFiltersClientListOptions contains the optional parameters for the AssetFiltersClient.NewListPager method.

type AssetFiltersClientListResponse

type AssetFiltersClientListResponse struct {
	// A collection of AssetFilter items.
	AssetFilterCollection
}

AssetFiltersClientListResponse contains the response from method AssetFiltersClient.NewListPager.

type AssetFiltersClientUpdateOptions

type AssetFiltersClientUpdateOptions struct {
}

AssetFiltersClientUpdateOptions contains the optional parameters for the AssetFiltersClient.Update method.

type AssetFiltersClientUpdateResponse

type AssetFiltersClientUpdateResponse struct {
	// An Asset Filter.
	AssetFilter
}

AssetFiltersClientUpdateResponse contains the response from method AssetFiltersClient.Update.

type AssetProperties

type AssetProperties struct {
	// The alternate ID of the Asset.
	AlternateID *string

	// The name of the asset blob container.
	Container *string

	// The Asset description.
	Description *string

	// The name of the storage account.
	StorageAccountName *string

	// READ-ONLY; The Asset ID.
	AssetID *string

	// READ-ONLY; The creation date of the Asset.
	Created *time.Time

	// READ-ONLY; The last modified date of the Asset.
	LastModified *time.Time

	// READ-ONLY; The Asset encryption format. One of None or MediaStorageEncryption.
	StorageEncryptionFormat *AssetStorageEncryptionFormat
}

AssetProperties - The Asset properties.

func (AssetProperties) MarshalJSON

func (a AssetProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AssetProperties.

func (*AssetProperties) UnmarshalJSON

func (a *AssetProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AssetProperties.

type AssetStorageEncryptionFormat

type AssetStorageEncryptionFormat string

AssetStorageEncryptionFormat - The Asset encryption format. One of None or MediaStorageEncryption.

const (
	// AssetStorageEncryptionFormatMediaStorageClientEncryption - The Asset is encrypted with Media Services client-side encryption.
	AssetStorageEncryptionFormatMediaStorageClientEncryption AssetStorageEncryptionFormat = "MediaStorageClientEncryption"
	// AssetStorageEncryptionFormatNone - The Asset does not use client-side storage encryption (this is the only allowed value
	// for new Assets).
	AssetStorageEncryptionFormatNone AssetStorageEncryptionFormat = "None"
)

func PossibleAssetStorageEncryptionFormatValues

func PossibleAssetStorageEncryptionFormatValues() []AssetStorageEncryptionFormat

PossibleAssetStorageEncryptionFormatValues returns the possible values for the AssetStorageEncryptionFormat const type.

type AssetStreamingLocator

type AssetStreamingLocator struct {
	// READ-ONLY; Asset Name.
	AssetName *string

	// READ-ONLY; The creation time of the Streaming Locator.
	Created *time.Time

	// READ-ONLY; Name of the default ContentKeyPolicy used by this Streaming Locator.
	DefaultContentKeyPolicyName *string

	// READ-ONLY; The end time of the Streaming Locator.
	EndTime *time.Time

	// READ-ONLY; Streaming Locator name.
	Name *string

	// READ-ONLY; The start time of the Streaming Locator.
	StartTime *time.Time

	// READ-ONLY; StreamingLocatorId of the Streaming Locator.
	StreamingLocatorID *string

	// READ-ONLY; Name of the Streaming Policy used by this Streaming Locator.
	StreamingPolicyName *string
}

AssetStreamingLocator - Properties of the Streaming Locator.

func (AssetStreamingLocator) MarshalJSON

func (a AssetStreamingLocator) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AssetStreamingLocator.

func (*AssetStreamingLocator) UnmarshalJSON

func (a *AssetStreamingLocator) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AssetStreamingLocator.

type AssetTrack

type AssetTrack struct {
	// The resource properties.
	Properties *AssetTrackProperties

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

AssetTrack - An Asset Track resource.

func (AssetTrack) MarshalJSON

func (a AssetTrack) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AssetTrack.

func (*AssetTrack) UnmarshalJSON

func (a *AssetTrack) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AssetTrack.

type AssetTrackCollection

type AssetTrackCollection struct {
	// A collection of AssetTrack items.
	Value []*AssetTrack
}

AssetTrackCollection - A collection of AssetTrack items.

func (AssetTrackCollection) MarshalJSON

func (a AssetTrackCollection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AssetTrackCollection.

func (*AssetTrackCollection) UnmarshalJSON

func (a *AssetTrackCollection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AssetTrackCollection.

type AssetTrackOperationResultsClient

type AssetTrackOperationResultsClient struct {
	// contains filtered or unexported fields
}

AssetTrackOperationResultsClient contains the methods for the AssetTrackOperationResults group. Don't use this type directly, use NewAssetTrackOperationResultsClient() instead.

func NewAssetTrackOperationResultsClient

func NewAssetTrackOperationResultsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AssetTrackOperationResultsClient, error)

NewAssetTrackOperationResultsClient creates a new instance of AssetTrackOperationResultsClient with the specified values.

  • subscriptionID - The unique identifier for a Microsoft Azure subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*AssetTrackOperationResultsClient) Get

func (client *AssetTrackOperationResultsClient) Get(ctx context.Context, resourceGroupName string, accountName string, assetName string, trackName string, operationID string, options *AssetTrackOperationResultsClientGetOptions) (AssetTrackOperationResultsClientGetResponse, error)

Get - Get asset track operation result. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • assetName - The Asset name.
  • trackName - The Asset Track name.
  • operationID - Operation Id.
  • options - AssetTrackOperationResultsClientGetOptions contains the optional parameters for the AssetTrackOperationResultsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/asset-tracks-operation-result-by-id.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAssetTrackOperationResultsClient().Get(ctx, "contoso", "contosomedia", "ClimbingMountRainer", "text1", "e78f8d40-7aaa-4f2f-8ae6-73987e7c5a08", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.AssetTrack = armmediaservices.AssetTrack{
// 	Name: to.Ptr("text1"),
// 	Type: to.Ptr("Microsoft.Media/mediaservices/assets/tracks/operationResults"),
// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingMountRainer/tracks/text1/operationResults/e78f8d40-7aaa-4f2f-8ae6-73987e7c5a08"),
// 	Properties: &armmediaservices.AssetTrackProperties{
// 		ProvisioningState: to.Ptr(armmediaservices.ProvisioningStateSucceeded),
// 		Track: &armmediaservices.TextTrack{
// 			ODataType: to.Ptr("#Microsoft.Media.TextTrack"),
// 			DisplayName: to.Ptr("Auto generated"),
// 			LanguageCode: to.Ptr("en-us"),
// 			PlayerVisibility: to.Ptr(armmediaservices.VisibilityVisible),
// 		},
// 	},
// }
Output:

type AssetTrackOperationResultsClientGetOptions

type AssetTrackOperationResultsClientGetOptions struct {
}

AssetTrackOperationResultsClientGetOptions contains the optional parameters for the AssetTrackOperationResultsClient.Get method.

type AssetTrackOperationResultsClientGetResponse

type AssetTrackOperationResultsClientGetResponse struct {
	// An Asset Track resource.
	AssetTrack

	// AzureAsyncOperation contains the information returned from the Azure-AsyncOperation header response.
	AzureAsyncOperation *string

	// Location contains the information returned from the Location header response.
	Location *string

	// RetryAfter contains the information returned from the Retry-After header response.
	RetryAfter *int32
}

AssetTrackOperationResultsClientGetResponse contains the response from method AssetTrackOperationResultsClient.Get.

type AssetTrackOperationStatus

type AssetTrackOperationStatus struct {
	// REQUIRED; Operation identifier.
	Name *string

	// REQUIRED; Operation status.
	Status *string

	// Operation end time.
	EndTime *time.Time

	// The error detail.
	Error *ErrorDetail

	// Operation resource ID.
	ID *string

	// Operation start time.
	StartTime *time.Time
}

AssetTrackOperationStatus - Status of asset track operation.

func (AssetTrackOperationStatus) MarshalJSON

func (a AssetTrackOperationStatus) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AssetTrackOperationStatus.

func (*AssetTrackOperationStatus) UnmarshalJSON

func (a *AssetTrackOperationStatus) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AssetTrackOperationStatus.

type AssetTrackOperationStatusesClient

type AssetTrackOperationStatusesClient struct {
	// contains filtered or unexported fields
}

AssetTrackOperationStatusesClient contains the methods for the AssetTrackOperationStatuses group. Don't use this type directly, use NewAssetTrackOperationStatusesClient() instead.

func NewAssetTrackOperationStatusesClient

func NewAssetTrackOperationStatusesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AssetTrackOperationStatusesClient, error)

NewAssetTrackOperationStatusesClient creates a new instance of AssetTrackOperationStatusesClient with the specified values.

  • subscriptionID - The unique identifier for a Microsoft Azure subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*AssetTrackOperationStatusesClient) Get

func (client *AssetTrackOperationStatusesClient) Get(ctx context.Context, resourceGroupName string, accountName string, assetName string, trackName string, operationID string, options *AssetTrackOperationStatusesClientGetOptions) (AssetTrackOperationStatusesClientGetResponse, error)

Get - Get asset track operation status. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • assetName - The Asset name.
  • trackName - The Asset Track name.
  • operationID - Operation Id.
  • options - AssetTrackOperationStatusesClientGetOptions contains the optional parameters for the AssetTrackOperationStatusesClient.Get method.
Example (GetStatusOfAsynchronousOperationWhenItIsCompleted)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/asset-tracks-operation-status-by-id-terminal-state.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAssetTrackOperationStatusesClient().Get(ctx, "contoso", "contosomedia", "ClimbingMountRainer", "text1", "e78f8d40-7aaa-4f2f-8ae6-73987e7c5a08", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.AssetTrackOperationStatus = armmediaservices.AssetTrackOperationStatus{
// 	Name: to.Ptr("e78f8d40-7aaa-4f2f-8ae6-73987e7c5a08"),
// 	EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-08-01T00:00:30.000Z"); return t}()),
// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingMountRainer/tracks/text1/operationStatuses/e78f8d40-7aaa-4f2f-8ae6-73987e7c5a08"),
// 	StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-08-01T00:00:00.000Z"); return t}()),
// 	Status: to.Ptr("Succeeded"),
// }
Output:

Example (GetStatusOfAsynchronousOperationWhenItIsCompletedWithError)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/asset-tracks-operation-status-by-id-terminal-state-failed.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAssetTrackOperationStatusesClient().Get(ctx, "contoso", "contosomedia", "ClimbingMountRainer", "text1", "86835197-3b47-402e-b313-70b82eaba296", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.AssetTrackOperationStatus = armmediaservices.AssetTrackOperationStatus{
// 	Name: to.Ptr("86835197-3b47-402e-b313-70b82eaba296"),
// 	EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-08-01T00:00:30.000Z"); return t}()),
// 	Error: &armmediaservices.ErrorDetail{
// 		Code: to.Ptr("ClientError"),
// 		Message: to.Ptr("Error while parsing WEBVTT file and creating CMFT header."),
// 	},
// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingMountRainer/tracks/text1/operationStatuses/86835197-3b47-402e-b313-70b82eaba296"),
// 	StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-08-01T00:00:00.000Z"); return t}()),
// 	Status: to.Ptr("Failed"),
// }
Output:

Example (GetStatusOfAsynchronousOperationWhenItIsOngoing)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/asset-tracks-operation-status-by-id-non-terminal-state.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAssetTrackOperationStatusesClient().Get(ctx, "contoso", "contosomedia", "ClimbingMountRainer", "text1", "5827d9a1-1fb4-4e54-ac40-8eeed9b862c8", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.AssetTrackOperationStatus = armmediaservices.AssetTrackOperationStatus{
// 	Name: to.Ptr("5827d9a1-1fb4-4e54-ac40-8eeed9b862c8"),
// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingMountRainer/tracks/text1/operationStatuses/5827d9a1-1fb4-4e54-ac40-8eeed9b862c8"),
// 	StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-08-01T00:00:00.000Z"); return t}()),
// 	Status: to.Ptr("InProgress"),
// }
Output:

type AssetTrackOperationStatusesClientGetOptions

type AssetTrackOperationStatusesClientGetOptions struct {
}

AssetTrackOperationStatusesClientGetOptions contains the optional parameters for the AssetTrackOperationStatusesClient.Get method.

type AssetTrackOperationStatusesClientGetResponse

type AssetTrackOperationStatusesClientGetResponse struct {
	// Status of asset track operation.
	AssetTrackOperationStatus
}

AssetTrackOperationStatusesClientGetResponse contains the response from method AssetTrackOperationStatusesClient.Get.

type AssetTrackProperties

type AssetTrackProperties struct {
	// Detailed information about a track in the asset.
	Track TrackBaseClassification

	// READ-ONLY; Provisioning state of the asset track.
	ProvisioningState *ProvisioningState
}

AssetTrackProperties - Properties of a video, audio or text track in the asset.

func (AssetTrackProperties) MarshalJSON

func (a AssetTrackProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AssetTrackProperties.

func (*AssetTrackProperties) UnmarshalJSON

func (a *AssetTrackProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AssetTrackProperties.

type AssetsClient

type AssetsClient struct {
	// contains filtered or unexported fields
}

AssetsClient contains the methods for the Assets group. Don't use this type directly, use NewAssetsClient() instead.

func NewAssetsClient

func NewAssetsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AssetsClient, error)

NewAssetsClient creates a new instance of AssetsClient with the specified values.

  • subscriptionID - The unique identifier for a Microsoft Azure subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*AssetsClient) CreateOrUpdate

func (client *AssetsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, assetName string, parameters Asset, options *AssetsClientCreateOrUpdateOptions) (AssetsClientCreateOrUpdateResponse, error)

CreateOrUpdate - Creates or updates an Asset in the Media Services account If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • assetName - The Asset name.
  • parameters - The request parameters
  • options - AssetsClientCreateOrUpdateOptions contains the optional parameters for the AssetsClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/assets-create.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAssetsClient().CreateOrUpdate(ctx, "contoso", "contosomedia", "ClimbingMountLogan", armmediaservices.Asset{
	Properties: &armmediaservices.AssetProperties{
		Description:        to.Ptr("A documentary showing the ascent of Mount Logan"),
		StorageAccountName: to.Ptr("storage0"),
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.Asset = armmediaservices.Asset{
// 	Name: to.Ptr("ClimbingMountLogan"),
// 	Type: to.Ptr("Microsoft.Media/mediaservices/assets"),
// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingMountLogan"),
// 	Properties: &armmediaservices.AssetProperties{
// 		Description: to.Ptr("A documentary showing the ascent of Mount Logan"),
// 		AssetID: to.Ptr("09194258-36ba-4403-abb3-68780e6bc545"),
// 		Container: to.Ptr("asset-09194258-36ba-4403-abb3-68780e6bc545"),
// 		Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-08T18:29:26.080Z"); return t}()),
// 		LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-08T18:29:26.107Z"); return t}()),
// 		StorageAccountName: to.Ptr("storage0"),
// 		StorageEncryptionFormat: to.Ptr(armmediaservices.AssetStorageEncryptionFormatNone),
// 	},
// }
Output:

func (*AssetsClient) Delete

func (client *AssetsClient) Delete(ctx context.Context, resourceGroupName string, accountName string, assetName string, options *AssetsClientDeleteOptions) (AssetsClientDeleteResponse, error)

Delete - Deletes an Asset in the Media Services account If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • assetName - The Asset name.
  • options - AssetsClientDeleteOptions contains the optional parameters for the AssetsClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/assets-delete.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewAssetsClient().Delete(ctx, "contoso", "contosomedia", "ClimbingMountAdams", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*AssetsClient) Get

func (client *AssetsClient) Get(ctx context.Context, resourceGroupName string, accountName string, assetName string, options *AssetsClientGetOptions) (AssetsClientGetResponse, error)

Get - Get the details of an Asset in the Media Services account If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • assetName - The Asset name.
  • options - AssetsClientGetOptions contains the optional parameters for the AssetsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/assets-get-by-name.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAssetsClient().Get(ctx, "contoso", "contosomedia", "ClimbingMountAdams", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.Asset = armmediaservices.Asset{
// 	Name: to.Ptr("ClimbingMountAdams"),
// 	Type: to.Ptr("Microsoft.Media/mediaservices/assets"),
// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingMountAdams"),
// 	Properties: &armmediaservices.AssetProperties{
// 		Description: to.Ptr("A documentary showing the ascent of Mount Adams"),
// 		AlternateID: to.Ptr("CLIMB00002"),
// 		AssetID: to.Ptr("1b648c1a-2268-461d-a1da-742bde23db40"),
// 		Container: to.Ptr("asset-1b648c1a-2268-461d-a1da-742bde23db40"),
// 		Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2013-02-01T00:00:00.000Z"); return t}()),
// 		LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-01T00:00:00.000Z"); return t}()),
// 		StorageEncryptionFormat: to.Ptr(armmediaservices.AssetStorageEncryptionFormatNone),
// 	},
// }
Output:

func (*AssetsClient) GetEncryptionKey

func (client *AssetsClient) GetEncryptionKey(ctx context.Context, resourceGroupName string, accountName string, assetName string, options *AssetsClientGetEncryptionKeyOptions) (AssetsClientGetEncryptionKeyResponse, error)

GetEncryptionKey - Gets the Asset storage encryption keys used to decrypt content created by version 2 of the Media Services API If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • assetName - The Asset name.
  • options - AssetsClientGetEncryptionKeyOptions contains the optional parameters for the AssetsClient.GetEncryptionKey method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/assets-get-encryption-keys.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAssetsClient().GetEncryptionKey(ctx, "contoso", "contosomedia", "ClimbingMountSaintHelens", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.StorageEncryptedAssetDecryptionData = armmediaservices.StorageEncryptedAssetDecryptionData{
// 	AssetFileEncryptionMetadata: []*armmediaservices.AssetFileEncryptionMetadata{
// 		{
// 			AssetFileID: to.Ptr("a9536fa7-bd5d-4f84-a137-d1290982fe95"),
// 			AssetFileName: to.Ptr("AssetFile0"),
// 			InitializationVector: to.Ptr("-988929866"),
// 		},
// 		{
// 			AssetFileID: to.Ptr("f4060046-94ac-422d-824c-3f1d6aa3ecf2"),
// 			AssetFileName: to.Ptr("AssetFile1"),
// 			InitializationVector: to.Ptr("1604993689"),
// 		},
// 		{
// 			AssetFileID: to.Ptr("485968d3-ddae-4b13-98e7-901201a9620b"),
// 			AssetFileName: to.Ptr("AssetFile2"),
// 			InitializationVector: to.Ptr("100082635"),
// 	}},
// 	Key: []byte("AAAAAAAAAAAAAAAAAAAAAA=="),
// }
Output:

func (*AssetsClient) ListContainerSas

func (client *AssetsClient) ListContainerSas(ctx context.Context, resourceGroupName string, accountName string, assetName string, parameters ListContainerSasInput, options *AssetsClientListContainerSasOptions) (AssetsClientListContainerSasResponse, error)

ListContainerSas - Lists storage container URLs with shared access signatures (SAS) for uploading and downloading Asset content. The signatures are derived from the storage account keys. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • assetName - The Asset name.
  • parameters - The request parameters
  • options - AssetsClientListContainerSasOptions contains the optional parameters for the AssetsClient.ListContainerSas method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/assets-list-sas-urls.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAssetsClient().ListContainerSas(ctx, "contoso", "contosomedia", "ClimbingMountBaker", armmediaservices.ListContainerSasInput{
	ExpiryTime:  to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-01-01T10:00:00.007Z"); return t }()),
	Permissions: to.Ptr(armmediaservices.AssetContainerPermissionReadWrite),
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.AssetContainerSas = armmediaservices.AssetContainerSas{
// 	AssetContainerSasUrls: []*string{
// 		to.Ptr("https://storage0.blob.core.windows.net/asset-89af1750-e681-4fbe-8c4c-9a5567867a6b?sr=b&sig=<secret-value-from-key-1>&se=2018-01-01T10:00:00Z&sp=lrw"),
// 		to.Ptr("https://storage0.blob.core.windows.net/asset-89af1750-e681-4fbe-8c4c-9a5567867a6b?sr=b&sig=<secret-value-from-key-2>&se=2018-01-01T10:00:00Z&sp=lrw")},
// 	}
Output:

func (*AssetsClient) ListStreamingLocators

func (client *AssetsClient) ListStreamingLocators(ctx context.Context, resourceGroupName string, accountName string, assetName string, options *AssetsClientListStreamingLocatorsOptions) (AssetsClientListStreamingLocatorsResponse, error)

ListStreamingLocators - Lists Streaming Locators which are associated with this asset. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • assetName - The Asset name.
  • options - AssetsClientListStreamingLocatorsOptions contains the optional parameters for the AssetsClient.ListStreamingLocators method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/assets-list-streaming-locators.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAssetsClient().ListStreamingLocators(ctx, "contoso", "contosomedia", "ClimbingMountSaintHelens", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ListStreamingLocatorsResponse = armmediaservices.ListStreamingLocatorsResponse{
// 	StreamingLocators: []*armmediaservices.AssetStreamingLocator{
// 		{
// 			Name: to.Ptr("secureStreamingLocator"),
// 			AssetName: to.Ptr("ClimbingMountSaintHelens"),
// 			Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-08T18:29:26.972Z"); return t}()),
// 			EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "9999-12-31T23:59:59.999Z"); return t}()),
// 			StreamingLocatorID: to.Ptr("36b74ce3-20b4-4de0-84f1-97e9138e886c"),
// 			StreamingPolicyName: to.Ptr("secureStreamingPolicy"),
// 		},
// 		{
// 			Name: to.Ptr("clearStreamingLocator"),
// 			AssetName: to.Ptr("ClimbingMountSaintHelens"),
// 			Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-08T18:29:26.948Z"); return t}()),
// 			EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "9999-12-31T23:59:59.999Z"); return t}()),
// 			StreamingLocatorID: to.Ptr("3e8d9ac3-50f6-4f6d-8482-078ceb56f23a"),
// 			StreamingPolicyName: to.Ptr("clearStreamingPolicy"),
// 	}},
// }
Output:

func (*AssetsClient) NewListPager

func (client *AssetsClient) NewListPager(resourceGroupName string, accountName string, options *AssetsClientListOptions) *runtime.Pager[AssetsClientListResponse]

NewListPager - List Assets in the Media Services account with optional filtering and ordering

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • options - AssetsClientListOptions contains the optional parameters for the AssetsClient.NewListPager method.
Example (ListAllAssets)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/assets-list-all.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewAssetsClient().NewListPager("contoso", "contosomedia", &armmediaservices.AssetsClientListOptions{Filter: nil,
	Top:     nil,
	Orderby: nil,
})
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.AssetCollection = armmediaservices.AssetCollection{
	// 	Value: []*armmediaservices.Asset{
	// 		{
	// 			Name: to.Ptr("ClimbingLittleTahoma"),
	// 			Type: to.Ptr("Microsoft.Media/mediaservices/assets"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingLittleTahoma"),
	// 			Properties: &armmediaservices.AssetProperties{
	// 				Description: to.Ptr("A documentary showing the ascent of Little Tahoma"),
	// 				AlternateID: to.Ptr("CLIMB00003"),
	// 				AssetID: to.Ptr("e6c7ee55-d1f5-48bc-9c36-2d2157aadbbe"),
	// 				Container: to.Ptr("asset-e6c7ee55-d1f5-48bc-9c36-2d2157aadbbe"),
	// 				Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2012-04-01T00:00:00.000Z"); return t}()),
	// 				LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-01T00:00:00.000Z"); return t}()),
	// 				StorageEncryptionFormat: to.Ptr(armmediaservices.AssetStorageEncryptionFormatNone),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("ClimbingMountAdams"),
	// 			Type: to.Ptr("Microsoft.Media/mediaservices/assets"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingMountAdams"),
	// 			Properties: &armmediaservices.AssetProperties{
	// 				Description: to.Ptr("A documentary showing the ascent of Mount Adams"),
	// 				AlternateID: to.Ptr("CLIMB00002"),
	// 				AssetID: to.Ptr("1b648c1a-2268-461d-a1da-742bde23db40"),
	// 				Container: to.Ptr("asset-1b648c1a-2268-461d-a1da-742bde23db40"),
	// 				Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2013-02-01T00:00:00.000Z"); return t}()),
	// 				LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-01T00:00:00.000Z"); return t}()),
	// 				StorageEncryptionFormat: to.Ptr(armmediaservices.AssetStorageEncryptionFormatNone),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("ClimbingMountBaker"),
	// 			Type: to.Ptr("Microsoft.Media/mediaservices/assets"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingMountBaker"),
	// 			Properties: &armmediaservices.AssetProperties{
	// 				Description: to.Ptr("A documentary showing the ascent of Mount Baker"),
	// 				AlternateID: to.Ptr("CLIMB00004"),
	// 				AssetID: to.Ptr("89af1750-e681-4fbe-8c4c-9a5567867a6b"),
	// 				Container: to.Ptr("asset-89af1750-e681-4fbe-8c4c-9a5567867a6b"),
	// 				Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2011-02-01T00:00:00.000Z"); return t}()),
	// 				LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-01T00:00:00.000Z"); return t}()),
	// 				StorageEncryptionFormat: to.Ptr(armmediaservices.AssetStorageEncryptionFormatNone),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("ClimbingMountRainer"),
	// 			Type: to.Ptr("Microsoft.Media/mediaservices/assets"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingMountRainer"),
	// 			Properties: &armmediaservices.AssetProperties{
	// 				Description: to.Ptr("descClimbingMountRainer"),
	// 				AlternateID: to.Ptr("altClimbingMountRainer"),
	// 				AssetID: to.Ptr("258878ef-fe05-4518-988f-052e86dc19f6"),
	// 				Container: to.Ptr("testasset0"),
	// 				Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-08T18:29:24.394Z"); return t}()),
	// 				LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-08T21:29:24.394Z"); return t}()),
	// 				StorageAccountName: to.Ptr("storage0"),
	// 				StorageEncryptionFormat: to.Ptr(armmediaservices.AssetStorageEncryptionFormatNone),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("ClimbingMountRainier"),
	// 			Type: to.Ptr("Microsoft.Media/mediaservices/assets"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingMountRainier"),
	// 			Properties: &armmediaservices.AssetProperties{
	// 				Description: to.Ptr("A documentary showing the ascent of Mount Rainier"),
	// 				AlternateID: to.Ptr("CLIMB00001"),
	// 				AssetID: to.Ptr("f8eea45c-b814-44c2-9c42-a5174ebdee4c"),
	// 				Container: to.Ptr("asset-f8eea45c-b814-44c2-9c42-a5174ebdee4c"),
	// 				Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2012-11-01T00:00:00.000Z"); return t}()),
	// 				LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2012-11-01T00:00:00.000Z"); return t}()),
	// 				StorageEncryptionFormat: to.Ptr(armmediaservices.AssetStorageEncryptionFormatNone),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("ClimbingMountSaintHelens"),
	// 			Type: to.Ptr("Microsoft.Media/mediaservices/assets"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingMountSaintHelens"),
	// 			Properties: &armmediaservices.AssetProperties{
	// 				Description: to.Ptr("A documentary showing the ascent of Saint Helens"),
	// 				AlternateID: to.Ptr("CLIMB00005"),
	// 				AssetID: to.Ptr("14d58c40-ec1f-446c-b041-f5cff949bd1d"),
	// 				Container: to.Ptr("asset-14d58c40-ec1f-446c-b041-f5cff949bd1d"),
	// 				Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2013-03-01T00:00:00.000Z"); return t}()),
	// 				LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2013-04-01T00:00:00.000Z"); return t}()),
	// 				StorageEncryptionFormat: to.Ptr(armmediaservices.AssetStorageEncryptionFormatMediaStorageClientEncryption),
	// 			},
	// 	}},
	// }
}
Output:

Example (ListAssetCreatedInADateRange)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/assets-list-in-date-range.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewAssetsClient().NewListPager("contoso", "contosomedia", &armmediaservices.AssetsClientListOptions{Filter: to.Ptr("properties/created gt 2012-06-01 and properties/created lt 2013-07-01"),
	Top:     nil,
	Orderby: to.Ptr("properties/created"),
})
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.AssetCollection = armmediaservices.AssetCollection{
	// 	Value: []*armmediaservices.Asset{
	// 		{
	// 			Name: to.Ptr("ClimbingMountRainier"),
	// 			Type: to.Ptr("Microsoft.Media/mediaservices/assets"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingMountRainier"),
	// 			Properties: &armmediaservices.AssetProperties{
	// 				Description: to.Ptr("A documentary showing the ascent of Mount Rainier"),
	// 				AlternateID: to.Ptr("CLIMB00001"),
	// 				AssetID: to.Ptr("f8eea45c-b814-44c2-9c42-a5174ebdee4c"),
	// 				Container: to.Ptr("asset-f8eea45c-b814-44c2-9c42-a5174ebdee4c"),
	// 				Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2012-11-01T00:00:00.000Z"); return t}()),
	// 				LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2012-11-01T00:00:00.000Z"); return t}()),
	// 				StorageEncryptionFormat: to.Ptr(armmediaservices.AssetStorageEncryptionFormatNone),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("ClimbingMountAdams"),
	// 			Type: to.Ptr("Microsoft.Media/mediaservices/assets"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingMountAdams"),
	// 			Properties: &armmediaservices.AssetProperties{
	// 				Description: to.Ptr("A documentary showing the ascent of Mount Adams"),
	// 				AlternateID: to.Ptr("CLIMB00002"),
	// 				AssetID: to.Ptr("1b648c1a-2268-461d-a1da-742bde23db40"),
	// 				Container: to.Ptr("asset-1b648c1a-2268-461d-a1da-742bde23db40"),
	// 				Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2013-02-01T00:00:00.000Z"); return t}()),
	// 				LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-01T00:00:00.000Z"); return t}()),
	// 				StorageEncryptionFormat: to.Ptr(armmediaservices.AssetStorageEncryptionFormatNone),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("ClimbingMountSaintHelens"),
	// 			Type: to.Ptr("Microsoft.Media/mediaservices/assets"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingMountSaintHelens"),
	// 			Properties: &armmediaservices.AssetProperties{
	// 				Description: to.Ptr("A documentary showing the ascent of Saint Helens"),
	// 				AlternateID: to.Ptr("CLIMB00005"),
	// 				AssetID: to.Ptr("14d58c40-ec1f-446c-b041-f5cff949bd1d"),
	// 				Container: to.Ptr("asset-14d58c40-ec1f-446c-b041-f5cff949bd1d"),
	// 				Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2013-03-01T00:00:00.000Z"); return t}()),
	// 				LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2013-04-01T00:00:00.000Z"); return t}()),
	// 				StorageEncryptionFormat: to.Ptr(armmediaservices.AssetStorageEncryptionFormatMediaStorageClientEncryption),
	// 			},
	// 	}},
	// }
}
Output:

Example (ListAssetOrderedByDate)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/assets-list-by-date.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewAssetsClient().NewListPager("contoso", "contosomedia", &armmediaservices.AssetsClientListOptions{Filter: nil,
	Top:     nil,
	Orderby: to.Ptr("properties/created"),
})
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.AssetCollection = armmediaservices.AssetCollection{
	// 	Value: []*armmediaservices.Asset{
	// 		{
	// 			Name: to.Ptr("ClimbingMountBaker"),
	// 			Type: to.Ptr("Microsoft.Media/mediaservices/assets"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingMountBaker"),
	// 			Properties: &armmediaservices.AssetProperties{
	// 				Description: to.Ptr("A documentary showing the ascent of Mount Baker"),
	// 				AlternateID: to.Ptr("CLIMB00004"),
	// 				AssetID: to.Ptr("89af1750-e681-4fbe-8c4c-9a5567867a6b"),
	// 				Container: to.Ptr("asset-89af1750-e681-4fbe-8c4c-9a5567867a6b"),
	// 				Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2011-02-01T00:00:00.000Z"); return t}()),
	// 				LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-01T00:00:00.000Z"); return t}()),
	// 				StorageEncryptionFormat: to.Ptr(armmediaservices.AssetStorageEncryptionFormatNone),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("ClimbingLittleTahoma"),
	// 			Type: to.Ptr("Microsoft.Media/mediaservices/assets"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingLittleTahoma"),
	// 			Properties: &armmediaservices.AssetProperties{
	// 				Description: to.Ptr("A documentary showing the ascent of Little Tahoma"),
	// 				AlternateID: to.Ptr("CLIMB00003"),
	// 				AssetID: to.Ptr("e6c7ee55-d1f5-48bc-9c36-2d2157aadbbe"),
	// 				Container: to.Ptr("asset-e6c7ee55-d1f5-48bc-9c36-2d2157aadbbe"),
	// 				Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2012-04-01T00:00:00.000Z"); return t}()),
	// 				LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-01T00:00:00.000Z"); return t}()),
	// 				StorageEncryptionFormat: to.Ptr(armmediaservices.AssetStorageEncryptionFormatNone),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("ClimbingMountRainier"),
	// 			Type: to.Ptr("Microsoft.Media/mediaservices/assets"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingMountRainier"),
	// 			Properties: &armmediaservices.AssetProperties{
	// 				Description: to.Ptr("A documentary showing the ascent of Mount Rainier"),
	// 				AlternateID: to.Ptr("CLIMB00001"),
	// 				AssetID: to.Ptr("f8eea45c-b814-44c2-9c42-a5174ebdee4c"),
	// 				Container: to.Ptr("asset-f8eea45c-b814-44c2-9c42-a5174ebdee4c"),
	// 				Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2012-11-01T00:00:00.000Z"); return t}()),
	// 				LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2012-11-01T00:00:00.000Z"); return t}()),
	// 				StorageEncryptionFormat: to.Ptr(armmediaservices.AssetStorageEncryptionFormatNone),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("ClimbingMountAdams"),
	// 			Type: to.Ptr("Microsoft.Media/mediaservices/assets"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingMountAdams"),
	// 			Properties: &armmediaservices.AssetProperties{
	// 				Description: to.Ptr("A documentary showing the ascent of Mount Adams"),
	// 				AlternateID: to.Ptr("CLIMB00002"),
	// 				AssetID: to.Ptr("1b648c1a-2268-461d-a1da-742bde23db40"),
	// 				Container: to.Ptr("asset-1b648c1a-2268-461d-a1da-742bde23db40"),
	// 				Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2013-02-01T00:00:00.000Z"); return t}()),
	// 				LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-01T00:00:00.000Z"); return t}()),
	// 				StorageEncryptionFormat: to.Ptr(armmediaservices.AssetStorageEncryptionFormatNone),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("ClimbingMountSaintHelens"),
	// 			Type: to.Ptr("Microsoft.Media/mediaservices/assets"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingMountSaintHelens"),
	// 			Properties: &armmediaservices.AssetProperties{
	// 				Description: to.Ptr("A documentary showing the ascent of Saint Helens"),
	// 				AlternateID: to.Ptr("CLIMB00005"),
	// 				AssetID: to.Ptr("14d58c40-ec1f-446c-b041-f5cff949bd1d"),
	// 				Container: to.Ptr("asset-14d58c40-ec1f-446c-b041-f5cff949bd1d"),
	// 				Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2013-03-01T00:00:00.000Z"); return t}()),
	// 				LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2013-04-01T00:00:00.000Z"); return t}()),
	// 				StorageEncryptionFormat: to.Ptr(armmediaservices.AssetStorageEncryptionFormatMediaStorageClientEncryption),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("ClimbingMountRainer"),
	// 			Type: to.Ptr("Microsoft.Media/mediaservices/assets"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingMountRainer"),
	// 			Properties: &armmediaservices.AssetProperties{
	// 				Description: to.Ptr("descClimbingMountRainer"),
	// 				AlternateID: to.Ptr("altClimbingMountRainer"),
	// 				AssetID: to.Ptr("8cdacfe5-8473-413a-9aec-dd2a478b37c8"),
	// 				Container: to.Ptr("testasset0"),
	// 				Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-08T18:29:25.051Z"); return t}()),
	// 				LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-08T21:29:25.051Z"); return t}()),
	// 				StorageAccountName: to.Ptr("storage0"),
	// 				StorageEncryptionFormat: to.Ptr(armmediaservices.AssetStorageEncryptionFormatNone),
	// 			},
	// 	}},
	// }
}
Output:

func (*AssetsClient) Update

func (client *AssetsClient) Update(ctx context.Context, resourceGroupName string, accountName string, assetName string, parameters Asset, options *AssetsClientUpdateOptions) (AssetsClientUpdateResponse, error)

Update - Updates an existing Asset in the Media Services account If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • assetName - The Asset name.
  • parameters - The request parameters
  • options - AssetsClientUpdateOptions contains the optional parameters for the AssetsClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/assets-update.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAssetsClient().Update(ctx, "contoso", "contosomedia", "ClimbingMountBaker", armmediaservices.Asset{
	Properties: &armmediaservices.AssetProperties{
		Description: to.Ptr("A documentary showing the ascent of Mount Baker in HD"),
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.Asset = armmediaservices.Asset{
// 	Name: to.Ptr("ClimbingMountBaker"),
// 	Type: to.Ptr("Microsoft.Media/mediaservices/assets"),
// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingMountBaker"),
// 	Properties: &armmediaservices.AssetProperties{
// 		Description: to.Ptr("A documentary showing the ascent of Mount Baker in HD"),
// 		AlternateID: to.Ptr("CLIMB00004"),
// 		AssetID: to.Ptr("89af1750-e681-4fbe-8c4c-9a5567867a6b"),
// 		Container: to.Ptr("asset-89af1750-e681-4fbe-8c4c-9a5567867a6b"),
// 		Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2011-02-01T00:00:00.000Z"); return t}()),
// 		LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-08T18:29:26.503Z"); return t}()),
// 		StorageEncryptionFormat: to.Ptr(armmediaservices.AssetStorageEncryptionFormatNone),
// 	},
// }
Output:

type AssetsClientCreateOrUpdateOptions

type AssetsClientCreateOrUpdateOptions struct {
}

AssetsClientCreateOrUpdateOptions contains the optional parameters for the AssetsClient.CreateOrUpdate method.

type AssetsClientCreateOrUpdateResponse

type AssetsClientCreateOrUpdateResponse struct {
	// An Asset.
	Asset
}

AssetsClientCreateOrUpdateResponse contains the response from method AssetsClient.CreateOrUpdate.

type AssetsClientDeleteOptions

type AssetsClientDeleteOptions struct {
}

AssetsClientDeleteOptions contains the optional parameters for the AssetsClient.Delete method.

type AssetsClientDeleteResponse

type AssetsClientDeleteResponse struct {
}

AssetsClientDeleteResponse contains the response from method AssetsClient.Delete.

type AssetsClientGetEncryptionKeyOptions

type AssetsClientGetEncryptionKeyOptions struct {
}

AssetsClientGetEncryptionKeyOptions contains the optional parameters for the AssetsClient.GetEncryptionKey method.

type AssetsClientGetEncryptionKeyResponse

type AssetsClientGetEncryptionKeyResponse struct {
	// Data needed to decrypt asset files encrypted with legacy storage encryption.
	StorageEncryptedAssetDecryptionData
}

AssetsClientGetEncryptionKeyResponse contains the response from method AssetsClient.GetEncryptionKey.

type AssetsClientGetOptions

type AssetsClientGetOptions struct {
}

AssetsClientGetOptions contains the optional parameters for the AssetsClient.Get method.

type AssetsClientGetResponse

type AssetsClientGetResponse struct {
	// An Asset.
	Asset
}

AssetsClientGetResponse contains the response from method AssetsClient.Get.

type AssetsClientListContainerSasOptions

type AssetsClientListContainerSasOptions struct {
}

AssetsClientListContainerSasOptions contains the optional parameters for the AssetsClient.ListContainerSas method.

type AssetsClientListContainerSasResponse

type AssetsClientListContainerSasResponse struct {
	// The Asset Storage container SAS URLs.
	AssetContainerSas
}

AssetsClientListContainerSasResponse contains the response from method AssetsClient.ListContainerSas.

type AssetsClientListOptions

type AssetsClientListOptions struct {
	// Restricts the set of items returned.
	Filter *string

	// Specifies the key by which the result collection should be ordered.
	Orderby *string

	// Specifies a non-negative integer n that limits the number of items returned from a collection. The service returns the
	// number of available items up to but not greater than the specified value n.
	Top *int32
}

AssetsClientListOptions contains the optional parameters for the AssetsClient.NewListPager method.

type AssetsClientListResponse

type AssetsClientListResponse struct {
	// A collection of Asset items.
	AssetCollection
}

AssetsClientListResponse contains the response from method AssetsClient.NewListPager.

type AssetsClientListStreamingLocatorsOptions

type AssetsClientListStreamingLocatorsOptions struct {
}

AssetsClientListStreamingLocatorsOptions contains the optional parameters for the AssetsClient.ListStreamingLocators method.

type AssetsClientListStreamingLocatorsResponse

type AssetsClientListStreamingLocatorsResponse struct {
	// The Streaming Locators associated with this Asset.
	ListStreamingLocatorsResponse
}

AssetsClientListStreamingLocatorsResponse contains the response from method AssetsClient.ListStreamingLocators.

type AssetsClientUpdateOptions

type AssetsClientUpdateOptions struct {
}

AssetsClientUpdateOptions contains the optional parameters for the AssetsClient.Update method.

type AssetsClientUpdateResponse

type AssetsClientUpdateResponse struct {
	// An Asset.
	Asset
}

AssetsClientUpdateResponse contains the response from method AssetsClient.Update.

type AsyncOperationResult added in v3.1.0

type AsyncOperationResult struct {
	// The error object
	Error *ErrorDetail

	// Operation Id of the async operation.
	Name *string

	// Operation status of the async operation.
	Status *AsyncOperationStatus
}

AsyncOperationResult - The status of an async operation.

func (AsyncOperationResult) MarshalJSON added in v3.1.0

func (a AsyncOperationResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AsyncOperationResult.

func (*AsyncOperationResult) UnmarshalJSON added in v3.1.0

func (a *AsyncOperationResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AsyncOperationResult.

type AsyncOperationStatus added in v3.1.0

type AsyncOperationStatus string

AsyncOperationStatus - Operation status of the async operation.

const (
	AsyncOperationStatusFailed     AsyncOperationStatus = "Failed"
	AsyncOperationStatusInProgress AsyncOperationStatus = "InProgress"
	AsyncOperationStatusSucceeded  AsyncOperationStatus = "Succeeded"
)

func PossibleAsyncOperationStatusValues added in v3.1.0

func PossibleAsyncOperationStatusValues() []AsyncOperationStatus

PossibleAsyncOperationStatusValues returns the possible values for the AsyncOperationStatus const type.

type AttributeFilter

type AttributeFilter string

AttributeFilter - The type of AttributeFilter to apply to the TrackAttribute in order to select the tracks.

const (
	// AttributeFilterAll - All tracks will be included.
	AttributeFilterAll AttributeFilter = "All"
	// AttributeFilterBottom - The first track will be included when the attribute is sorted in ascending order. Generally used
	// to select the smallest bitrate.
	AttributeFilterBottom AttributeFilter = "Bottom"
	// AttributeFilterTop - The first track will be included when the attribute is sorted in descending order. Generally used
	// to select the largest bitrate.
	AttributeFilterTop AttributeFilter = "Top"
	// AttributeFilterValueEquals - Any tracks that have an attribute equal to the value given will be included.
	AttributeFilterValueEquals AttributeFilter = "ValueEquals"
)

func PossibleAttributeFilterValues

func PossibleAttributeFilterValues() []AttributeFilter

PossibleAttributeFilterValues returns the possible values for the AttributeFilter const type.

type Audio

type Audio struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string

	// The bitrate, in bits per second, of the output encoded audio.
	Bitrate *int32

	// The number of channels in the audio.
	Channels *int32

	// An optional label for the codec. The label can be used to control muxing behavior.
	Label *string

	// The sampling rate to use for encoding in hertz.
	SamplingRate *int32
}

Audio - Defines the common properties for all audio codecs.

func (*Audio) GetAudio

func (a *Audio) GetAudio() *Audio

GetAudio implements the AudioClassification interface for type Audio.

func (*Audio) GetCodec

func (a *Audio) GetCodec() *Codec

GetCodec implements the CodecClassification interface for type Audio.

func (Audio) MarshalJSON

func (a Audio) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Audio.

func (*Audio) UnmarshalJSON

func (a *Audio) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Audio.

type AudioAnalysisMode

type AudioAnalysisMode string

AudioAnalysisMode - Determines the set of audio analysis operations to be performed. If unspecified, the Standard AudioAnalysisMode would be chosen.

const (
	// AudioAnalysisModeBasic - This mode performs speech-to-text transcription and generation of a VTT subtitle/caption file.
	// The output of this mode includes an Insights JSON file including only the keywords, transcription,and timing information.
	// Automatic language detection and speaker diarization are not included in this mode.
	AudioAnalysisModeBasic AudioAnalysisMode = "Basic"
	// AudioAnalysisModeStandard - Performs all operations included in the Basic mode, additionally performing language detection
	// and speaker diarization.
	AudioAnalysisModeStandard AudioAnalysisMode = "Standard"
)

func PossibleAudioAnalysisModeValues

func PossibleAudioAnalysisModeValues() []AudioAnalysisMode

PossibleAudioAnalysisModeValues returns the possible values for the AudioAnalysisMode const type.

type AudioAnalyzerPreset

type AudioAnalyzerPreset struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string

	// The language for the audio payload in the input using the BCP-47 format of 'language tag-region' (e.g: 'en-US'). If you
	// know the language of your content, it is recommended that you specify it. The
	// language must be specified explicitly for AudioAnalysisMode::Basic, since automatic language detection is not included
	// in basic mode. If the language isn't specified or set to null, automatic language
	// detection will choose the first language detected and process with the selected language for the duration of the file.
	// It does not currently support dynamically switching between languages after the
	// first language is detected. The automatic detection works best with audio recordings with clearly discernable speech. If
	// automatic detection fails to find the language, transcription would fallback to
	// 'en-US'." The list of supported languages is available here: https://go.microsoft.com/fwlink/?linkid=2109463
	AudioLanguage *string

	// Dictionary containing key value pairs for parameters not exposed in the preset itself
	ExperimentalOptions map[string]*string

	// Determines the set of audio analysis operations to be performed. If unspecified, the Standard AudioAnalysisMode would be
	// chosen.
	Mode *AudioAnalysisMode
}

AudioAnalyzerPreset - The Audio Analyzer preset applies a pre-defined set of AI-based analysis operations, including speech transcription. Currently, the preset supports processing of content with a single audio track.

func (*AudioAnalyzerPreset) GetAudioAnalyzerPreset

func (a *AudioAnalyzerPreset) GetAudioAnalyzerPreset() *AudioAnalyzerPreset

GetAudioAnalyzerPreset implements the AudioAnalyzerPresetClassification interface for type AudioAnalyzerPreset.

func (*AudioAnalyzerPreset) GetPreset

func (a *AudioAnalyzerPreset) GetPreset() *Preset

GetPreset implements the PresetClassification interface for type AudioAnalyzerPreset.

func (AudioAnalyzerPreset) MarshalJSON

func (a AudioAnalyzerPreset) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AudioAnalyzerPreset.

func (*AudioAnalyzerPreset) UnmarshalJSON

func (a *AudioAnalyzerPreset) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AudioAnalyzerPreset.

type AudioAnalyzerPresetClassification

type AudioAnalyzerPresetClassification interface {
	PresetClassification
	// GetAudioAnalyzerPreset returns the AudioAnalyzerPreset content of the underlying type.
	GetAudioAnalyzerPreset() *AudioAnalyzerPreset
}

AudioAnalyzerPresetClassification provides polymorphic access to related types. Call the interface's GetAudioAnalyzerPreset() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *AudioAnalyzerPreset, *VideoAnalyzerPreset

type AudioClassification

type AudioClassification interface {
	CodecClassification
	// GetAudio returns the Audio content of the underlying type.
	GetAudio() *Audio
}

AudioClassification provides polymorphic access to related types. Call the interface's GetAudio() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *AacAudio, *Audio, *DDAudio

type AudioOverlay

type AudioOverlay struct {
	// REQUIRED; The label of the job input which is to be used as an overlay. The Input must specify exactly one file. You can
	// specify an image file in JPG, PNG, GIF or BMP format, or an audio file (such as a WAV,
	// MP3, WMA or M4A file), or a video file. See https://aka.ms/mesformats for the complete list of supported audio and video
	// file formats.
	InputLabel *string

	// REQUIRED; The discriminator for derived types.
	ODataType *string

	// The gain level of audio in the overlay. The value should be in the range [0, 1.0]. The default is 1.0.
	AudioGainLevel *float64

	// The end position, with reference to the input video, at which the overlay ends. The value should be in ISO 8601 format.
	// For example, PT30S to end the overlay at 30 seconds into the input video. If not
	// specified or the value is greater than the input video duration, the overlay will be applied until the end of the input
	// video if the overlay media duration is greater than the input video duration,
	// else the overlay will last as long as the overlay media duration.
	End *string

	// The duration over which the overlay fades in onto the input video. The value should be in ISO 8601 duration format. If
	// not specified the default behavior is to have no fade in (same as PT0S).
	FadeInDuration *string

	// The duration over which the overlay fades out of the input video. The value should be in ISO 8601 duration format. If not
	// specified the default behavior is to have no fade out (same as PT0S).
	FadeOutDuration *string

	// The start position, with reference to the input video, at which the overlay starts. The value should be in ISO 8601 format.
	// For example, PT05S to start the overlay at 5 seconds into the input video.
	// If not specified the overlay starts from the beginning of the input video.
	Start *string
}

AudioOverlay - Describes the properties of an audio overlay.

func (*AudioOverlay) GetOverlay

func (a *AudioOverlay) GetOverlay() *Overlay

GetOverlay implements the OverlayClassification interface for type AudioOverlay.

func (AudioOverlay) MarshalJSON

func (a AudioOverlay) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AudioOverlay.

func (*AudioOverlay) UnmarshalJSON

func (a *AudioOverlay) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AudioOverlay.

type AudioTrack

type AudioTrack struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string

	// The DASH specific setting for the audio track.
	DashSettings *DashSettings

	// The display name of the audio track on a video player. In HLS, this maps to the NAME attribute of EXT-X-MEDIA.
	DisplayName *string

	// The file name to the source file. This file is located in the storage container of the asset.
	FileName *string

	// The HLS specific setting for the audio track.
	HlsSettings *HlsSettings

	// The RFC5646 language code for the audio track.
	LanguageCode *string

	// The MPEG-4 audio track ID for the audio track.
	Mpeg4TrackID *int32

	// READ-ONLY; The stream bit rate for the audio track.
	BitRate *int32
}

AudioTrack - Represents an audio track in the asset.

func (*AudioTrack) GetTrackBase

func (a *AudioTrack) GetTrackBase() *TrackBase

GetTrackBase implements the TrackBaseClassification interface for type AudioTrack.

func (AudioTrack) MarshalJSON

func (a AudioTrack) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AudioTrack.

func (*AudioTrack) UnmarshalJSON

func (a *AudioTrack) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AudioTrack.

type AudioTrackDescriptor

type AudioTrackDescriptor struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string

	// Optional designation for single channel audio tracks. Can be used to combine the tracks into stereo or multi-channel audio
	// tracks.
	ChannelMapping *ChannelMapping
}

AudioTrackDescriptor - A TrackSelection to select audio tracks.

func (*AudioTrackDescriptor) GetAudioTrackDescriptor

func (a *AudioTrackDescriptor) GetAudioTrackDescriptor() *AudioTrackDescriptor

GetAudioTrackDescriptor implements the AudioTrackDescriptorClassification interface for type AudioTrackDescriptor.

func (*AudioTrackDescriptor) GetTrackDescriptor

func (a *AudioTrackDescriptor) GetTrackDescriptor() *TrackDescriptor

GetTrackDescriptor implements the TrackDescriptorClassification interface for type AudioTrackDescriptor.

func (AudioTrackDescriptor) MarshalJSON

func (a AudioTrackDescriptor) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AudioTrackDescriptor.

func (*AudioTrackDescriptor) UnmarshalJSON

func (a *AudioTrackDescriptor) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AudioTrackDescriptor.

type AudioTrackDescriptorClassification

type AudioTrackDescriptorClassification interface {
	TrackDescriptorClassification
	// GetAudioTrackDescriptor returns the AudioTrackDescriptor content of the underlying type.
	GetAudioTrackDescriptor() *AudioTrackDescriptor
}

AudioTrackDescriptorClassification provides polymorphic access to related types. Call the interface's GetAudioTrackDescriptor() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *AudioTrackDescriptor, *SelectAudioTrackByAttribute, *SelectAudioTrackByID

type BlurType

type BlurType string

BlurType - Blur type

const (
	// BlurTypeBlack - Black: Black out filter
	BlurTypeBlack BlurType = "Black"
	// BlurTypeBox - Box: debug filter, bounding box only
	BlurTypeBox BlurType = "Box"
	// BlurTypeHigh - High: Confuse blur filter
	BlurTypeHigh BlurType = "High"
	// BlurTypeLow - Low: box-car blur filter
	BlurTypeLow BlurType = "Low"
	// BlurTypeMed - Med: Gaussian blur filter
	BlurTypeMed BlurType = "Med"
)

func PossibleBlurTypeValues

func PossibleBlurTypeValues() []BlurType

PossibleBlurTypeValues returns the possible values for the BlurType const type.

type BuiltInStandardEncoderPreset

type BuiltInStandardEncoderPreset struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string

	// REQUIRED; The built-in preset to be used for encoding videos.
	PresetName *EncoderNamedPreset

	// Optional configuration settings for encoder. Configurations is only supported for ContentAwareEncoding and H265ContentAwareEncoding
	// BuiltInStandardEncoderPreset.
	Configurations *PresetConfigurations
}

BuiltInStandardEncoderPreset - Describes a built-in preset for encoding the input video with the Standard Encoder.

func (*BuiltInStandardEncoderPreset) GetPreset

func (b *BuiltInStandardEncoderPreset) GetPreset() *Preset

GetPreset implements the PresetClassification interface for type BuiltInStandardEncoderPreset.

func (BuiltInStandardEncoderPreset) MarshalJSON

func (b BuiltInStandardEncoderPreset) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type BuiltInStandardEncoderPreset.

func (*BuiltInStandardEncoderPreset) UnmarshalJSON

func (b *BuiltInStandardEncoderPreset) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type BuiltInStandardEncoderPreset.

type CbcsDrmConfiguration

type CbcsDrmConfiguration struct {
	// FairPlay configurations
	FairPlay *StreamingPolicyFairPlayConfiguration

	// PlayReady configurations
	PlayReady *StreamingPolicyPlayReadyConfiguration

	// Widevine configurations
	Widevine *StreamingPolicyWidevineConfiguration
}

CbcsDrmConfiguration - Class to specify DRM configurations of CommonEncryptionCbcs scheme in Streaming Policy

func (CbcsDrmConfiguration) MarshalJSON

func (c CbcsDrmConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CbcsDrmConfiguration.

func (*CbcsDrmConfiguration) UnmarshalJSON

func (c *CbcsDrmConfiguration) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CbcsDrmConfiguration.

type CencDrmConfiguration

type CencDrmConfiguration struct {
	// PlayReady configurations
	PlayReady *StreamingPolicyPlayReadyConfiguration

	// Widevine configurations
	Widevine *StreamingPolicyWidevineConfiguration
}

CencDrmConfiguration - Class to specify DRM configurations of CommonEncryptionCenc scheme in Streaming Policy

func (CencDrmConfiguration) MarshalJSON

func (c CencDrmConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CencDrmConfiguration.

func (*CencDrmConfiguration) UnmarshalJSON

func (c *CencDrmConfiguration) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CencDrmConfiguration.

type ChannelMapping

type ChannelMapping string

ChannelMapping - Optional designation for single channel audio tracks. Can be used to combine the tracks into stereo or multi-channel audio tracks.

const (
	// ChannelMappingBackLeft - The Back Left Channel. Sometimes referred to as the Left Surround Channel.
	ChannelMappingBackLeft ChannelMapping = "BackLeft"
	// ChannelMappingBackRight - The Back Right Channel. Sometimes referred to as the Right Surround Channel.
	ChannelMappingBackRight ChannelMapping = "BackRight"
	// ChannelMappingCenter - The Center Channel.
	ChannelMappingCenter ChannelMapping = "Center"
	// ChannelMappingFrontLeft - The Front Left Channel.
	ChannelMappingFrontLeft ChannelMapping = "FrontLeft"
	// ChannelMappingFrontRight - The Front Right Channel.
	ChannelMappingFrontRight ChannelMapping = "FrontRight"
	// ChannelMappingLowFrequencyEffects - Low Frequency Effects Channel. Sometimes referred to as the subwoofer.
	ChannelMappingLowFrequencyEffects ChannelMapping = "LowFrequencyEffects"
	// ChannelMappingStereoLeft - The Left Stereo channel. Sometimes referred to as Down Mix Left.
	ChannelMappingStereoLeft ChannelMapping = "StereoLeft"
	// ChannelMappingStereoRight - The Right Stereo channel. Sometimes referred to as Down Mix Right.
	ChannelMappingStereoRight ChannelMapping = "StereoRight"
)

func PossibleChannelMappingValues

func PossibleChannelMappingValues() []ChannelMapping

PossibleChannelMappingValues returns the possible values for the ChannelMapping const type.

type CheckNameAvailabilityInput

type CheckNameAvailabilityInput struct {
	// The account name.
	Name *string

	// The account type. For a Media Services account, this should be 'MediaServices'.
	Type *string
}

CheckNameAvailabilityInput - The input to the check name availability request.

func (CheckNameAvailabilityInput) MarshalJSON

func (c CheckNameAvailabilityInput) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CheckNameAvailabilityInput.

func (*CheckNameAvailabilityInput) UnmarshalJSON

func (c *CheckNameAvailabilityInput) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CheckNameAvailabilityInput.

type ClearKeyEncryptionConfiguration added in v3.1.0

type ClearKeyEncryptionConfiguration struct {
	// Template for the URL of the custom service delivering content keys to end user players. Not required when using Azure Media
	// Services for issuing licenses. The template supports replaceable tokens that
	// the service will update at runtime with the value specific to the request. The currently supported token value is {AlternativeMediaId},
	// which is replaced with the value of
	// StreamingLocatorId.AlternativeMediaId.
	CustomKeysAcquisitionURLTemplate *string
}

ClearKeyEncryptionConfiguration - Class to specify ClearKey configuration of common encryption schemes in Streaming Policy

func (ClearKeyEncryptionConfiguration) MarshalJSON added in v3.1.0

func (c ClearKeyEncryptionConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ClearKeyEncryptionConfiguration.

func (*ClearKeyEncryptionConfiguration) UnmarshalJSON added in v3.1.0

func (c *ClearKeyEncryptionConfiguration) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ClearKeyEncryptionConfiguration.

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client contains the methods for the Mediaservices group. Don't use this type directly, use NewClient() instead.

func NewClient

func NewClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*Client, error)

NewClient creates a new instance of Client with the specified values.

  • subscriptionID - The unique identifier for a Microsoft Azure subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*Client) BeginCreateOrUpdate

func (client *Client) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, parameters MediaService, options *ClientBeginCreateOrUpdateOptions) (*runtime.Poller[ClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Creates or updates a Media Services account If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • parameters - The request parameters
  • options - ClientBeginCreateOrUpdateOptions contains the optional parameters for the Client.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Accounts/stable/2021-11-01/examples/async-accounts-create.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewClient().BeginCreateOrUpdate(ctx, "contoso", "contososports", armmediaservices.MediaService{
	Location: to.Ptr("South Central US"),
	Tags: map[string]*string{
		"key1": to.Ptr("value1"),
		"key2": to.Ptr("value2"),
	},
	Identity: &armmediaservices.MediaServiceIdentity{
		Type: to.Ptr("UserAssigned"),
		UserAssignedIdentities: map[string]*armmediaservices.UserAssignedManagedIdentity{
			"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {},
			"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2": {},
		},
	},
	Properties: &armmediaservices.MediaServiceProperties{
		Encryption: &armmediaservices.AccountEncryption{
			Type: to.Ptr(armmediaservices.AccountEncryptionKeyTypeCustomerKey),
			Identity: &armmediaservices.ResourceIdentity{
				UseSystemAssignedIdentity: to.Ptr(false),
				UserAssignedIdentity:      to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1"),
			},
		},
		KeyDelivery: &armmediaservices.KeyDelivery{
			AccessControl: &armmediaservices.AccessControl{
				DefaultAction: to.Ptr(armmediaservices.DefaultActionAllow),
			},
		},
		PublicNetworkAccess: to.Ptr(armmediaservices.PublicNetworkAccessEnabled),
		StorageAccounts: []*armmediaservices.StorageAccount{
			{
				Type: to.Ptr(armmediaservices.StorageAccountTypePrimary),
				ID:   to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Storage/storageAccounts/contososportsstore"),
				Identity: &armmediaservices.ResourceIdentity{
					UseSystemAssignedIdentity: to.Ptr(false),
					UserAssignedIdentity:      to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1"),
				},
			}},
		StorageAuthentication: to.Ptr(armmediaservices.StorageAuthenticationManagedIdentity),
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.MediaService = armmediaservices.MediaService{
// 	Location: to.Ptr("South Central US"),
// 	Tags: map[string]*string{
// 		"key1": to.Ptr("value1"),
// 		"key2": to.Ptr("value2"),
// 	},
// 	Identity: &armmediaservices.MediaServiceIdentity{
// 		Type: to.Ptr("UserAssigned"),
// 		UserAssignedIdentities: map[string]*armmediaservices.UserAssignedManagedIdentity{
// 			"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": &armmediaservices.UserAssignedManagedIdentity{
// 			},
// 			"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2": &armmediaservices.UserAssignedManagedIdentity{
// 			},
// 		},
// 	},
// 	Properties: &armmediaservices.MediaServiceProperties{
// 		Encryption: &armmediaservices.AccountEncryption{
// 			Type: to.Ptr(armmediaservices.AccountEncryptionKeyTypeCustomerKey),
// 			Identity: &armmediaservices.ResourceIdentity{
// 				UseSystemAssignedIdentity: to.Ptr(false),
// 				UserAssignedIdentity: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1"),
// 			},
// 			KeyVaultProperties: &armmediaservices.KeyVaultProperties{
// 				CurrentKeyIdentifier: to.Ptr("https://keyvault.vault.azure.net/keys/key1/ver1"),
// 				KeyIdentifier: to.Ptr("https://keyvault.vault.azure.net/keys/key1"),
// 			},
// 		},
// 		KeyDelivery: &armmediaservices.KeyDelivery{
// 			AccessControl: &armmediaservices.AccessControl{
// 				DefaultAction: to.Ptr(armmediaservices.DefaultActionAllow),
// 			},
// 		},
// 		PrivateEndpointConnections: []*armmediaservices.PrivateEndpointConnection{
// 			{
// 				Name: to.Ptr("00000000-0000-0000-0000-000000000001"),
// 				Type: to.Ptr("Microsoft.Media/mediaservices/privateEndpointConnections"),
// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contososports/privateEndpointConnections/00000000-0000-0000-0000-000000000001"),
// 				Properties: &armmediaservices.PrivateEndpointConnectionProperties{
// 					PrivateEndpoint: &armmediaservices.PrivateEndpoint{
// 						ID: to.Ptr("/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/reosuceGroup1/providers/Microsoft.Network/privateEndpoints/pe1"),
// 					},
// 					PrivateLinkServiceConnectionState: &armmediaservices.PrivateLinkServiceConnectionState{
// 						Description: to.Ptr("test description"),
// 						Status: to.Ptr(armmediaservices.PrivateEndpointServiceConnectionStatusApproved),
// 					},
// 					ProvisioningState: to.Ptr(armmediaservices.PrivateEndpointConnectionProvisioningStateSucceeded),
// 				},
// 			},
// 			{
// 				Name: to.Ptr("00000000-0000-0000-0000-000000000002"),
// 				Type: to.Ptr("Microsoft.Media/mediaservices/privateEndpointConnections"),
// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contososports/privateEndpointConnections/00000000-0000-0000-0000-000000000002"),
// 				Properties: &armmediaservices.PrivateEndpointConnectionProperties{
// 					PrivateEndpoint: &armmediaservices.PrivateEndpoint{
// 						ID: to.Ptr("/subscriptions/22222222-2222-2222-2222-222222222222/resourceGroups/reosuceGroup2/providers/Microsoft.Network/privateEndpoints/pe2"),
// 					},
// 					PrivateLinkServiceConnectionState: &armmediaservices.PrivateLinkServiceConnectionState{
// 						Description: to.Ptr("test description"),
// 						Status: to.Ptr(armmediaservices.PrivateEndpointServiceConnectionStatusPending),
// 					},
// 					ProvisioningState: to.Ptr(armmediaservices.PrivateEndpointConnectionProvisioningStateSucceeded),
// 				},
// 		}},
// 		ProvisioningState: to.Ptr(armmediaservices.ProvisioningStateSucceeded),
// 		PublicNetworkAccess: to.Ptr(armmediaservices.PublicNetworkAccessEnabled),
// 		StorageAccounts: []*armmediaservices.StorageAccount{
// 			{
// 				Type: to.Ptr(armmediaservices.StorageAccountTypePrimary),
// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Storage/storageAccounts/contososportsstore"),
// 				Identity: &armmediaservices.ResourceIdentity{
// 					UseSystemAssignedIdentity: to.Ptr(false),
// 					UserAssignedIdentity: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1"),
// 				},
// 		}},
// 		StorageAuthentication: to.Ptr(armmediaservices.StorageAuthenticationManagedIdentity),
// 	},
// }
Output:

func (*Client) BeginUpdate

func (client *Client) BeginUpdate(ctx context.Context, resourceGroupName string, accountName string, parameters MediaServiceUpdate, options *ClientBeginUpdateOptions) (*runtime.Poller[ClientUpdateResponse], error)

BeginUpdate - Updates an existing Media Services account If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • parameters - The request parameters
  • options - ClientBeginUpdateOptions contains the optional parameters for the Client.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Accounts/stable/2021-11-01/examples/async-accounts-update.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewClient().BeginUpdate(ctx, "contoso", "contososports", armmediaservices.MediaServiceUpdate{
	Tags: map[string]*string{
		"key1": to.Ptr("value3"),
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
_, err = poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
Output:

func (*Client) Delete

func (client *Client) Delete(ctx context.Context, resourceGroupName string, accountName string, options *ClientDeleteOptions) (ClientDeleteResponse, error)

Delete - Deletes a Media Services account If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • options - ClientDeleteOptions contains the optional parameters for the Client.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Accounts/stable/2021-11-01/examples/accounts-delete.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewClient().Delete(ctx, "contoso", "contososports", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*Client) Get

func (client *Client) Get(ctx context.Context, resourceGroupName string, accountName string, options *ClientGetOptions) (ClientGetResponse, error)

Get - Get the details of a Media Services account If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • options - ClientGetOptions contains the optional parameters for the Client.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Accounts/stable/2021-11-01/examples/accounts-get-by-name.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewClient().Get(ctx, "contoso", "contosotv", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.MediaService = armmediaservices.MediaService{
// 	Location: to.Ptr("South Central US"),
// 	Tags: map[string]*string{
// 		"key1": to.Ptr("value1"),
// 		"key2": to.Ptr("value2"),
// 	},
// 	Identity: &armmediaservices.MediaServiceIdentity{
// 		Type: to.Ptr("UserAssigned"),
// 		UserAssignedIdentities: map[string]*armmediaservices.UserAssignedManagedIdentity{
// 			"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": &armmediaservices.UserAssignedManagedIdentity{
// 				ClientID: to.Ptr("00000000-0000-0000-0000-000000000000"),
// 				PrincipalID: to.Ptr("00000000-0000-0000-0000-000000000000"),
// 			},
// 			"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2": &armmediaservices.UserAssignedManagedIdentity{
// 				ClientID: to.Ptr("00000000-0000-0000-0000-000000000000"),
// 				PrincipalID: to.Ptr("00000000-0000-0000-0000-000000000000"),
// 			},
// 		},
// 	},
// 	Properties: &armmediaservices.MediaServiceProperties{
// 		Encryption: &armmediaservices.AccountEncryption{
// 			Type: to.Ptr(armmediaservices.AccountEncryptionKeyTypeCustomerKey),
// 			Identity: &armmediaservices.ResourceIdentity{
// 				UseSystemAssignedIdentity: to.Ptr(false),
// 				UserAssignedIdentity: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1"),
// 			},
// 			KeyVaultProperties: &armmediaservices.KeyVaultProperties{
// 				CurrentKeyIdentifier: to.Ptr("https://keyvault.vault.azure.net/keys/key1/ver1"),
// 				KeyIdentifier: to.Ptr("https://keyvault.vault.azure.net/keys/key1"),
// 			},
// 		},
// 		KeyDelivery: &armmediaservices.KeyDelivery{
// 			AccessControl: &armmediaservices.AccessControl{
// 				DefaultAction: to.Ptr(armmediaservices.DefaultActionAllow),
// 			},
// 		},
// 		PrivateEndpointConnections: []*armmediaservices.PrivateEndpointConnection{
// 			{
// 				Name: to.Ptr("00000000-0000-0000-0000-000000000001"),
// 				Type: to.Ptr("Microsoft.Media/mediaservices/privateEndpointConnections"),
// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosotv/privateEndpointConnections/00000000-0000-0000-0000-000000000001"),
// 				Properties: &armmediaservices.PrivateEndpointConnectionProperties{
// 					PrivateEndpoint: &armmediaservices.PrivateEndpoint{
// 						ID: to.Ptr("/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/reosuceGroup1/providers/Microsoft.Network/privateEndpoints/pe1"),
// 					},
// 					PrivateLinkServiceConnectionState: &armmediaservices.PrivateLinkServiceConnectionState{
// 						Description: to.Ptr("test description"),
// 						Status: to.Ptr(armmediaservices.PrivateEndpointServiceConnectionStatusApproved),
// 					},
// 					ProvisioningState: to.Ptr(armmediaservices.PrivateEndpointConnectionProvisioningStateSucceeded),
// 				},
// 			},
// 			{
// 				Name: to.Ptr("00000000-0000-0000-0000-000000000002"),
// 				Type: to.Ptr("Microsoft.Media/mediaservices/privateEndpointConnections"),
// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosotv/privateEndpointConnections/00000000-0000-0000-0000-000000000002"),
// 				Properties: &armmediaservices.PrivateEndpointConnectionProperties{
// 					PrivateEndpoint: &armmediaservices.PrivateEndpoint{
// 						ID: to.Ptr("/subscriptions/22222222-2222-2222-2222-222222222222/resourceGroups/reosuceGroup2/providers/Microsoft.Network/privateEndpoints/pe2"),
// 					},
// 					PrivateLinkServiceConnectionState: &armmediaservices.PrivateLinkServiceConnectionState{
// 						Description: to.Ptr("test description"),
// 						Status: to.Ptr(armmediaservices.PrivateEndpointServiceConnectionStatusPending),
// 					},
// 					ProvisioningState: to.Ptr(armmediaservices.PrivateEndpointConnectionProvisioningStateSucceeded),
// 				},
// 		}},
// 		PublicNetworkAccess: to.Ptr(armmediaservices.PublicNetworkAccessEnabled),
// 		StorageAccounts: []*armmediaservices.StorageAccount{
// 			{
// 				Type: to.Ptr(armmediaservices.StorageAccountTypePrimary),
// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Storage/storageAccounts/contososportsstore"),
// 				Identity: &armmediaservices.ResourceIdentity{
// 					UseSystemAssignedIdentity: to.Ptr(false),
// 					UserAssignedIdentity: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1"),
// 				},
// 		}},
// 		StorageAuthentication: to.Ptr(armmediaservices.StorageAuthenticationManagedIdentity),
// 	},
// }
Output:

func (*Client) ListEdgePolicies

func (client *Client) ListEdgePolicies(ctx context.Context, resourceGroupName string, accountName string, parameters ListEdgePoliciesInput, options *ClientListEdgePoliciesOptions) (ClientListEdgePoliciesResponse, error)

ListEdgePolicies - List all the media edge policies associated with the Media Services account. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • parameters - The request parameters
  • options - ClientListEdgePoliciesOptions contains the optional parameters for the Client.ListEdgePolicies method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Accounts/stable/2021-11-01/examples/accounts-list-media-edge-policies.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewClient().ListEdgePolicies(ctx, "contoso", "contososports", armmediaservices.ListEdgePoliciesInput{
	DeviceID: to.Ptr("contosiothubhost_contosoiotdevice"),
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.EdgePolicies = armmediaservices.EdgePolicies{
// 	UsageDataCollectionPolicy: &armmediaservices.EdgeUsageDataCollectionPolicy{
// 		DataCollectionFrequency: to.Ptr("PT10M"),
// 		DataReportingFrequency: to.Ptr("PT1H"),
// 		EventHubDetails: &armmediaservices.EdgeUsageDataEventHub{
// 			Name: to.Ptr("ams-x"),
// 			Namespace: to.Ptr("ams-y-1-1"),
// 			Token: to.Ptr("SharedAccessSignature sr=sb%3a%2f%2fams-x.servicebus.windows.net%2fams-y-1-1%2fPublishers%2f96a510a1-0565-492a-a67f-83d1aed1d1f6_SampleDeviceId&sig=signature_value%3d&se=1584073736&skn=EdgeUsageData"),
// 		},
// 		MaxAllowedUnreportedUsageDuration: to.Ptr("PT36H"),
// 	},
// }
Output:

func (*Client) NewListBySubscriptionPager

func (client *Client) NewListBySubscriptionPager(options *ClientListBySubscriptionOptions) *runtime.Pager[ClientListBySubscriptionResponse]

NewListBySubscriptionPager - List Media Services accounts in the subscription.

Generated from API version 2021-11-01

  • options - ClientListBySubscriptionOptions contains the optional parameters for the Client.NewListBySubscriptionPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Accounts/stable/2021-11-01/examples/accounts-subscription-list-all-accounts.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewClient().NewListBySubscriptionPager(nil)
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.MediaServiceCollection = armmediaservices.MediaServiceCollection{
	// 	Value: []*armmediaservices.MediaService{
	// 		{
	// 			Name: to.Ptr("contosotv"),
	// 			Type: to.Ptr("Microsoft.Media/mediaservices"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosotv"),
	// 			Location: to.Ptr("South Central US"),
	// 			Tags: map[string]*string{
	// 				"key1": to.Ptr("value1"),
	// 				"key2": to.Ptr("value2"),
	// 			},
	// 			Properties: &armmediaservices.MediaServiceProperties{
	// 				MediaServiceID: to.Ptr("6ac94f91-283c-4492-85a7-57976928c17d"),
	// 				PrivateEndpointConnections: []*armmediaservices.PrivateEndpointConnection{
	// 				},
	// 				StorageAccounts: []*armmediaservices.StorageAccount{
	// 					{
	// 						Type: to.Ptr(armmediaservices.StorageAccountTypePrimary),
	// 						ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Storage/storageAccounts/contosotvstore"),
	// 				}},
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("contosomovies"),
	// 			Type: to.Ptr("Microsoft.Media/mediaservices"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomovies"),
	// 			Location: to.Ptr("South Central US"),
	// 			Tags: map[string]*string{
	// 				"key1": to.Ptr("value1"),
	// 				"key2": to.Ptr("value2"),
	// 			},
	// 			Properties: &armmediaservices.MediaServiceProperties{
	// 				MediaServiceID: to.Ptr("72681c0f-9dd1-4f1c-95c9-8a8d7d31c4ee"),
	// 				PrivateEndpointConnections: []*armmediaservices.PrivateEndpointConnection{
	// 				},
	// 				StorageAccounts: []*armmediaservices.StorageAccount{
	// 					{
	// 						Type: to.Ptr(armmediaservices.StorageAccountTypePrimary),
	// 						ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Storage/storageAccounts/contosomoviesstore"),
	// 				}},
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("fabrikamnews"),
	// 			Type: to.Ptr("Microsoft.Media/mediaservices"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/fabrikamnews"),
	// 			Location: to.Ptr("East US"),
	// 			Tags: map[string]*string{
	// 				"key1": to.Ptr("value1"),
	// 				"key2": to.Ptr("value2"),
	// 			},
	// 			Properties: &armmediaservices.MediaServiceProperties{
	// 				MediaServiceID: to.Ptr("d96036f9-4e37-491d-8c29-5bc53a29dfcd"),
	// 				PrivateEndpointConnections: []*armmediaservices.PrivateEndpointConnection{
	// 				},
	// 				StorageAccounts: []*armmediaservices.StorageAccount{
	// 					{
	// 						Type: to.Ptr(armmediaservices.StorageAccountTypePrimary),
	// 						ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/fabrikam/providers/Microsoft.Storage/storageAccounts/fabrikamnewsstore"),
	// 				}},
	// 			},
	// 	}},
	// }
}
Output:

func (*Client) NewListPager

func (client *Client) NewListPager(resourceGroupName string, options *ClientListOptions) *runtime.Pager[ClientListResponse]

NewListPager - List Media Services accounts in the resource group

Generated from API version 2021-11-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • options - ClientListOptions contains the optional parameters for the Client.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Accounts/stable/2021-11-01/examples/accounts-list-all-accounts.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewClient().NewListPager("contoso", nil)
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.MediaServiceCollection = armmediaservices.MediaServiceCollection{
	// 	Value: []*armmediaservices.MediaService{
	// 		{
	// 			Name: to.Ptr("contosotv"),
	// 			Type: to.Ptr("Microsoft.Media/mediaservices"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosotv"),
	// 			Location: to.Ptr("South Central US"),
	// 			Tags: map[string]*string{
	// 				"key1": to.Ptr("value1"),
	// 				"key2": to.Ptr("value2"),
	// 			},
	// 			Identity: &armmediaservices.MediaServiceIdentity{
	// 				Type: to.Ptr("UserAssigned"),
	// 				UserAssignedIdentities: map[string]*armmediaservices.UserAssignedManagedIdentity{
	// 					"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": &armmediaservices.UserAssignedManagedIdentity{
	// 						ClientID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 						PrincipalID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 					},
	// 					"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2": &armmediaservices.UserAssignedManagedIdentity{
	// 						ClientID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 						PrincipalID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 					},
	// 				},
	// 			},
	// 			Properties: &armmediaservices.MediaServiceProperties{
	// 				Encryption: &armmediaservices.AccountEncryption{
	// 					Type: to.Ptr(armmediaservices.AccountEncryptionKeyTypeCustomerKey),
	// 					Identity: &armmediaservices.ResourceIdentity{
	// 						UseSystemAssignedIdentity: to.Ptr(false),
	// 						UserAssignedIdentity: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1"),
	// 					},
	// 					KeyVaultProperties: &armmediaservices.KeyVaultProperties{
	// 						CurrentKeyIdentifier: to.Ptr("https://keyvault.vault.azure.net/keys/key1/ver1"),
	// 						KeyIdentifier: to.Ptr("https://keyvault.vault.azure.net/keys/key1"),
	// 					},
	// 				},
	// 				KeyDelivery: &armmediaservices.KeyDelivery{
	// 					AccessControl: &armmediaservices.AccessControl{
	// 						DefaultAction: to.Ptr(armmediaservices.DefaultActionAllow),
	// 					},
	// 				},
	// 				MediaServiceID: to.Ptr("6ac94f91-283c-4492-85a7-57976928c17d"),
	// 				PrivateEndpointConnections: []*armmediaservices.PrivateEndpointConnection{
	// 					{
	// 						Name: to.Ptr("00000000-0000-0000-0000-000000000001"),
	// 						Type: to.Ptr("Microsoft.Media/mediaservices/privateEndpointConnections"),
	// 						ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosotv/privateEndpointConnections/00000000-0000-0000-0000-000000000001"),
	// 						Properties: &armmediaservices.PrivateEndpointConnectionProperties{
	// 							PrivateEndpoint: &armmediaservices.PrivateEndpoint{
	// 								ID: to.Ptr("/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/reosuceGroup1/providers/Microsoft.Network/privateEndpoints/pe1"),
	// 							},
	// 							PrivateLinkServiceConnectionState: &armmediaservices.PrivateLinkServiceConnectionState{
	// 								Description: to.Ptr("test description"),
	// 								Status: to.Ptr(armmediaservices.PrivateEndpointServiceConnectionStatusApproved),
	// 							},
	// 							ProvisioningState: to.Ptr(armmediaservices.PrivateEndpointConnectionProvisioningStateSucceeded),
	// 						},
	// 					},
	// 					{
	// 						Name: to.Ptr("00000000-0000-0000-0000-000000000002"),
	// 						Type: to.Ptr("Microsoft.Media/mediaservices/privateEndpointConnections"),
	// 						ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosotv/privateEndpointConnections/00000000-0000-0000-0000-000000000002"),
	// 						Properties: &armmediaservices.PrivateEndpointConnectionProperties{
	// 							PrivateEndpoint: &armmediaservices.PrivateEndpoint{
	// 								ID: to.Ptr("/subscriptions/22222222-2222-2222-2222-222222222222/resourceGroups/reosuceGroup2/providers/Microsoft.Network/privateEndpoints/pe2"),
	// 							},
	// 							PrivateLinkServiceConnectionState: &armmediaservices.PrivateLinkServiceConnectionState{
	// 								Description: to.Ptr("test description"),
	// 								Status: to.Ptr(armmediaservices.PrivateEndpointServiceConnectionStatusPending),
	// 							},
	// 							ProvisioningState: to.Ptr(armmediaservices.PrivateEndpointConnectionProvisioningStateSucceeded),
	// 						},
	// 				}},
	// 				PublicNetworkAccess: to.Ptr(armmediaservices.PublicNetworkAccessEnabled),
	// 				StorageAccounts: []*armmediaservices.StorageAccount{
	// 					{
	// 						Type: to.Ptr(armmediaservices.StorageAccountTypePrimary),
	// 						ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Storage/storageAccounts/contosotvstore"),
	// 				}},
	// 				StorageAuthentication: to.Ptr(armmediaservices.StorageAuthenticationManagedIdentity),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("contosomovies"),
	// 			Type: to.Ptr("Microsoft.Media/mediaservices"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomovies"),
	// 			Location: to.Ptr("South Central US"),
	// 			Tags: map[string]*string{
	// 				"key1": to.Ptr("value1"),
	// 				"key2": to.Ptr("value2"),
	// 			},
	// 			Identity: &armmediaservices.MediaServiceIdentity{
	// 				Type: to.Ptr("UserAssigned"),
	// 				UserAssignedIdentities: map[string]*armmediaservices.UserAssignedManagedIdentity{
	// 					"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": &armmediaservices.UserAssignedManagedIdentity{
	// 						ClientID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 						PrincipalID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 					},
	// 					"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2": &armmediaservices.UserAssignedManagedIdentity{
	// 						ClientID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 						PrincipalID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 					},
	// 				},
	// 			},
	// 			Properties: &armmediaservices.MediaServiceProperties{
	// 				Encryption: &armmediaservices.AccountEncryption{
	// 					Type: to.Ptr(armmediaservices.AccountEncryptionKeyTypeCustomerKey),
	// 					Identity: &armmediaservices.ResourceIdentity{
	// 						UseSystemAssignedIdentity: to.Ptr(false),
	// 						UserAssignedIdentity: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1"),
	// 					},
	// 					KeyVaultProperties: &armmediaservices.KeyVaultProperties{
	// 						CurrentKeyIdentifier: to.Ptr("https://keyvault.vault.azure.net/keys/key1/ver1"),
	// 						KeyIdentifier: to.Ptr("https://keyvault.vault.azure.net/keys/key1"),
	// 					},
	// 				},
	// 				KeyDelivery: &armmediaservices.KeyDelivery{
	// 					AccessControl: &armmediaservices.AccessControl{
	// 						DefaultAction: to.Ptr(armmediaservices.DefaultActionAllow),
	// 					},
	// 				},
	// 				MediaServiceID: to.Ptr("72681c0f-9dd1-4f1c-95c9-8a8d7d31c4ee"),
	// 				PrivateEndpointConnections: []*armmediaservices.PrivateEndpointConnection{
	// 				},
	// 				PublicNetworkAccess: to.Ptr(armmediaservices.PublicNetworkAccessEnabled),
	// 				StorageAccounts: []*armmediaservices.StorageAccount{
	// 					{
	// 						Type: to.Ptr(armmediaservices.StorageAccountTypePrimary),
	// 						ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Storage/storageAccounts/contosomoviesstore"),
	// 				}},
	// 				StorageAuthentication: to.Ptr(armmediaservices.StorageAuthenticationManagedIdentity),
	// 			},
	// 	}},
	// }
}
Output:

func (*Client) SyncStorageKeys

func (client *Client) SyncStorageKeys(ctx context.Context, resourceGroupName string, accountName string, parameters SyncStorageKeysInput, options *ClientSyncStorageKeysOptions) (ClientSyncStorageKeysResponse, error)

SyncStorageKeys - Synchronizes storage account keys for a storage account associated with the Media Service account. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • parameters - The request parameters
  • options - ClientSyncStorageKeysOptions contains the optional parameters for the Client.SyncStorageKeys method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Accounts/stable/2021-11-01/examples/accounts-sync-storage-keys.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewClient().SyncStorageKeys(ctx, "contoso", "contososports", armmediaservices.SyncStorageKeysInput{
	ID: to.Ptr("contososportsstore"),
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

type ClientBeginCreateOrUpdateOptions

type ClientBeginCreateOrUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

ClientBeginCreateOrUpdateOptions contains the optional parameters for the Client.BeginCreateOrUpdate method.

type ClientBeginUpdateOptions

type ClientBeginUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

ClientBeginUpdateOptions contains the optional parameters for the Client.BeginUpdate method.

type ClientCreateOrUpdateResponse

type ClientCreateOrUpdateResponse struct {
	// A Media Services account.
	MediaService
}

ClientCreateOrUpdateResponse contains the response from method Client.BeginCreateOrUpdate.

type ClientDeleteOptions

type ClientDeleteOptions struct {
}

ClientDeleteOptions contains the optional parameters for the Client.Delete method.

type ClientDeleteResponse

type ClientDeleteResponse struct {
}

ClientDeleteResponse contains the response from method Client.Delete.

type ClientFactory added in v3.3.0

type ClientFactory struct {
	// contains filtered or unexported fields
}

ClientFactory is a client factory used to create any client in this module. Don't use this type directly, use NewClientFactory instead.

func NewClientFactory added in v3.3.0

func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error)

NewClientFactory creates a new instance of ClientFactory with the specified values. The parameter values will be propagated to any client created from this factory.

  • subscriptionID - The unique identifier for a Microsoft Azure subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*ClientFactory) NewAccountFiltersClient added in v3.3.0

func (c *ClientFactory) NewAccountFiltersClient() *AccountFiltersClient

NewAccountFiltersClient creates a new instance of AccountFiltersClient.

func (*ClientFactory) NewAssetFiltersClient added in v3.3.0

func (c *ClientFactory) NewAssetFiltersClient() *AssetFiltersClient

NewAssetFiltersClient creates a new instance of AssetFiltersClient.

func (*ClientFactory) NewAssetTrackOperationResultsClient added in v3.3.0

func (c *ClientFactory) NewAssetTrackOperationResultsClient() *AssetTrackOperationResultsClient

NewAssetTrackOperationResultsClient creates a new instance of AssetTrackOperationResultsClient.

func (*ClientFactory) NewAssetTrackOperationStatusesClient added in v3.3.0

func (c *ClientFactory) NewAssetTrackOperationStatusesClient() *AssetTrackOperationStatusesClient

NewAssetTrackOperationStatusesClient creates a new instance of AssetTrackOperationStatusesClient.

func (*ClientFactory) NewAssetsClient added in v3.3.0

func (c *ClientFactory) NewAssetsClient() *AssetsClient

NewAssetsClient creates a new instance of AssetsClient.

func (*ClientFactory) NewClient added in v3.3.0

func (c *ClientFactory) NewClient() *Client

NewClient creates a new instance of Client.

func (*ClientFactory) NewContentKeyPoliciesClient added in v3.3.0

func (c *ClientFactory) NewContentKeyPoliciesClient() *ContentKeyPoliciesClient

NewContentKeyPoliciesClient creates a new instance of ContentKeyPoliciesClient.

func (*ClientFactory) NewJobsClient added in v3.3.0

func (c *ClientFactory) NewJobsClient() *JobsClient

NewJobsClient creates a new instance of JobsClient.

func (*ClientFactory) NewLiveEventsClient added in v3.3.0

func (c *ClientFactory) NewLiveEventsClient() *LiveEventsClient

NewLiveEventsClient creates a new instance of LiveEventsClient.

func (*ClientFactory) NewLiveOutputsClient added in v3.3.0

func (c *ClientFactory) NewLiveOutputsClient() *LiveOutputsClient

NewLiveOutputsClient creates a new instance of LiveOutputsClient.

func (*ClientFactory) NewLocationsClient added in v3.3.0

func (c *ClientFactory) NewLocationsClient() *LocationsClient

NewLocationsClient creates a new instance of LocationsClient.

func (*ClientFactory) NewOperationResultsClient added in v3.3.0

func (c *ClientFactory) NewOperationResultsClient() *OperationResultsClient

NewOperationResultsClient creates a new instance of OperationResultsClient.

func (*ClientFactory) NewOperationStatusesClient added in v3.3.0

func (c *ClientFactory) NewOperationStatusesClient() *OperationStatusesClient

NewOperationStatusesClient creates a new instance of OperationStatusesClient.

func (*ClientFactory) NewOperationsClient added in v3.3.0

func (c *ClientFactory) NewOperationsClient() *OperationsClient

NewOperationsClient creates a new instance of OperationsClient.

func (*ClientFactory) NewPrivateEndpointConnectionsClient added in v3.3.0

func (c *ClientFactory) NewPrivateEndpointConnectionsClient() *PrivateEndpointConnectionsClient

NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient.

func (*ClientFactory) NewPrivateLinkResourcesClient added in v3.3.0

func (c *ClientFactory) NewPrivateLinkResourcesClient() *PrivateLinkResourcesClient

NewPrivateLinkResourcesClient creates a new instance of PrivateLinkResourcesClient.

func (*ClientFactory) NewStreamingEndpointsClient added in v3.3.0

func (c *ClientFactory) NewStreamingEndpointsClient() *StreamingEndpointsClient

NewStreamingEndpointsClient creates a new instance of StreamingEndpointsClient.

func (*ClientFactory) NewStreamingLocatorsClient added in v3.3.0

func (c *ClientFactory) NewStreamingLocatorsClient() *StreamingLocatorsClient

NewStreamingLocatorsClient creates a new instance of StreamingLocatorsClient.

func (*ClientFactory) NewStreamingPoliciesClient added in v3.3.0

func (c *ClientFactory) NewStreamingPoliciesClient() *StreamingPoliciesClient

NewStreamingPoliciesClient creates a new instance of StreamingPoliciesClient.

func (*ClientFactory) NewTracksClient added in v3.3.0

func (c *ClientFactory) NewTracksClient() *TracksClient

NewTracksClient creates a new instance of TracksClient.

func (*ClientFactory) NewTransformsClient added in v3.3.0

func (c *ClientFactory) NewTransformsClient() *TransformsClient

NewTransformsClient creates a new instance of TransformsClient.

type ClientGetOptions

type ClientGetOptions struct {
}

ClientGetOptions contains the optional parameters for the Client.Get method.

type ClientGetResponse

type ClientGetResponse struct {
	// A Media Services account.
	MediaService
}

ClientGetResponse contains the response from method Client.Get.

type ClientListBySubscriptionOptions

type ClientListBySubscriptionOptions struct {
}

ClientListBySubscriptionOptions contains the optional parameters for the Client.NewListBySubscriptionPager method.

type ClientListBySubscriptionResponse

type ClientListBySubscriptionResponse struct {
	// A collection of MediaService items.
	MediaServiceCollection
}

ClientListBySubscriptionResponse contains the response from method Client.NewListBySubscriptionPager.

type ClientListEdgePoliciesOptions

type ClientListEdgePoliciesOptions struct {
}

ClientListEdgePoliciesOptions contains the optional parameters for the Client.ListEdgePolicies method.

type ClientListEdgePoliciesResponse

type ClientListEdgePoliciesResponse struct {
	EdgePolicies
}

ClientListEdgePoliciesResponse contains the response from method Client.ListEdgePolicies.

type ClientListOptions

type ClientListOptions struct {
}

ClientListOptions contains the optional parameters for the Client.NewListPager method.

type ClientListResponse

type ClientListResponse struct {
	// A collection of MediaService items.
	MediaServiceCollection
}

ClientListResponse contains the response from method Client.NewListPager.

type ClientSyncStorageKeysOptions

type ClientSyncStorageKeysOptions struct {
}

ClientSyncStorageKeysOptions contains the optional parameters for the Client.SyncStorageKeys method.

type ClientSyncStorageKeysResponse

type ClientSyncStorageKeysResponse struct {
}

ClientSyncStorageKeysResponse contains the response from method Client.SyncStorageKeys.

type ClientUpdateResponse

type ClientUpdateResponse struct {
	// A Media Services account.
	MediaService
}

ClientUpdateResponse contains the response from method Client.BeginUpdate.

type ClipTime

type ClipTime struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string
}

ClipTime - Base class for specifying a clip time. Use sub classes of this class to specify the time position in the media.

func (*ClipTime) GetClipTime

func (c *ClipTime) GetClipTime() *ClipTime

GetClipTime implements the ClipTimeClassification interface for type ClipTime.

func (ClipTime) MarshalJSON

func (c ClipTime) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ClipTime.

func (*ClipTime) UnmarshalJSON

func (c *ClipTime) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ClipTime.

type ClipTimeClassification

type ClipTimeClassification interface {
	// GetClipTime returns the ClipTime content of the underlying type.
	GetClipTime() *ClipTime
}

ClipTimeClassification provides polymorphic access to related types. Call the interface's GetClipTime() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *AbsoluteClipTime, *ClipTime, *UTCClipTime

type Codec

type Codec struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string

	// An optional label for the codec. The label can be used to control muxing behavior.
	Label *string
}

Codec - Describes the basic properties of all codecs.

func (*Codec) GetCodec

func (c *Codec) GetCodec() *Codec

GetCodec implements the CodecClassification interface for type Codec.

func (Codec) MarshalJSON

func (c Codec) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Codec.

func (*Codec) UnmarshalJSON

func (c *Codec) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Codec.

type CodecClassification

type CodecClassification interface {
	// GetCodec returns the Codec content of the underlying type.
	GetCodec() *Codec
}

CodecClassification provides polymorphic access to related types. Call the interface's GetCodec() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *AacAudio, *Audio, *Codec, *CopyAudio, *CopyVideo, *DDAudio, *H264Video, *H265Video, *Image, *JpgImage, *PNGImage, *Video

type CommonEncryptionCbcs

type CommonEncryptionCbcs struct {
	// Optional configuration supporting ClearKey in CommonEncryptionCbcs encryption scheme.
	ClearKeyEncryptionConfiguration *ClearKeyEncryptionConfiguration

	// Representing which tracks should not be encrypted
	ClearTracks []*TrackSelection

	// Representing default content key for each encryption scheme and separate content keys for specific tracks
	ContentKeys *StreamingPolicyContentKeys

	// Configuration of DRMs for current encryption scheme
	Drm *CbcsDrmConfiguration

	// Representing supported protocols
	EnabledProtocols *EnabledProtocols
}

CommonEncryptionCbcs - Class for CommonEncryptionCbcs encryption scheme

func (CommonEncryptionCbcs) MarshalJSON

func (c CommonEncryptionCbcs) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CommonEncryptionCbcs.

func (*CommonEncryptionCbcs) UnmarshalJSON

func (c *CommonEncryptionCbcs) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CommonEncryptionCbcs.

type CommonEncryptionCenc

type CommonEncryptionCenc struct {
	// Optional configuration supporting ClearKey in CommonEncryptionCenc encryption scheme.
	ClearKeyEncryptionConfiguration *ClearKeyEncryptionConfiguration

	// Representing which tracks should not be encrypted
	ClearTracks []*TrackSelection

	// Representing default content key for each encryption scheme and separate content keys for specific tracks
	ContentKeys *StreamingPolicyContentKeys

	// Configuration of DRMs for CommonEncryptionCenc encryption scheme
	Drm *CencDrmConfiguration

	// Representing supported protocols
	EnabledProtocols *EnabledProtocols
}

CommonEncryptionCenc - Class for envelope encryption scheme

func (CommonEncryptionCenc) MarshalJSON

func (c CommonEncryptionCenc) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CommonEncryptionCenc.

func (*CommonEncryptionCenc) UnmarshalJSON

func (c *CommonEncryptionCenc) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CommonEncryptionCenc.

type Complexity

type Complexity string

Complexity - Allows you to configure the encoder settings to control the balance between speed and quality. Example: set Complexity as Speed for faster encoding but less compression efficiency.

const (
	// ComplexityBalanced - Configures the encoder to use settings that achieve a balance between speed and quality.
	ComplexityBalanced Complexity = "Balanced"
	// ComplexityQuality - Configures the encoder to use settings optimized to produce higher quality output at the expense of
	// slower overall encode time.
	ComplexityQuality Complexity = "Quality"
	// ComplexitySpeed - Configures the encoder to use settings optimized for faster encoding. Quality is sacrificed to decrease
	// encoding time.
	ComplexitySpeed Complexity = "Speed"
)

func PossibleComplexityValues

func PossibleComplexityValues() []Complexity

PossibleComplexityValues returns the possible values for the Complexity const type.

type ContentKeyPoliciesClient

type ContentKeyPoliciesClient struct {
	// contains filtered or unexported fields
}

ContentKeyPoliciesClient contains the methods for the ContentKeyPolicies group. Don't use this type directly, use NewContentKeyPoliciesClient() instead.

func NewContentKeyPoliciesClient

func NewContentKeyPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ContentKeyPoliciesClient, error)

NewContentKeyPoliciesClient creates a new instance of ContentKeyPoliciesClient with the specified values.

  • subscriptionID - The unique identifier for a Microsoft Azure subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*ContentKeyPoliciesClient) CreateOrUpdate

func (client *ContentKeyPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, contentKeyPolicyName string, parameters ContentKeyPolicy, options *ContentKeyPoliciesClientCreateOrUpdateOptions) (ContentKeyPoliciesClientCreateOrUpdateResponse, error)

CreateOrUpdate - Create or update a Content Key Policy in the Media Services account If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • contentKeyPolicyName - The Content Key Policy name.
  • parameters - The request parameters
  • options - ContentKeyPoliciesClientCreateOrUpdateOptions contains the optional parameters for the ContentKeyPoliciesClient.CreateOrUpdate method.
Example (CreatesAContentKeyPolicyWithClearKeyOptionAndTokenRestriction)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/content-key-policies-create-nodrm-token.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewContentKeyPoliciesClient().CreateOrUpdate(ctx, "contoso", "contosomedia", "PolicyWithClearKeyOptionAndSwtTokenRestriction", armmediaservices.ContentKeyPolicy{
	Properties: &armmediaservices.ContentKeyPolicyProperties{
		Description: to.Ptr("ArmPolicyDescription"),
		Options: []*armmediaservices.ContentKeyPolicyOption{
			{
				Name: to.Ptr("ClearKeyOption"),
				Configuration: &armmediaservices.ContentKeyPolicyClearKeyConfiguration{
					ODataType: to.Ptr("#Microsoft.Media.ContentKeyPolicyClearKeyConfiguration"),
				},
				Restriction: &armmediaservices.ContentKeyPolicyTokenRestriction{
					ODataType: to.Ptr("#Microsoft.Media.ContentKeyPolicyTokenRestriction"),
					Audience:  to.Ptr("urn:audience"),
					Issuer:    to.Ptr("urn:issuer"),
					PrimaryVerificationKey: &armmediaservices.ContentKeyPolicySymmetricTokenKey{
						ODataType: to.Ptr("#Microsoft.Media.ContentKeyPolicySymmetricTokenKey"),
						KeyValue:  []byte("AAAAAAAAAAAAAAAAAAAAAA=="),
					},
					RestrictionTokenType: to.Ptr(armmediaservices.ContentKeyPolicyRestrictionTokenTypeSwt),
				},
			}},
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ContentKeyPolicy = armmediaservices.ContentKeyPolicy{
// 	Name: to.Ptr("PolicyWithClearKeyOptionAndSwtTokenRestriction"),
// 	Type: to.Ptr("Microsoft.Media/mediaservices/contentKeyPolicies"),
// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/contentKeyPolicies/PolicyWithClearKeyOptionAndSwtTokenRestriction"),
// 	Properties: &armmediaservices.ContentKeyPolicyProperties{
// 		Description: to.Ptr("ArmPolicyDescription"),
// 		Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-08T18:29:29.837Z"); return t}()),
// 		LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-08T18:29:29.837Z"); return t}()),
// 		Options: []*armmediaservices.ContentKeyPolicyOption{
// 			{
// 				Name: to.Ptr("ClearKeyOption"),
// 				Configuration: &armmediaservices.ContentKeyPolicyClearKeyConfiguration{
// 					ODataType: to.Ptr("#Microsoft.Media.ContentKeyPolicyClearKeyConfiguration"),
// 				},
// 				PolicyOptionID: to.Ptr("e7d4d465-b6f7-4830-9a21-74a7326ef797"),
// 				Restriction: &armmediaservices.ContentKeyPolicyTokenRestriction{
// 					ODataType: to.Ptr("#Microsoft.Media.ContentKeyPolicyTokenRestriction"),
// 					AlternateVerificationKeys: []armmediaservices.ContentKeyPolicyRestrictionTokenKeyClassification{
// 					},
// 					Audience: to.Ptr("urn:audience"),
// 					Issuer: to.Ptr("urn:issuer"),
// 					PrimaryVerificationKey: &armmediaservices.ContentKeyPolicySymmetricTokenKey{
// 						ODataType: to.Ptr("#Microsoft.Media.ContentKeyPolicySymmetricTokenKey"),
// 						KeyValue: []byte(""),
// 					},
// 					RequiredClaims: []*armmediaservices.ContentKeyPolicyTokenClaim{
// 					},
// 					RestrictionTokenType: to.Ptr(armmediaservices.ContentKeyPolicyRestrictionTokenTypeSwt),
// 				},
// 		}},
// 		PolicyID: to.Ptr("2926c1bc-4dec-4a11-9d19-3f99006530a9"),
// 	},
// }
Output:

Example (CreatesAContentKeyPolicyWithMultipleOptions)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/content-key-policies-create-multiple-options.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewContentKeyPoliciesClient().CreateOrUpdate(ctx, "contoso", "contosomedia", "PolicyCreatedWithMultipleOptions", armmediaservices.ContentKeyPolicy{
	Properties: &armmediaservices.ContentKeyPolicyProperties{
		Description: to.Ptr("ArmPolicyDescription"),
		Options: []*armmediaservices.ContentKeyPolicyOption{
			{
				Name: to.Ptr("ClearKeyOption"),
				Configuration: &armmediaservices.ContentKeyPolicyClearKeyConfiguration{
					ODataType: to.Ptr("#Microsoft.Media.ContentKeyPolicyClearKeyConfiguration"),
				},
				Restriction: &armmediaservices.ContentKeyPolicyTokenRestriction{
					ODataType: to.Ptr("#Microsoft.Media.ContentKeyPolicyTokenRestriction"),
					Audience:  to.Ptr("urn:audience"),
					Issuer:    to.Ptr("urn:issuer"),
					PrimaryVerificationKey: &armmediaservices.ContentKeyPolicySymmetricTokenKey{
						ODataType: to.Ptr("#Microsoft.Media.ContentKeyPolicySymmetricTokenKey"),
						KeyValue:  []byte("AAAAAAAAAAAAAAAAAAAAAA=="),
					},
					RestrictionTokenType: to.Ptr(armmediaservices.ContentKeyPolicyRestrictionTokenTypeSwt),
				},
			},
			{
				Name: to.Ptr("widevineoption"),
				Configuration: &armmediaservices.ContentKeyPolicyWidevineConfiguration{
					ODataType:        to.Ptr("#Microsoft.Media.ContentKeyPolicyWidevineConfiguration"),
					WidevineTemplate: to.Ptr("{\"allowed_track_types\":\"SD_HD\",\"content_key_specs\":[{\"track_type\":\"SD\",\"security_level\":1,\"required_output_protection\":{\"hdcp\":\"HDCP_V2\"}}],\"policy_overrides\":{\"can_play\":true,\"can_persist\":true,\"can_renew\":false}}"),
				},
				Restriction: &armmediaservices.ContentKeyPolicyOpenRestriction{
					ODataType: to.Ptr("#Microsoft.Media.ContentKeyPolicyOpenRestriction"),
				},
			}},
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ContentKeyPolicy = armmediaservices.ContentKeyPolicy{
// 	Name: to.Ptr("PolicyCreatedWithMultipleOptions"),
// 	Type: to.Ptr("Microsoft.Media/mediaservices/contentKeyPolicies"),
// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/contentKeyPolicies/PolicyCreatedWithMultipleOptions"),
// 	Properties: &armmediaservices.ContentKeyPolicyProperties{
// 		Description: to.Ptr("ArmPolicyDescription"),
// 		Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-08T18:29:29.980Z"); return t}()),
// 		LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-08T18:29:29.980Z"); return t}()),
// 		Options: []*armmediaservices.ContentKeyPolicyOption{
// 			{
// 				Name: to.Ptr("ClearKeyOption"),
// 				Configuration: &armmediaservices.ContentKeyPolicyClearKeyConfiguration{
// 					ODataType: to.Ptr("#Microsoft.Media.ContentKeyPolicyClearKeyConfiguration"),
// 				},
// 				PolicyOptionID: to.Ptr("8dac9510-770a-401f-8f2b-f72640977ed0"),
// 				Restriction: &armmediaservices.ContentKeyPolicyTokenRestriction{
// 					ODataType: to.Ptr("#Microsoft.Media.ContentKeyPolicyTokenRestriction"),
// 					AlternateVerificationKeys: []armmediaservices.ContentKeyPolicyRestrictionTokenKeyClassification{
// 					},
// 					Audience: to.Ptr("urn:audience"),
// 					Issuer: to.Ptr("urn:issuer"),
// 					PrimaryVerificationKey: &armmediaservices.ContentKeyPolicySymmetricTokenKey{
// 						ODataType: to.Ptr("#Microsoft.Media.ContentKeyPolicySymmetricTokenKey"),
// 						KeyValue: []byte(""),
// 					},
// 					RequiredClaims: []*armmediaservices.ContentKeyPolicyTokenClaim{
// 					},
// 					RestrictionTokenType: to.Ptr(armmediaservices.ContentKeyPolicyRestrictionTokenTypeSwt),
// 				},
// 			},
// 			{
// 				Name: to.Ptr("widevineoption"),
// 				Configuration: &armmediaservices.ContentKeyPolicyWidevineConfiguration{
// 					ODataType: to.Ptr("#Microsoft.Media.ContentKeyPolicyWidevineConfiguration"),
// 					WidevineTemplate: to.Ptr("{\"allowed_track_types\":\"SD_HD\",\"content_key_specs\":[{\"track_type\":\"SD\",\"security_level\":1,\"required_output_protection\":{\"hdcp\":\"HDCP_V2\"}}],\"policy_overrides\":{\"can_play\":true,\"can_persist\":true,\"can_renew\":false}}"),
// 				},
// 				PolicyOptionID: to.Ptr("fc121776-6ced-4135-be92-f928dedc029a"),
// 				Restriction: &armmediaservices.ContentKeyPolicyOpenRestriction{
// 					ODataType: to.Ptr("#Microsoft.Media.ContentKeyPolicyOpenRestriction"),
// 				},
// 		}},
// 		PolicyID: to.Ptr("07ad673b-dc14-4230-adab-716622f33992"),
// 	},
// }
Output:

Example (CreatesAContentKeyPolicyWithPlayReadyOptionAndOpenRestriction)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/content-key-policies-create-playready-open.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewContentKeyPoliciesClient().CreateOrUpdate(ctx, "contoso", "contosomedia", "PolicyWithPlayReadyOptionAndOpenRestriction", armmediaservices.ContentKeyPolicy{
	Properties: &armmediaservices.ContentKeyPolicyProperties{
		Description: to.Ptr("ArmPolicyDescription"),
		Options: []*armmediaservices.ContentKeyPolicyOption{
			{
				Name: to.Ptr("ArmPolicyOptionName"),
				Configuration: &armmediaservices.ContentKeyPolicyPlayReadyConfiguration{
					ODataType: to.Ptr("#Microsoft.Media.ContentKeyPolicyPlayReadyConfiguration"),
					Licenses: []*armmediaservices.ContentKeyPolicyPlayReadyLicense{
						{
							AllowTestDevices: to.Ptr(true),
							BeginDate:        to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-10-16T18:22:53.460Z"); return t }()),
							ContentKeyLocation: &armmediaservices.ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader{
								ODataType: to.Ptr("#Microsoft.Media.ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader"),
							},
							ContentType: to.Ptr(armmediaservices.ContentKeyPolicyPlayReadyContentTypeUltraVioletDownload),
							LicenseType: to.Ptr(armmediaservices.ContentKeyPolicyPlayReadyLicenseTypePersistent),
							PlayRight: &armmediaservices.ContentKeyPolicyPlayReadyPlayRight{
								AllowPassingVideoContentToUnknownOutput:            to.Ptr(armmediaservices.ContentKeyPolicyPlayReadyUnknownOutputPassingOptionNotAllowed),
								DigitalVideoOnlyContentRestriction:                 to.Ptr(false),
								ImageConstraintForAnalogComponentVideoRestriction:  to.Ptr(true),
								ImageConstraintForAnalogComputerMonitorRestriction: to.Ptr(false),
								ScmsRestriction: to.Ptr[int32](2),
							},
							SecurityLevel: to.Ptr(armmediaservices.SecurityLevelSL150),
						}},
				},
				Restriction: &armmediaservices.ContentKeyPolicyOpenRestriction{
					ODataType: to.Ptr("#Microsoft.Media.ContentKeyPolicyOpenRestriction"),
				},
			}},
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ContentKeyPolicy = armmediaservices.ContentKeyPolicy{
// 	Name: to.Ptr("PolicyWithPlayReadyOptionAndOpenRestriction"),
// 	Type: to.Ptr("Microsoft.Media/mediaservices/contentKeyPolicies"),
// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/contentKeyPolicies/PolicyWithPlayReadyOptionAndOpenRestriction"),
// 	Properties: &armmediaservices.ContentKeyPolicyProperties{
// 		Description: to.Ptr("ArmPolicyDescription"),
// 		Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2012-11-01T00:00:00.000Z"); return t}()),
// 		LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-08T18:29:29.510Z"); return t}()),
// 		Options: []*armmediaservices.ContentKeyPolicyOption{
// 			{
// 				Name: to.Ptr("ArmPolicyOptionName"),
// 				Configuration: &armmediaservices.ContentKeyPolicyPlayReadyConfiguration{
// 					ODataType: to.Ptr("#Microsoft.Media.ContentKeyPolicyPlayReadyConfiguration"),
// 					Licenses: []*armmediaservices.ContentKeyPolicyPlayReadyLicense{
// 						{
// 							AllowTestDevices: to.Ptr(true),
// 							BeginDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-10-16T18:22:53.460Z"); return t}()),
// 							ContentKeyLocation: &armmediaservices.ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader{
// 								ODataType: to.Ptr("#Microsoft.Media.ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader"),
// 							},
// 							ContentType: to.Ptr(armmediaservices.ContentKeyPolicyPlayReadyContentTypeUltraVioletDownload),
// 							LicenseType: to.Ptr(armmediaservices.ContentKeyPolicyPlayReadyLicenseTypePersistent),
// 							PlayRight: &armmediaservices.ContentKeyPolicyPlayReadyPlayRight{
// 								AllowPassingVideoContentToUnknownOutput: to.Ptr(armmediaservices.ContentKeyPolicyPlayReadyUnknownOutputPassingOptionNotAllowed),
// 								DigitalVideoOnlyContentRestriction: to.Ptr(false),
// 								ImageConstraintForAnalogComponentVideoRestriction: to.Ptr(true),
// 								ImageConstraintForAnalogComputerMonitorRestriction: to.Ptr(false),
// 								ScmsRestriction: to.Ptr[int32](2),
// 							},
// 							SecurityLevel: to.Ptr(armmediaservices.SecurityLevelSL150),
// 					}},
// 				},
// 				PolicyOptionID: to.Ptr("c52f9af0-1f53-4775-8edb-af2d9a6e28cd"),
// 				Restriction: &armmediaservices.ContentKeyPolicyOpenRestriction{
// 					ODataType: to.Ptr("#Microsoft.Media.ContentKeyPolicyOpenRestriction"),
// 				},
// 		}},
// 		PolicyID: to.Ptr("a9bacd1d-60f5-4af3-8d2b-cf46ca5c9b04"),
// 	},
// }
Output:

Example (CreatesAContentKeyPolicyWithWidevineOptionAndTokenRestriction)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/content-key-policies-create-widevine-token.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewContentKeyPoliciesClient().CreateOrUpdate(ctx, "contoso", "contosomedia", "PolicyWithWidevineOptionAndJwtTokenRestriction", armmediaservices.ContentKeyPolicy{
	Properties: &armmediaservices.ContentKeyPolicyProperties{
		Description: to.Ptr("ArmPolicyDescription"),
		Options: []*armmediaservices.ContentKeyPolicyOption{
			{
				Name: to.Ptr("widevineoption"),
				Configuration: &armmediaservices.ContentKeyPolicyWidevineConfiguration{
					ODataType:        to.Ptr("#Microsoft.Media.ContentKeyPolicyWidevineConfiguration"),
					WidevineTemplate: to.Ptr("{\"allowed_track_types\":\"SD_HD\",\"content_key_specs\":[{\"track_type\":\"SD\",\"security_level\":1,\"required_output_protection\":{\"hdcp\":\"HDCP_V2\"}}],\"policy_overrides\":{\"can_play\":true,\"can_persist\":true,\"can_renew\":false}}"),
				},
				Restriction: &armmediaservices.ContentKeyPolicyTokenRestriction{
					ODataType: to.Ptr("#Microsoft.Media.ContentKeyPolicyTokenRestriction"),
					AlternateVerificationKeys: []armmediaservices.ContentKeyPolicyRestrictionTokenKeyClassification{
						&armmediaservices.ContentKeyPolicySymmetricTokenKey{
							ODataType: to.Ptr("#Microsoft.Media.ContentKeyPolicySymmetricTokenKey"),
							KeyValue:  []byte("AAAAAAAAAAAAAAAAAAAAAA=="),
						}},
					Audience: to.Ptr("urn:audience"),
					Issuer:   to.Ptr("urn:issuer"),
					PrimaryVerificationKey: &armmediaservices.ContentKeyPolicyRsaTokenKey{
						ODataType: to.Ptr("#Microsoft.Media.ContentKeyPolicyRsaTokenKey"),
						Exponent:  []byte("AQAB"),
						Modulus:   []byte("AQAD"),
					},
					RestrictionTokenType: to.Ptr(armmediaservices.ContentKeyPolicyRestrictionTokenTypeJwt),
				},
			}},
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ContentKeyPolicy = armmediaservices.ContentKeyPolicy{
// 	Name: to.Ptr("PolicyWithWidevineOptionAndJwtTokenRestriction"),
// 	Type: to.Ptr("Microsoft.Media/mediaservices/contentKeyPolicies"),
// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/contentKeyPolicies/PolicyWithWidevineOptionAndJwtTokenRestriction"),
// 	Properties: &armmediaservices.ContentKeyPolicyProperties{
// 		Description: to.Ptr("ArmPolicyDescription"),
// 		Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-08T18:29:29.663Z"); return t}()),
// 		LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-08T18:29:29.663Z"); return t}()),
// 		Options: []*armmediaservices.ContentKeyPolicyOption{
// 			{
// 				Name: to.Ptr("widevineoption"),
// 				Configuration: &armmediaservices.ContentKeyPolicyWidevineConfiguration{
// 					ODataType: to.Ptr("#Microsoft.Media.ContentKeyPolicyWidevineConfiguration"),
// 					WidevineTemplate: to.Ptr("{\"allowed_track_types\":\"SD_HD\",\"content_key_specs\":[{\"track_type\":\"SD\",\"security_level\":1,\"required_output_protection\":{\"hdcp\":\"HDCP_V2\"}}],\"policy_overrides\":{\"can_play\":true,\"can_persist\":true,\"can_renew\":false}}"),
// 				},
// 				PolicyOptionID: to.Ptr("26fee004-8dfa-4828-bcad-5e63c637534f"),
// 				Restriction: &armmediaservices.ContentKeyPolicyTokenRestriction{
// 					ODataType: to.Ptr("#Microsoft.Media.ContentKeyPolicyTokenRestriction"),
// 					AlternateVerificationKeys: []armmediaservices.ContentKeyPolicyRestrictionTokenKeyClassification{
// 						&armmediaservices.ContentKeyPolicySymmetricTokenKey{
// 							ODataType: to.Ptr("#Microsoft.Media.ContentKeyPolicySymmetricTokenKey"),
// 							KeyValue: []byte(""),
// 					}},
// 					Audience: to.Ptr("urn:audience"),
// 					Issuer: to.Ptr("urn:issuer"),
// 					PrimaryVerificationKey: &armmediaservices.ContentKeyPolicyRsaTokenKey{
// 						ODataType: to.Ptr("#Microsoft.Media.ContentKeyPolicyRsaTokenKey"),
// 						Exponent: []byte(""),
// 						Modulus: []byte(""),
// 					},
// 					RequiredClaims: []*armmediaservices.ContentKeyPolicyTokenClaim{
// 					},
// 					RestrictionTokenType: to.Ptr(armmediaservices.ContentKeyPolicyRestrictionTokenTypeJwt),
// 				},
// 		}},
// 		PolicyID: to.Ptr("bad1d030-7d5c-4643-8f1e-49807a4bf64c"),
// 	},
// }
Output:

func (*ContentKeyPoliciesClient) Delete

func (client *ContentKeyPoliciesClient) Delete(ctx context.Context, resourceGroupName string, accountName string, contentKeyPolicyName string, options *ContentKeyPoliciesClientDeleteOptions) (ContentKeyPoliciesClientDeleteResponse, error)

Delete - Deletes a Content Key Policy in the Media Services account If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • contentKeyPolicyName - The Content Key Policy name.
  • options - ContentKeyPoliciesClientDeleteOptions contains the optional parameters for the ContentKeyPoliciesClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/content-key-policies-delete.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewContentKeyPoliciesClient().Delete(ctx, "contoso", "contosomedia", "PolicyWithPlayReadyOptionAndOpenRestriction", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*ContentKeyPoliciesClient) Get

func (client *ContentKeyPoliciesClient) Get(ctx context.Context, resourceGroupName string, accountName string, contentKeyPolicyName string, options *ContentKeyPoliciesClientGetOptions) (ContentKeyPoliciesClientGetResponse, error)

Get - Get the details of a Content Key Policy in the Media Services account If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • contentKeyPolicyName - The Content Key Policy name.
  • options - ContentKeyPoliciesClientGetOptions contains the optional parameters for the ContentKeyPoliciesClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/content-key-policies-get-by-name.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewContentKeyPoliciesClient().Get(ctx, "contoso", "contosomedia", "PolicyWithMultipleOptions", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ContentKeyPolicy = armmediaservices.ContentKeyPolicy{
// 	Name: to.Ptr("PolicyWithMultipleOptions"),
// 	Type: to.Ptr("Microsoft.Media/mediaservices/contentKeyPolicies"),
// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/contentKeyPolicies/PolicyWithMultipleOptions"),
// 	Properties: &armmediaservices.ContentKeyPolicyProperties{
// 		Description: to.Ptr("A policy with multiple options."),
// 		Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2015-12-01T00:00:00.000Z"); return t}()),
// 		LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-12-02T00:00:00.000Z"); return t}()),
// 		Options: []*armmediaservices.ContentKeyPolicyOption{
// 			{
// 				Configuration: &armmediaservices.ContentKeyPolicyClearKeyConfiguration{
// 					ODataType: to.Ptr("#Microsoft.Media.ContentKeyPolicyClearKeyConfiguration"),
// 				},
// 				PolicyOptionID: to.Ptr("caf1e28c-8288-4301-8c46-c0f9312c512f"),
// 				Restriction: &armmediaservices.ContentKeyPolicyTokenRestriction{
// 					ODataType: to.Ptr("#Microsoft.Media.ContentKeyPolicyTokenRestriction"),
// 					AlternateVerificationKeys: []armmediaservices.ContentKeyPolicyRestrictionTokenKeyClassification{
// 					},
// 					Audience: to.Ptr("urn:test"),
// 					Issuer: to.Ptr("http://testacs"),
// 					PrimaryVerificationKey: &armmediaservices.ContentKeyPolicySymmetricTokenKey{
// 						ODataType: to.Ptr("#Microsoft.Media.ContentKeyPolicySymmetricTokenKey"),
// 						KeyValue: []byte(""),
// 					},
// 					RequiredClaims: []*armmediaservices.ContentKeyPolicyTokenClaim{
// 						{
// 							ClaimType: to.Ptr("urn:microsoft:azure:mediaservices:contentkeyidentifier"),
// 						},
// 						{
// 							ClaimType: to.Ptr("DRM"),
// 							ClaimValue: to.Ptr("Widevine"),
// 					}},
// 					RestrictionTokenType: to.Ptr(armmediaservices.ContentKeyPolicyRestrictionTokenTypeJwt),
// 				},
// 			},
// 			{
// 				Configuration: &armmediaservices.ContentKeyPolicyWidevineConfiguration{
// 					ODataType: to.Ptr("#Microsoft.Media.ContentKeyPolicyWidevineConfiguration"),
// 					WidevineTemplate: to.Ptr("{\"allowed_track_types\":\"SD_HD\",\"content_key_specs\":[{\"track_type\":\"SD\",\"security_level\":1,\"required_output_protection\":{\"hdcp\":\"HDCP_V2\"}}],\"policy_overrides\":{\"can_play\":true,\"can_persist\":true,\"can_renew\":false}}"),
// 				},
// 				PolicyOptionID: to.Ptr("da346259-0cd6-4609-89dc-15ac131bd92f"),
// 				Restriction: &armmediaservices.ContentKeyPolicyOpenRestriction{
// 					ODataType: to.Ptr("#Microsoft.Media.ContentKeyPolicyOpenRestriction"),
// 				},
// 		}},
// 		PolicyID: to.Ptr("ed7f3d1b-cfa7-4181-b966-e0b3027eec3a"),
// 	},
// }
Output:

func (*ContentKeyPoliciesClient) GetPolicyPropertiesWithSecrets

func (client *ContentKeyPoliciesClient) GetPolicyPropertiesWithSecrets(ctx context.Context, resourceGroupName string, accountName string, contentKeyPolicyName string, options *ContentKeyPoliciesClientGetPolicyPropertiesWithSecretsOptions) (ContentKeyPoliciesClientGetPolicyPropertiesWithSecretsResponse, error)

GetPolicyPropertiesWithSecrets - Get a Content Key Policy including secret values If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • contentKeyPolicyName - The Content Key Policy name.
  • options - ContentKeyPoliciesClientGetPolicyPropertiesWithSecretsOptions contains the optional parameters for the ContentKeyPoliciesClient.GetPolicyPropertiesWithSecrets method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/content-key-policies-get-with-secrets.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewContentKeyPoliciesClient().GetPolicyPropertiesWithSecrets(ctx, "contoso", "contosomedia", "PolicyWithMultipleOptions", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ContentKeyPolicyProperties = armmediaservices.ContentKeyPolicyProperties{
// 	Description: to.Ptr("A policy with multiple options."),
// 	Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2015-12-01T00:00:00.000Z"); return t}()),
// 	LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-12-02T00:00:00.000Z"); return t}()),
// 	Options: []*armmediaservices.ContentKeyPolicyOption{
// 		{
// 			Configuration: &armmediaservices.ContentKeyPolicyClearKeyConfiguration{
// 				ODataType: to.Ptr("#Microsoft.Media.ContentKeyPolicyClearKeyConfiguration"),
// 			},
// 			PolicyOptionID: to.Ptr("caf1e28c-8288-4301-8c46-c0f9312c512f"),
// 			Restriction: &armmediaservices.ContentKeyPolicyTokenRestriction{
// 				ODataType: to.Ptr("#Microsoft.Media.ContentKeyPolicyTokenRestriction"),
// 				AlternateVerificationKeys: []armmediaservices.ContentKeyPolicyRestrictionTokenKeyClassification{
// 				},
// 				Audience: to.Ptr("urn:test"),
// 				Issuer: to.Ptr("http://testacs"),
// 				PrimaryVerificationKey: &armmediaservices.ContentKeyPolicySymmetricTokenKey{
// 					ODataType: to.Ptr("#Microsoft.Media.ContentKeyPolicySymmetricTokenKey"),
// 					KeyValue: []byte("AAA="),
// 				},
// 				RequiredClaims: []*armmediaservices.ContentKeyPolicyTokenClaim{
// 					{
// 						ClaimType: to.Ptr("urn:microsoft:azure:mediaservices:contentkeyidentifier"),
// 					},
// 					{
// 						ClaimType: to.Ptr("DRM"),
// 						ClaimValue: to.Ptr("Widevine"),
// 				}},
// 				RestrictionTokenType: to.Ptr(armmediaservices.ContentKeyPolicyRestrictionTokenTypeJwt),
// 			},
// 		},
// 		{
// 			Configuration: &armmediaservices.ContentKeyPolicyWidevineConfiguration{
// 				ODataType: to.Ptr("#Microsoft.Media.ContentKeyPolicyWidevineConfiguration"),
// 				WidevineTemplate: to.Ptr("{\"allowed_track_types\":\"SD_HD\",\"content_key_specs\":[{\"track_type\":\"SD\",\"security_level\":1,\"required_output_protection\":{\"hdcp\":\"HDCP_V2\"}}],\"policy_overrides\":{\"can_play\":true,\"can_persist\":true,\"can_renew\":false}}"),
// 			},
// 			PolicyOptionID: to.Ptr("da346259-0cd6-4609-89dc-15ac131bd92f"),
// 			Restriction: &armmediaservices.ContentKeyPolicyOpenRestriction{
// 				ODataType: to.Ptr("#Microsoft.Media.ContentKeyPolicyOpenRestriction"),
// 			},
// 	}},
// 	PolicyID: to.Ptr("ed7f3d1b-cfa7-4181-b966-e0b3027eec3a"),
// }
Output:

func (*ContentKeyPoliciesClient) NewListPager

func (client *ContentKeyPoliciesClient) NewListPager(resourceGroupName string, accountName string, options *ContentKeyPoliciesClientListOptions) *runtime.Pager[ContentKeyPoliciesClientListResponse]

NewListPager - Lists the Content Key Policies in the account

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • options - ContentKeyPoliciesClientListOptions contains the optional parameters for the ContentKeyPoliciesClient.NewListPager method.
Example (ListsAllContentKeyPolicies)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/content-key-policies-list-all.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewContentKeyPoliciesClient().NewListPager("contoso", "contosomedia", &armmediaservices.ContentKeyPoliciesClientListOptions{Filter: nil,
	Top:     nil,
	Orderby: nil,
})
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.ContentKeyPolicyCollection = armmediaservices.ContentKeyPolicyCollection{
	// 	Value: []*armmediaservices.ContentKeyPolicy{
	// 		{
	// 			Name: to.Ptr("PolicyWithClearKeyOptionAndTokenRestriction"),
	// 			Type: to.Ptr("Microsoft.Media/mediaservices/contentKeyPolicies"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/contentKeyPolicies/PolicyWithClearKeyOptionAndTokenRestriction"),
	// 			Properties: &armmediaservices.ContentKeyPolicyProperties{
	// 				Description: to.Ptr("A policy with one ClearKey option and Open Restriction."),
	// 				Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-01T00:00:00.000Z"); return t}()),
	// 				LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-01T00:00:00.000Z"); return t}()),
	// 				Options: []*armmediaservices.ContentKeyPolicyOption{
	// 					{
	// 						Configuration: &armmediaservices.ContentKeyPolicyClearKeyConfiguration{
	// 							ODataType: to.Ptr("#Microsoft.Media.ContentKeyPolicyClearKeyConfiguration"),
	// 						},
	// 						PolicyOptionID: to.Ptr("a3448d09-567a-4642-8309-d17e846be59f"),
	// 						Restriction: &armmediaservices.ContentKeyPolicyTokenRestriction{
	// 							ODataType: to.Ptr("#Microsoft.Media.ContentKeyPolicyTokenRestriction"),
	// 							AlternateVerificationKeys: []armmediaservices.ContentKeyPolicyRestrictionTokenKeyClassification{
	// 							},
	// 							Audience: to.Ptr("urn:test"),
	// 							Issuer: to.Ptr("http://testacs"),
	// 							PrimaryVerificationKey: &armmediaservices.ContentKeyPolicySymmetricTokenKey{
	// 								ODataType: to.Ptr("#Microsoft.Media.ContentKeyPolicySymmetricTokenKey"),
	// 								KeyValue: []byte(""),
	// 							},
	// 							RequiredClaims: []*armmediaservices.ContentKeyPolicyTokenClaim{
	// 								{
	// 									ClaimType: to.Ptr("urn:microsoft:azure:mediaservices:contentkeyidentifier"),
	// 								},
	// 								{
	// 									ClaimType: to.Ptr("DRM"),
	// 									ClaimValue: to.Ptr("Widevine"),
	// 							}},
	// 							RestrictionTokenType: to.Ptr(armmediaservices.ContentKeyPolicyRestrictionTokenTypeJwt),
	// 						},
	// 				}},
	// 				PolicyID: to.Ptr("8352435b-ebea-4681-aae7-e19277771f64"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("PolicyWithMultipleOptions"),
	// 			Type: to.Ptr("Microsoft.Media/mediaservices/contentKeyPolicies"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/contentKeyPolicies/PolicyWithMultipleOptions"),
	// 			Properties: &armmediaservices.ContentKeyPolicyProperties{
	// 				Description: to.Ptr("A policy with multiple options."),
	// 				Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2015-12-01T00:00:00.000Z"); return t}()),
	// 				LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-12-02T00:00:00.000Z"); return t}()),
	// 				Options: []*armmediaservices.ContentKeyPolicyOption{
	// 					{
	// 						Configuration: &armmediaservices.ContentKeyPolicyClearKeyConfiguration{
	// 							ODataType: to.Ptr("#Microsoft.Media.ContentKeyPolicyClearKeyConfiguration"),
	// 						},
	// 						PolicyOptionID: to.Ptr("caf1e28c-8288-4301-8c46-c0f9312c512f"),
	// 						Restriction: &armmediaservices.ContentKeyPolicyTokenRestriction{
	// 							ODataType: to.Ptr("#Microsoft.Media.ContentKeyPolicyTokenRestriction"),
	// 							AlternateVerificationKeys: []armmediaservices.ContentKeyPolicyRestrictionTokenKeyClassification{
	// 							},
	// 							Audience: to.Ptr("urn:test"),
	// 							Issuer: to.Ptr("http://testacs"),
	// 							PrimaryVerificationKey: &armmediaservices.ContentKeyPolicySymmetricTokenKey{
	// 								ODataType: to.Ptr("#Microsoft.Media.ContentKeyPolicySymmetricTokenKey"),
	// 								KeyValue: []byte(""),
	// 							},
	// 							RequiredClaims: []*armmediaservices.ContentKeyPolicyTokenClaim{
	// 								{
	// 									ClaimType: to.Ptr("urn:microsoft:azure:mediaservices:contentkeyidentifier"),
	// 								},
	// 								{
	// 									ClaimType: to.Ptr("DRM"),
	// 									ClaimValue: to.Ptr("Widevine"),
	// 							}},
	// 							RestrictionTokenType: to.Ptr(armmediaservices.ContentKeyPolicyRestrictionTokenTypeJwt),
	// 						},
	// 					},
	// 					{
	// 						Configuration: &armmediaservices.ContentKeyPolicyWidevineConfiguration{
	// 							ODataType: to.Ptr("#Microsoft.Media.ContentKeyPolicyWidevineConfiguration"),
	// 							WidevineTemplate: to.Ptr("{\"allowed_track_types\":\"SD_HD\",\"content_key_specs\":[{\"track_type\":\"SD\",\"security_level\":1,\"required_output_protection\":{\"hdcp\":\"HDCP_V2\"}}],\"policy_overrides\":{\"can_play\":true,\"can_persist\":true,\"can_renew\":false}}"),
	// 						},
	// 						PolicyOptionID: to.Ptr("da346259-0cd6-4609-89dc-15ac131bd92f"),
	// 						Restriction: &armmediaservices.ContentKeyPolicyOpenRestriction{
	// 							ODataType: to.Ptr("#Microsoft.Media.ContentKeyPolicyOpenRestriction"),
	// 						},
	// 				}},
	// 				PolicyID: to.Ptr("ed7f3d1b-cfa7-4181-b966-e0b3027eec3a"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("PolicyWithPlayReadyOptionAndOpenRestriction"),
	// 			Type: to.Ptr("Microsoft.Media/mediaservices/contentKeyPolicies"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/contentKeyPolicies/PolicyWithPlayReadyOptionAndOpenRestriction"),
	// 			Properties: &armmediaservices.ContentKeyPolicyProperties{
	// 				Description: to.Ptr("A policy with one PlayReady option and Open Restriction."),
	// 				Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2012-11-01T00:00:00.000Z"); return t}()),
	// 				LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2012-11-01T00:00:00.000Z"); return t}()),
	// 				Options: []*armmediaservices.ContentKeyPolicyOption{
	// 					{
	// 						Configuration: &armmediaservices.ContentKeyPolicyPlayReadyConfiguration{
	// 							ODataType: to.Ptr("#Microsoft.Media.ContentKeyPolicyPlayReadyConfiguration"),
	// 							Licenses: []*armmediaservices.ContentKeyPolicyPlayReadyLicense{
	// 								{
	// 									AllowTestDevices: to.Ptr(false),
	// 									ContentKeyLocation: &armmediaservices.ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader{
	// 										ODataType: to.Ptr("#Microsoft.Media.ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader"),
	// 									},
	// 									ContentType: to.Ptr(armmediaservices.ContentKeyPolicyPlayReadyContentTypeUnspecified),
	// 									LicenseType: to.Ptr(armmediaservices.ContentKeyPolicyPlayReadyLicenseTypeNonPersistent),
	// 									PlayRight: &armmediaservices.ContentKeyPolicyPlayReadyPlayRight{
	// 										AllowPassingVideoContentToUnknownOutput: to.Ptr(armmediaservices.ContentKeyPolicyPlayReadyUnknownOutputPassingOptionNotAllowed),
	// 										DigitalVideoOnlyContentRestriction: to.Ptr(false),
	// 										ImageConstraintForAnalogComponentVideoRestriction: to.Ptr(false),
	// 										ImageConstraintForAnalogComputerMonitorRestriction: to.Ptr(false),
	// 									},
	// 									SecurityLevel: to.Ptr(armmediaservices.SecurityLevelSL2000),
	// 							}},
	// 							ResponseCustomData: to.Ptr("testCustomData"),
	// 						},
	// 						PolicyOptionID: to.Ptr("294a833f-f128-48be-9edf-8d1bb5b35ff3"),
	// 						Restriction: &armmediaservices.ContentKeyPolicyOpenRestriction{
	// 							ODataType: to.Ptr("#Microsoft.Media.ContentKeyPolicyOpenRestriction"),
	// 						},
	// 				}},
	// 				PolicyID: to.Ptr("a9bacd1d-60f5-4af3-8d2b-cf46ca5c9b04"),
	// 			},
	// 	}},
	// }
}
Output:

Example (ListsContentKeyPoliciesOrderedByLastModified)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/content-key-policies-list-by-lastModified.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewContentKeyPoliciesClient().NewListPager("contoso", "contosomedia", &armmediaservices.ContentKeyPoliciesClientListOptions{Filter: nil,
	Top:     nil,
	Orderby: to.Ptr("properties/lastModified"),
})
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.ContentKeyPolicyCollection = armmediaservices.ContentKeyPolicyCollection{
	// 	Value: []*armmediaservices.ContentKeyPolicy{
	// 		{
	// 			Name: to.Ptr("PolicyWithPlayReadyOptionAndOpenRestriction"),
	// 			Type: to.Ptr("Microsoft.Media/mediaservices/contentKeyPolicies"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/contentKeyPolicies/PolicyWithPlayReadyOptionAndOpenRestriction"),
	// 			Properties: &armmediaservices.ContentKeyPolicyProperties{
	// 				Description: to.Ptr("A policy with one PlayReady option and Open Restriction."),
	// 				Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2012-11-01T00:00:00.000Z"); return t}()),
	// 				LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2012-11-01T00:00:00.000Z"); return t}()),
	// 				Options: []*armmediaservices.ContentKeyPolicyOption{
	// 					{
	// 						Configuration: &armmediaservices.ContentKeyPolicyPlayReadyConfiguration{
	// 							ODataType: to.Ptr("#Microsoft.Media.ContentKeyPolicyPlayReadyConfiguration"),
	// 							Licenses: []*armmediaservices.ContentKeyPolicyPlayReadyLicense{
	// 								{
	// 									AllowTestDevices: to.Ptr(false),
	// 									ContentKeyLocation: &armmediaservices.ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader{
	// 										ODataType: to.Ptr("#Microsoft.Media.ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader"),
	// 									},
	// 									ContentType: to.Ptr(armmediaservices.ContentKeyPolicyPlayReadyContentTypeUnspecified),
	// 									LicenseType: to.Ptr(armmediaservices.ContentKeyPolicyPlayReadyLicenseTypeNonPersistent),
	// 									PlayRight: &armmediaservices.ContentKeyPolicyPlayReadyPlayRight{
	// 										AllowPassingVideoContentToUnknownOutput: to.Ptr(armmediaservices.ContentKeyPolicyPlayReadyUnknownOutputPassingOptionNotAllowed),
	// 										DigitalVideoOnlyContentRestriction: to.Ptr(false),
	// 										ImageConstraintForAnalogComponentVideoRestriction: to.Ptr(false),
	// 										ImageConstraintForAnalogComputerMonitorRestriction: to.Ptr(false),
	// 									},
	// 									SecurityLevel: to.Ptr(armmediaservices.SecurityLevelSL2000),
	// 							}},
	// 							ResponseCustomData: to.Ptr("testCustomData"),
	// 						},
	// 						PolicyOptionID: to.Ptr("294a833f-f128-48be-9edf-8d1bb5b35ff3"),
	// 						Restriction: &armmediaservices.ContentKeyPolicyOpenRestriction{
	// 							ODataType: to.Ptr("#Microsoft.Media.ContentKeyPolicyOpenRestriction"),
	// 						},
	// 				}},
	// 				PolicyID: to.Ptr("a9bacd1d-60f5-4af3-8d2b-cf46ca5c9b04"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("PolicyWithMultipleOptions"),
	// 			Type: to.Ptr("Microsoft.Media/mediaservices/contentKeyPolicies"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/contentKeyPolicies/PolicyWithMultipleOptions"),
	// 			Properties: &armmediaservices.ContentKeyPolicyProperties{
	// 				Description: to.Ptr("A policy with multiple options."),
	// 				Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2015-12-01T00:00:00.000Z"); return t}()),
	// 				LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-12-02T00:00:00.000Z"); return t}()),
	// 				Options: []*armmediaservices.ContentKeyPolicyOption{
	// 					{
	// 						Configuration: &armmediaservices.ContentKeyPolicyClearKeyConfiguration{
	// 							ODataType: to.Ptr("#Microsoft.Media.ContentKeyPolicyClearKeyConfiguration"),
	// 						},
	// 						PolicyOptionID: to.Ptr("caf1e28c-8288-4301-8c46-c0f9312c512f"),
	// 						Restriction: &armmediaservices.ContentKeyPolicyTokenRestriction{
	// 							ODataType: to.Ptr("#Microsoft.Media.ContentKeyPolicyTokenRestriction"),
	// 							AlternateVerificationKeys: []armmediaservices.ContentKeyPolicyRestrictionTokenKeyClassification{
	// 							},
	// 							Audience: to.Ptr("urn:test"),
	// 							Issuer: to.Ptr("http://testacs"),
	// 							PrimaryVerificationKey: &armmediaservices.ContentKeyPolicySymmetricTokenKey{
	// 								ODataType: to.Ptr("#Microsoft.Media.ContentKeyPolicySymmetricTokenKey"),
	// 								KeyValue: []byte(""),
	// 							},
	// 							RequiredClaims: []*armmediaservices.ContentKeyPolicyTokenClaim{
	// 								{
	// 									ClaimType: to.Ptr("urn:microsoft:azure:mediaservices:contentkeyidentifier"),
	// 								},
	// 								{
	// 									ClaimType: to.Ptr("DRM"),
	// 									ClaimValue: to.Ptr("Widevine"),
	// 							}},
	// 							RestrictionTokenType: to.Ptr(armmediaservices.ContentKeyPolicyRestrictionTokenTypeJwt),
	// 						},
	// 					},
	// 					{
	// 						Configuration: &armmediaservices.ContentKeyPolicyWidevineConfiguration{
	// 							ODataType: to.Ptr("#Microsoft.Media.ContentKeyPolicyWidevineConfiguration"),
	// 							WidevineTemplate: to.Ptr("{\"allowed_track_types\":\"SD_HD\",\"content_key_specs\":[{\"track_type\":\"SD\",\"security_level\":1,\"required_output_protection\":{\"hdcp\":\"HDCP_V2\"}}],\"policy_overrides\":{\"can_play\":true,\"can_persist\":true,\"can_renew\":false}}"),
	// 						},
	// 						PolicyOptionID: to.Ptr("da346259-0cd6-4609-89dc-15ac131bd92f"),
	// 						Restriction: &armmediaservices.ContentKeyPolicyOpenRestriction{
	// 							ODataType: to.Ptr("#Microsoft.Media.ContentKeyPolicyOpenRestriction"),
	// 						},
	// 				}},
	// 				PolicyID: to.Ptr("ed7f3d1b-cfa7-4181-b966-e0b3027eec3a"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("PolicyWithClearKeyOptionAndTokenRestriction"),
	// 			Type: to.Ptr("Microsoft.Media/mediaservices/contentKeyPolicies"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/contentKeyPolicies/PolicyWithClearKeyOptionAndTokenRestriction"),
	// 			Properties: &armmediaservices.ContentKeyPolicyProperties{
	// 				Description: to.Ptr("A policy with one ClearKey option and Open Restriction."),
	// 				Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-01T00:00:00.000Z"); return t}()),
	// 				LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-01T00:00:00.000Z"); return t}()),
	// 				Options: []*armmediaservices.ContentKeyPolicyOption{
	// 					{
	// 						Configuration: &armmediaservices.ContentKeyPolicyClearKeyConfiguration{
	// 							ODataType: to.Ptr("#Microsoft.Media.ContentKeyPolicyClearKeyConfiguration"),
	// 						},
	// 						PolicyOptionID: to.Ptr("a3448d09-567a-4642-8309-d17e846be59f"),
	// 						Restriction: &armmediaservices.ContentKeyPolicyTokenRestriction{
	// 							ODataType: to.Ptr("#Microsoft.Media.ContentKeyPolicyTokenRestriction"),
	// 							AlternateVerificationKeys: []armmediaservices.ContentKeyPolicyRestrictionTokenKeyClassification{
	// 							},
	// 							Audience: to.Ptr("urn:test"),
	// 							Issuer: to.Ptr("http://testacs"),
	// 							PrimaryVerificationKey: &armmediaservices.ContentKeyPolicySymmetricTokenKey{
	// 								ODataType: to.Ptr("#Microsoft.Media.ContentKeyPolicySymmetricTokenKey"),
	// 								KeyValue: []byte(""),
	// 							},
	// 							RequiredClaims: []*armmediaservices.ContentKeyPolicyTokenClaim{
	// 								{
	// 									ClaimType: to.Ptr("urn:microsoft:azure:mediaservices:contentkeyidentifier"),
	// 								},
	// 								{
	// 									ClaimType: to.Ptr("DRM"),
	// 									ClaimValue: to.Ptr("Widevine"),
	// 							}},
	// 							RestrictionTokenType: to.Ptr(armmediaservices.ContentKeyPolicyRestrictionTokenTypeJwt),
	// 						},
	// 				}},
	// 				PolicyID: to.Ptr("8352435b-ebea-4681-aae7-e19277771f64"),
	// 			},
	// 	}},
	// }
}
Output:

Example (ListsContentKeyPoliciesWithCreatedAndLastModifiedFilters)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/content-key-policies-list-in-date-range.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewContentKeyPoliciesClient().NewListPager("contoso", "contosomedia", &armmediaservices.ContentKeyPoliciesClientListOptions{Filter: to.Ptr("properties/lastModified gt 2016-06-01 and properties/created lt 2013-07-01"),
	Top:     nil,
	Orderby: nil,
})
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.ContentKeyPolicyCollection = armmediaservices.ContentKeyPolicyCollection{
	// 	Value: []*armmediaservices.ContentKeyPolicy{
	// 	},
	// }
}
Output:

func (*ContentKeyPoliciesClient) Update

func (client *ContentKeyPoliciesClient) Update(ctx context.Context, resourceGroupName string, accountName string, contentKeyPolicyName string, parameters ContentKeyPolicy, options *ContentKeyPoliciesClientUpdateOptions) (ContentKeyPoliciesClientUpdateResponse, error)

Update - Updates an existing Content Key Policy in the Media Services account If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • contentKeyPolicyName - The Content Key Policy name.
  • parameters - The request parameters
  • options - ContentKeyPoliciesClientUpdateOptions contains the optional parameters for the ContentKeyPoliciesClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/content-key-policies-update.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewContentKeyPoliciesClient().Update(ctx, "contoso", "contosomedia", "PolicyWithClearKeyOptionAndTokenRestriction", armmediaservices.ContentKeyPolicy{
	Properties: &armmediaservices.ContentKeyPolicyProperties{
		Description: to.Ptr("Updated Policy"),
		Options: []*armmediaservices.ContentKeyPolicyOption{
			{
				Name: to.Ptr("ClearKeyOption"),
				Configuration: &armmediaservices.ContentKeyPolicyClearKeyConfiguration{
					ODataType: to.Ptr("#Microsoft.Media.ContentKeyPolicyClearKeyConfiguration"),
				},
				Restriction: &armmediaservices.ContentKeyPolicyOpenRestriction{
					ODataType: to.Ptr("#Microsoft.Media.ContentKeyPolicyOpenRestriction"),
				},
			}},
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ContentKeyPolicy = armmediaservices.ContentKeyPolicy{
// 	Name: to.Ptr("PolicyWithClearKeyOptionAndTokenRestriction"),
// 	Type: to.Ptr("Microsoft.Media/mediaservices/contentKeyPolicies"),
// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/contentKeyPolicies/PolicyWithClearKeyOptionAndTokenRestriction"),
// 	Properties: &armmediaservices.ContentKeyPolicyProperties{
// 		Description: to.Ptr("Updated Policy"),
// 		Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-01T00:00:00.000Z"); return t}()),
// 		LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-08T18:29:30.303Z"); return t}()),
// 		Options: []*armmediaservices.ContentKeyPolicyOption{
// 			{
// 				Name: to.Ptr("ClearKeyOption"),
// 				Configuration: &armmediaservices.ContentKeyPolicyClearKeyConfiguration{
// 					ODataType: to.Ptr("#Microsoft.Media.ContentKeyPolicyClearKeyConfiguration"),
// 				},
// 				PolicyOptionID: to.Ptr("7d3f4bc1-d2bf-43a3-b02e-a7e31ab15d43"),
// 				Restriction: &armmediaservices.ContentKeyPolicyOpenRestriction{
// 					ODataType: to.Ptr("#Microsoft.Media.ContentKeyPolicyOpenRestriction"),
// 				},
// 		}},
// 		PolicyID: to.Ptr("8352435b-ebea-4681-aae7-e19277771f64"),
// 	},
// }
Output:

type ContentKeyPoliciesClientCreateOrUpdateOptions

type ContentKeyPoliciesClientCreateOrUpdateOptions struct {
}

ContentKeyPoliciesClientCreateOrUpdateOptions contains the optional parameters for the ContentKeyPoliciesClient.CreateOrUpdate method.

type ContentKeyPoliciesClientCreateOrUpdateResponse

type ContentKeyPoliciesClientCreateOrUpdateResponse struct {
	// A Content Key Policy resource.
	ContentKeyPolicy
}

ContentKeyPoliciesClientCreateOrUpdateResponse contains the response from method ContentKeyPoliciesClient.CreateOrUpdate.

type ContentKeyPoliciesClientDeleteOptions

type ContentKeyPoliciesClientDeleteOptions struct {
}

ContentKeyPoliciesClientDeleteOptions contains the optional parameters for the ContentKeyPoliciesClient.Delete method.

type ContentKeyPoliciesClientDeleteResponse

type ContentKeyPoliciesClientDeleteResponse struct {
}

ContentKeyPoliciesClientDeleteResponse contains the response from method ContentKeyPoliciesClient.Delete.

type ContentKeyPoliciesClientGetOptions

type ContentKeyPoliciesClientGetOptions struct {
}

ContentKeyPoliciesClientGetOptions contains the optional parameters for the ContentKeyPoliciesClient.Get method.

type ContentKeyPoliciesClientGetPolicyPropertiesWithSecretsOptions

type ContentKeyPoliciesClientGetPolicyPropertiesWithSecretsOptions struct {
}

ContentKeyPoliciesClientGetPolicyPropertiesWithSecretsOptions contains the optional parameters for the ContentKeyPoliciesClient.GetPolicyPropertiesWithSecrets method.

type ContentKeyPoliciesClientGetPolicyPropertiesWithSecretsResponse

type ContentKeyPoliciesClientGetPolicyPropertiesWithSecretsResponse struct {
	// The properties of the Content Key Policy.
	ContentKeyPolicyProperties
}

ContentKeyPoliciesClientGetPolicyPropertiesWithSecretsResponse contains the response from method ContentKeyPoliciesClient.GetPolicyPropertiesWithSecrets.

type ContentKeyPoliciesClientGetResponse

type ContentKeyPoliciesClientGetResponse struct {
	// A Content Key Policy resource.
	ContentKeyPolicy
}

ContentKeyPoliciesClientGetResponse contains the response from method ContentKeyPoliciesClient.Get.

type ContentKeyPoliciesClientListOptions

type ContentKeyPoliciesClientListOptions struct {
	// Restricts the set of items returned.
	Filter *string

	// Specifies the key by which the result collection should be ordered.
	Orderby *string

	// Specifies a non-negative integer n that limits the number of items returned from a collection. The service returns the
	// number of available items up to but not greater than the specified value n.
	Top *int32
}

ContentKeyPoliciesClientListOptions contains the optional parameters for the ContentKeyPoliciesClient.NewListPager method.

type ContentKeyPoliciesClientListResponse

type ContentKeyPoliciesClientListResponse struct {
	// A collection of ContentKeyPolicy items.
	ContentKeyPolicyCollection
}

ContentKeyPoliciesClientListResponse contains the response from method ContentKeyPoliciesClient.NewListPager.

type ContentKeyPoliciesClientUpdateOptions

type ContentKeyPoliciesClientUpdateOptions struct {
}

ContentKeyPoliciesClientUpdateOptions contains the optional parameters for the ContentKeyPoliciesClient.Update method.

type ContentKeyPoliciesClientUpdateResponse

type ContentKeyPoliciesClientUpdateResponse struct {
	// A Content Key Policy resource.
	ContentKeyPolicy
}

ContentKeyPoliciesClientUpdateResponse contains the response from method ContentKeyPoliciesClient.Update.

type ContentKeyPolicy

type ContentKeyPolicy struct {
	// The properties of the Content Key Policy.
	Properties *ContentKeyPolicyProperties

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; The system metadata relating to this resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

ContentKeyPolicy - A Content Key Policy resource.

func (ContentKeyPolicy) MarshalJSON

func (c ContentKeyPolicy) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ContentKeyPolicy.

func (*ContentKeyPolicy) UnmarshalJSON

func (c *ContentKeyPolicy) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ContentKeyPolicy.

type ContentKeyPolicyClearKeyConfiguration

type ContentKeyPolicyClearKeyConfiguration struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string
}

ContentKeyPolicyClearKeyConfiguration - Represents a configuration for non-DRM keys.

func (*ContentKeyPolicyClearKeyConfiguration) GetContentKeyPolicyConfiguration

func (c *ContentKeyPolicyClearKeyConfiguration) GetContentKeyPolicyConfiguration() *ContentKeyPolicyConfiguration

GetContentKeyPolicyConfiguration implements the ContentKeyPolicyConfigurationClassification interface for type ContentKeyPolicyClearKeyConfiguration.

func (ContentKeyPolicyClearKeyConfiguration) MarshalJSON

func (c ContentKeyPolicyClearKeyConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ContentKeyPolicyClearKeyConfiguration.

func (*ContentKeyPolicyClearKeyConfiguration) UnmarshalJSON

func (c *ContentKeyPolicyClearKeyConfiguration) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ContentKeyPolicyClearKeyConfiguration.

type ContentKeyPolicyCollection

type ContentKeyPolicyCollection struct {
	// A link to the next page of the collection (when the collection contains too many results to return in one response).
	ODataNextLink *string

	// A collection of ContentKeyPolicy items.
	Value []*ContentKeyPolicy
}

ContentKeyPolicyCollection - A collection of ContentKeyPolicy items.

func (ContentKeyPolicyCollection) MarshalJSON

func (c ContentKeyPolicyCollection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ContentKeyPolicyCollection.

func (*ContentKeyPolicyCollection) UnmarshalJSON

func (c *ContentKeyPolicyCollection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ContentKeyPolicyCollection.

type ContentKeyPolicyConfiguration

type ContentKeyPolicyConfiguration struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string
}

ContentKeyPolicyConfiguration - Base class for Content Key Policy configuration. A derived class must be used to create a configuration.

func (*ContentKeyPolicyConfiguration) GetContentKeyPolicyConfiguration

func (c *ContentKeyPolicyConfiguration) GetContentKeyPolicyConfiguration() *ContentKeyPolicyConfiguration

GetContentKeyPolicyConfiguration implements the ContentKeyPolicyConfigurationClassification interface for type ContentKeyPolicyConfiguration.

func (ContentKeyPolicyConfiguration) MarshalJSON

func (c ContentKeyPolicyConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ContentKeyPolicyConfiguration.

func (*ContentKeyPolicyConfiguration) UnmarshalJSON

func (c *ContentKeyPolicyConfiguration) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ContentKeyPolicyConfiguration.

type ContentKeyPolicyConfigurationClassification

type ContentKeyPolicyConfigurationClassification interface {
	// GetContentKeyPolicyConfiguration returns the ContentKeyPolicyConfiguration content of the underlying type.
	GetContentKeyPolicyConfiguration() *ContentKeyPolicyConfiguration
}

ContentKeyPolicyConfigurationClassification provides polymorphic access to related types. Call the interface's GetContentKeyPolicyConfiguration() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *ContentKeyPolicyClearKeyConfiguration, *ContentKeyPolicyConfiguration, *ContentKeyPolicyFairPlayConfiguration, *ContentKeyPolicyPlayReadyConfiguration, - *ContentKeyPolicyUnknownConfiguration, *ContentKeyPolicyWidevineConfiguration

type ContentKeyPolicyFairPlayConfiguration

type ContentKeyPolicyFairPlayConfiguration struct {
	// REQUIRED; The key that must be used as FairPlay Application Secret key. This needs to be base64 encoded.
	Ask []byte

	// REQUIRED; The Base64 representation of FairPlay certificate in PKCS 12 (pfx) format (including private key).
	FairPlayPfx *string

	// REQUIRED; The password encrypting FairPlay certificate in PKCS 12 (pfx) format.
	FairPlayPfxPassword *string

	// REQUIRED; The discriminator for derived types.
	ODataType *string

	// REQUIRED; The rental and lease key type.
	RentalAndLeaseKeyType *ContentKeyPolicyFairPlayRentalAndLeaseKeyType

	// REQUIRED; The rental duration. Must be greater than or equal to 0.
	RentalDuration *int64

	// Offline rental policy
	OfflineRentalConfiguration *ContentKeyPolicyFairPlayOfflineRentalConfiguration
}

ContentKeyPolicyFairPlayConfiguration - Specifies a configuration for FairPlay licenses.

func (*ContentKeyPolicyFairPlayConfiguration) GetContentKeyPolicyConfiguration

func (c *ContentKeyPolicyFairPlayConfiguration) GetContentKeyPolicyConfiguration() *ContentKeyPolicyConfiguration

GetContentKeyPolicyConfiguration implements the ContentKeyPolicyConfigurationClassification interface for type ContentKeyPolicyFairPlayConfiguration.

func (ContentKeyPolicyFairPlayConfiguration) MarshalJSON

func (c ContentKeyPolicyFairPlayConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ContentKeyPolicyFairPlayConfiguration.

func (*ContentKeyPolicyFairPlayConfiguration) UnmarshalJSON

func (c *ContentKeyPolicyFairPlayConfiguration) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ContentKeyPolicyFairPlayConfiguration.

type ContentKeyPolicyFairPlayOfflineRentalConfiguration

type ContentKeyPolicyFairPlayOfflineRentalConfiguration struct {
	// REQUIRED; Playback duration
	PlaybackDurationSeconds *int64

	// REQUIRED; Storage duration
	StorageDurationSeconds *int64
}

func (ContentKeyPolicyFairPlayOfflineRentalConfiguration) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type ContentKeyPolicyFairPlayOfflineRentalConfiguration.

func (*ContentKeyPolicyFairPlayOfflineRentalConfiguration) UnmarshalJSON

UnmarshalJSON implements the json.Unmarshaller interface for type ContentKeyPolicyFairPlayOfflineRentalConfiguration.

type ContentKeyPolicyFairPlayRentalAndLeaseKeyType

type ContentKeyPolicyFairPlayRentalAndLeaseKeyType string

ContentKeyPolicyFairPlayRentalAndLeaseKeyType - The rental and lease key type.

const (
	// ContentKeyPolicyFairPlayRentalAndLeaseKeyTypeDualExpiry - Dual expiry for offline rental.
	ContentKeyPolicyFairPlayRentalAndLeaseKeyTypeDualExpiry ContentKeyPolicyFairPlayRentalAndLeaseKeyType = "DualExpiry"
	// ContentKeyPolicyFairPlayRentalAndLeaseKeyTypePersistentLimited - Content key can be persisted and the valid duration is
	// limited by the Rental Duration value
	ContentKeyPolicyFairPlayRentalAndLeaseKeyTypePersistentLimited ContentKeyPolicyFairPlayRentalAndLeaseKeyType = "PersistentLimited"
	// ContentKeyPolicyFairPlayRentalAndLeaseKeyTypePersistentUnlimited - Content key can be persisted with an unlimited duration
	ContentKeyPolicyFairPlayRentalAndLeaseKeyTypePersistentUnlimited ContentKeyPolicyFairPlayRentalAndLeaseKeyType = "PersistentUnlimited"
	// ContentKeyPolicyFairPlayRentalAndLeaseKeyTypeUndefined - Key duration is not specified.
	ContentKeyPolicyFairPlayRentalAndLeaseKeyTypeUndefined ContentKeyPolicyFairPlayRentalAndLeaseKeyType = "Undefined"
	// ContentKeyPolicyFairPlayRentalAndLeaseKeyTypeUnknown - Represents a ContentKeyPolicyFairPlayRentalAndLeaseKeyType that
	// is unavailable in current API version.
	ContentKeyPolicyFairPlayRentalAndLeaseKeyTypeUnknown ContentKeyPolicyFairPlayRentalAndLeaseKeyType = "Unknown"
)

func PossibleContentKeyPolicyFairPlayRentalAndLeaseKeyTypeValues

func PossibleContentKeyPolicyFairPlayRentalAndLeaseKeyTypeValues() []ContentKeyPolicyFairPlayRentalAndLeaseKeyType

PossibleContentKeyPolicyFairPlayRentalAndLeaseKeyTypeValues returns the possible values for the ContentKeyPolicyFairPlayRentalAndLeaseKeyType const type.

type ContentKeyPolicyOpenRestriction

type ContentKeyPolicyOpenRestriction struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string
}

ContentKeyPolicyOpenRestriction - Represents an open restriction. License or key will be delivered on every request.

func (*ContentKeyPolicyOpenRestriction) GetContentKeyPolicyRestriction

func (c *ContentKeyPolicyOpenRestriction) GetContentKeyPolicyRestriction() *ContentKeyPolicyRestriction

GetContentKeyPolicyRestriction implements the ContentKeyPolicyRestrictionClassification interface for type ContentKeyPolicyOpenRestriction.

func (ContentKeyPolicyOpenRestriction) MarshalJSON

func (c ContentKeyPolicyOpenRestriction) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ContentKeyPolicyOpenRestriction.

func (*ContentKeyPolicyOpenRestriction) UnmarshalJSON

func (c *ContentKeyPolicyOpenRestriction) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ContentKeyPolicyOpenRestriction.

type ContentKeyPolicyOption

type ContentKeyPolicyOption struct {
	// REQUIRED; The key delivery configuration.
	Configuration ContentKeyPolicyConfigurationClassification

	// REQUIRED; The requirements that must be met to deliver keys with this configuration
	Restriction ContentKeyPolicyRestrictionClassification

	// The Policy Option description.
	Name *string

	// READ-ONLY; The legacy Policy Option ID.
	PolicyOptionID *string
}

ContentKeyPolicyOption - Represents a policy option.

func (ContentKeyPolicyOption) MarshalJSON

func (c ContentKeyPolicyOption) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ContentKeyPolicyOption.

func (*ContentKeyPolicyOption) UnmarshalJSON

func (c *ContentKeyPolicyOption) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ContentKeyPolicyOption.

type ContentKeyPolicyPlayReadyConfiguration

type ContentKeyPolicyPlayReadyConfiguration struct {
	// REQUIRED; The PlayReady licenses.
	Licenses []*ContentKeyPolicyPlayReadyLicense

	// REQUIRED; The discriminator for derived types.
	ODataType *string

	// The custom response data.
	ResponseCustomData *string
}

ContentKeyPolicyPlayReadyConfiguration - Specifies a configuration for PlayReady licenses.

func (*ContentKeyPolicyPlayReadyConfiguration) GetContentKeyPolicyConfiguration

func (c *ContentKeyPolicyPlayReadyConfiguration) GetContentKeyPolicyConfiguration() *ContentKeyPolicyConfiguration

GetContentKeyPolicyConfiguration implements the ContentKeyPolicyConfigurationClassification interface for type ContentKeyPolicyPlayReadyConfiguration.

func (ContentKeyPolicyPlayReadyConfiguration) MarshalJSON

func (c ContentKeyPolicyPlayReadyConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ContentKeyPolicyPlayReadyConfiguration.

func (*ContentKeyPolicyPlayReadyConfiguration) UnmarshalJSON

func (c *ContentKeyPolicyPlayReadyConfiguration) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ContentKeyPolicyPlayReadyConfiguration.

type ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader

type ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string
}

ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader - Specifies that the content key ID is in the PlayReady header.

func (*ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader) GetContentKeyPolicyPlayReadyContentKeyLocation

GetContentKeyPolicyPlayReadyContentKeyLocation implements the ContentKeyPolicyPlayReadyContentKeyLocationClassification interface for type ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader.

func (ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader.

func (*ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader) UnmarshalJSON

UnmarshalJSON implements the json.Unmarshaller interface for type ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader.

type ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier

type ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier struct {
	// REQUIRED; The content key ID.
	KeyID *string

	// REQUIRED; The discriminator for derived types.
	ODataType *string
}

ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier - Specifies that the content key ID is specified in the PlayReady configuration.

func (*ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier) GetContentKeyPolicyPlayReadyContentKeyLocation

GetContentKeyPolicyPlayReadyContentKeyLocation implements the ContentKeyPolicyPlayReadyContentKeyLocationClassification interface for type ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier.

func (ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier.

func (*ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier) UnmarshalJSON

UnmarshalJSON implements the json.Unmarshaller interface for type ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier.

type ContentKeyPolicyPlayReadyContentKeyLocation

type ContentKeyPolicyPlayReadyContentKeyLocation struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string
}

ContentKeyPolicyPlayReadyContentKeyLocation - Base class for content key ID location. A derived class must be used to represent the location.

func (*ContentKeyPolicyPlayReadyContentKeyLocation) GetContentKeyPolicyPlayReadyContentKeyLocation

func (c *ContentKeyPolicyPlayReadyContentKeyLocation) GetContentKeyPolicyPlayReadyContentKeyLocation() *ContentKeyPolicyPlayReadyContentKeyLocation

GetContentKeyPolicyPlayReadyContentKeyLocation implements the ContentKeyPolicyPlayReadyContentKeyLocationClassification interface for type ContentKeyPolicyPlayReadyContentKeyLocation.

func (ContentKeyPolicyPlayReadyContentKeyLocation) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type ContentKeyPolicyPlayReadyContentKeyLocation.

func (*ContentKeyPolicyPlayReadyContentKeyLocation) UnmarshalJSON

func (c *ContentKeyPolicyPlayReadyContentKeyLocation) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ContentKeyPolicyPlayReadyContentKeyLocation.

type ContentKeyPolicyPlayReadyContentKeyLocationClassification

type ContentKeyPolicyPlayReadyContentKeyLocationClassification interface {
	// GetContentKeyPolicyPlayReadyContentKeyLocation returns the ContentKeyPolicyPlayReadyContentKeyLocation content of the underlying type.
	GetContentKeyPolicyPlayReadyContentKeyLocation() *ContentKeyPolicyPlayReadyContentKeyLocation
}

ContentKeyPolicyPlayReadyContentKeyLocationClassification provides polymorphic access to related types. Call the interface's GetContentKeyPolicyPlayReadyContentKeyLocation() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader, *ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier, - *ContentKeyPolicyPlayReadyContentKeyLocation

type ContentKeyPolicyPlayReadyContentType

type ContentKeyPolicyPlayReadyContentType string

ContentKeyPolicyPlayReadyContentType - The PlayReady content type.

const (
	// ContentKeyPolicyPlayReadyContentTypeUltraVioletDownload - Ultraviolet download content type.
	ContentKeyPolicyPlayReadyContentTypeUltraVioletDownload ContentKeyPolicyPlayReadyContentType = "UltraVioletDownload"
	// ContentKeyPolicyPlayReadyContentTypeUltraVioletStreaming - Ultraviolet streaming content type.
	ContentKeyPolicyPlayReadyContentTypeUltraVioletStreaming ContentKeyPolicyPlayReadyContentType = "UltraVioletStreaming"
	// ContentKeyPolicyPlayReadyContentTypeUnknown - Represents a ContentKeyPolicyPlayReadyContentType that is unavailable in
	// current API version.
	ContentKeyPolicyPlayReadyContentTypeUnknown ContentKeyPolicyPlayReadyContentType = "Unknown"
	// ContentKeyPolicyPlayReadyContentTypeUnspecified - Unspecified content type.
	ContentKeyPolicyPlayReadyContentTypeUnspecified ContentKeyPolicyPlayReadyContentType = "Unspecified"
)

func PossibleContentKeyPolicyPlayReadyContentTypeValues

func PossibleContentKeyPolicyPlayReadyContentTypeValues() []ContentKeyPolicyPlayReadyContentType

PossibleContentKeyPolicyPlayReadyContentTypeValues returns the possible values for the ContentKeyPolicyPlayReadyContentType const type.

type ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction

type ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction struct {
	// REQUIRED; Indicates whether this restriction is enforced on a Best Effort basis.
	BestEffort *bool

	// REQUIRED; Configures the restriction control bits. Must be between 0 and 3 inclusive.
	ConfigurationData *int32
}

ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction - Configures the Explicit Analog Television Output Restriction control bits. For further details see the PlayReady Compliance Rules.

func (ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction.

func (*ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction) UnmarshalJSON

UnmarshalJSON implements the json.Unmarshaller interface for type ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction.

type ContentKeyPolicyPlayReadyLicense

type ContentKeyPolicyPlayReadyLicense struct {
	// REQUIRED; A flag indicating whether test devices can use the license.
	AllowTestDevices *bool

	// REQUIRED; The content key location.
	ContentKeyLocation ContentKeyPolicyPlayReadyContentKeyLocationClassification

	// REQUIRED; The PlayReady content type.
	ContentType *ContentKeyPolicyPlayReadyContentType

	// REQUIRED; The license type.
	LicenseType *ContentKeyPolicyPlayReadyLicenseType

	// The begin date of license
	BeginDate *time.Time

	// The expiration date of license.
	ExpirationDate *time.Time

	// The grace period of license.
	GracePeriod *string

	// The license PlayRight
	PlayRight *ContentKeyPolicyPlayReadyPlayRight

	// The relative begin date of license.
	RelativeBeginDate *string

	// The relative expiration date of license.
	RelativeExpirationDate *string

	// The security level.
	SecurityLevel *SecurityLevel
}

ContentKeyPolicyPlayReadyLicense - The PlayReady license

func (ContentKeyPolicyPlayReadyLicense) MarshalJSON

func (c ContentKeyPolicyPlayReadyLicense) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ContentKeyPolicyPlayReadyLicense.

func (*ContentKeyPolicyPlayReadyLicense) UnmarshalJSON

func (c *ContentKeyPolicyPlayReadyLicense) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ContentKeyPolicyPlayReadyLicense.

type ContentKeyPolicyPlayReadyLicenseType

type ContentKeyPolicyPlayReadyLicenseType string

ContentKeyPolicyPlayReadyLicenseType - The license type.

const (
	// ContentKeyPolicyPlayReadyLicenseTypeNonPersistent - Non persistent license.
	ContentKeyPolicyPlayReadyLicenseTypeNonPersistent ContentKeyPolicyPlayReadyLicenseType = "NonPersistent"
	// ContentKeyPolicyPlayReadyLicenseTypePersistent - Persistent license. Allows offline playback.
	ContentKeyPolicyPlayReadyLicenseTypePersistent ContentKeyPolicyPlayReadyLicenseType = "Persistent"
	// ContentKeyPolicyPlayReadyLicenseTypeUnknown - Represents a ContentKeyPolicyPlayReadyLicenseType that is unavailable in
	// current API version.
	ContentKeyPolicyPlayReadyLicenseTypeUnknown ContentKeyPolicyPlayReadyLicenseType = "Unknown"
)

func PossibleContentKeyPolicyPlayReadyLicenseTypeValues

func PossibleContentKeyPolicyPlayReadyLicenseTypeValues() []ContentKeyPolicyPlayReadyLicenseType

PossibleContentKeyPolicyPlayReadyLicenseTypeValues returns the possible values for the ContentKeyPolicyPlayReadyLicenseType const type.

type ContentKeyPolicyPlayReadyPlayRight

type ContentKeyPolicyPlayReadyPlayRight struct {
	// REQUIRED; Configures Unknown output handling settings of the license.
	AllowPassingVideoContentToUnknownOutput *ContentKeyPolicyPlayReadyUnknownOutputPassingOption

	// REQUIRED; Enables the Image Constraint For Analog Component Video Restriction in the license.
	DigitalVideoOnlyContentRestriction *bool

	// REQUIRED; Enables the Image Constraint For Analog Component Video Restriction in the license.
	ImageConstraintForAnalogComponentVideoRestriction *bool

	// REQUIRED; Enables the Image Constraint For Analog Component Video Restriction in the license.
	ImageConstraintForAnalogComputerMonitorRestriction *bool

	// Configures Automatic Gain Control (AGC) and Color Stripe in the license. Must be between 0 and 3 inclusive.
	AgcAndColorStripeRestriction *int32

	// Specifies the output protection level for compressed digital audio.
	AnalogVideoOpl *int32

	// Specifies the output protection level for compressed digital audio.
	CompressedDigitalAudioOpl *int32

	// Specifies the output protection level for compressed digital video.
	CompressedDigitalVideoOpl *int32

	// Configures the Explicit Analog Television Output Restriction in the license. Configuration data must be between 0 and 3
	// inclusive.
	ExplicitAnalogTelevisionOutputRestriction *ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction

	// The amount of time that the license is valid after the license is first used to play content.
	FirstPlayExpiration *string

	// Configures the Serial Copy Management System (SCMS) in the license. Must be between 0 and 3 inclusive.
	ScmsRestriction *int32

	// Specifies the output protection level for uncompressed digital audio.
	UncompressedDigitalAudioOpl *int32

	// Specifies the output protection level for uncompressed digital video.
	UncompressedDigitalVideoOpl *int32
}

ContentKeyPolicyPlayReadyPlayRight - Configures the Play Right in the PlayReady license.

func (ContentKeyPolicyPlayReadyPlayRight) MarshalJSON

func (c ContentKeyPolicyPlayReadyPlayRight) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ContentKeyPolicyPlayReadyPlayRight.

func (*ContentKeyPolicyPlayReadyPlayRight) UnmarshalJSON

func (c *ContentKeyPolicyPlayReadyPlayRight) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ContentKeyPolicyPlayReadyPlayRight.

type ContentKeyPolicyPlayReadyUnknownOutputPassingOption

type ContentKeyPolicyPlayReadyUnknownOutputPassingOption string

ContentKeyPolicyPlayReadyUnknownOutputPassingOption - Configures Unknown output handling settings of the license.

const (
	// ContentKeyPolicyPlayReadyUnknownOutputPassingOptionAllowed - Passing the video portion of protected content to an Unknown
	// Output is allowed.
	ContentKeyPolicyPlayReadyUnknownOutputPassingOptionAllowed ContentKeyPolicyPlayReadyUnknownOutputPassingOption = "Allowed"
	// ContentKeyPolicyPlayReadyUnknownOutputPassingOptionAllowedWithVideoConstriction - Passing the video portion of protected
	// content to an Unknown Output is allowed but with constrained resolution.
	ContentKeyPolicyPlayReadyUnknownOutputPassingOptionAllowedWithVideoConstriction ContentKeyPolicyPlayReadyUnknownOutputPassingOption = "AllowedWithVideoConstriction"
	// ContentKeyPolicyPlayReadyUnknownOutputPassingOptionNotAllowed - Passing the video portion of protected content to an Unknown
	// Output is not allowed.
	ContentKeyPolicyPlayReadyUnknownOutputPassingOptionNotAllowed ContentKeyPolicyPlayReadyUnknownOutputPassingOption = "NotAllowed"
	// ContentKeyPolicyPlayReadyUnknownOutputPassingOptionUnknown - Represents a ContentKeyPolicyPlayReadyUnknownOutputPassingOption
	// that is unavailable in current API version.
	ContentKeyPolicyPlayReadyUnknownOutputPassingOptionUnknown ContentKeyPolicyPlayReadyUnknownOutputPassingOption = "Unknown"
)

func PossibleContentKeyPolicyPlayReadyUnknownOutputPassingOptionValues

func PossibleContentKeyPolicyPlayReadyUnknownOutputPassingOptionValues() []ContentKeyPolicyPlayReadyUnknownOutputPassingOption

PossibleContentKeyPolicyPlayReadyUnknownOutputPassingOptionValues returns the possible values for the ContentKeyPolicyPlayReadyUnknownOutputPassingOption const type.

type ContentKeyPolicyProperties

type ContentKeyPolicyProperties struct {
	// REQUIRED; The Key Policy options.
	Options []*ContentKeyPolicyOption

	// A description for the Policy.
	Description *string

	// READ-ONLY; The creation date of the Policy
	Created *time.Time

	// READ-ONLY; The last modified date of the Policy
	LastModified *time.Time

	// READ-ONLY; The legacy Policy ID.
	PolicyID *string
}

ContentKeyPolicyProperties - The properties of the Content Key Policy.

func (ContentKeyPolicyProperties) MarshalJSON

func (c ContentKeyPolicyProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ContentKeyPolicyProperties.

func (*ContentKeyPolicyProperties) UnmarshalJSON

func (c *ContentKeyPolicyProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ContentKeyPolicyProperties.

type ContentKeyPolicyRestriction

type ContentKeyPolicyRestriction struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string
}

ContentKeyPolicyRestriction - Base class for Content Key Policy restrictions. A derived class must be used to create a restriction.

func (*ContentKeyPolicyRestriction) GetContentKeyPolicyRestriction

func (c *ContentKeyPolicyRestriction) GetContentKeyPolicyRestriction() *ContentKeyPolicyRestriction

GetContentKeyPolicyRestriction implements the ContentKeyPolicyRestrictionClassification interface for type ContentKeyPolicyRestriction.

func (ContentKeyPolicyRestriction) MarshalJSON

func (c ContentKeyPolicyRestriction) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ContentKeyPolicyRestriction.

func (*ContentKeyPolicyRestriction) UnmarshalJSON

func (c *ContentKeyPolicyRestriction) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ContentKeyPolicyRestriction.

type ContentKeyPolicyRestrictionClassification

type ContentKeyPolicyRestrictionClassification interface {
	// GetContentKeyPolicyRestriction returns the ContentKeyPolicyRestriction content of the underlying type.
	GetContentKeyPolicyRestriction() *ContentKeyPolicyRestriction
}

ContentKeyPolicyRestrictionClassification provides polymorphic access to related types. Call the interface's GetContentKeyPolicyRestriction() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *ContentKeyPolicyOpenRestriction, *ContentKeyPolicyRestriction, *ContentKeyPolicyTokenRestriction, *ContentKeyPolicyUnknownRestriction

type ContentKeyPolicyRestrictionTokenKey

type ContentKeyPolicyRestrictionTokenKey struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string
}

ContentKeyPolicyRestrictionTokenKey - Base class for Content Key Policy key for token validation. A derived class must be used to create a token key.

func (*ContentKeyPolicyRestrictionTokenKey) GetContentKeyPolicyRestrictionTokenKey

func (c *ContentKeyPolicyRestrictionTokenKey) GetContentKeyPolicyRestrictionTokenKey() *ContentKeyPolicyRestrictionTokenKey

GetContentKeyPolicyRestrictionTokenKey implements the ContentKeyPolicyRestrictionTokenKeyClassification interface for type ContentKeyPolicyRestrictionTokenKey.

func (ContentKeyPolicyRestrictionTokenKey) MarshalJSON

func (c ContentKeyPolicyRestrictionTokenKey) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ContentKeyPolicyRestrictionTokenKey.

func (*ContentKeyPolicyRestrictionTokenKey) UnmarshalJSON

func (c *ContentKeyPolicyRestrictionTokenKey) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ContentKeyPolicyRestrictionTokenKey.

type ContentKeyPolicyRestrictionTokenKeyClassification

type ContentKeyPolicyRestrictionTokenKeyClassification interface {
	// GetContentKeyPolicyRestrictionTokenKey returns the ContentKeyPolicyRestrictionTokenKey content of the underlying type.
	GetContentKeyPolicyRestrictionTokenKey() *ContentKeyPolicyRestrictionTokenKey
}

ContentKeyPolicyRestrictionTokenKeyClassification provides polymorphic access to related types. Call the interface's GetContentKeyPolicyRestrictionTokenKey() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *ContentKeyPolicyRestrictionTokenKey, *ContentKeyPolicyRsaTokenKey, *ContentKeyPolicySymmetricTokenKey, *ContentKeyPolicyX509CertificateTokenKey

type ContentKeyPolicyRestrictionTokenType

type ContentKeyPolicyRestrictionTokenType string

ContentKeyPolicyRestrictionTokenType - The type of token.

const (
	// ContentKeyPolicyRestrictionTokenTypeJwt - JSON Web Token.
	ContentKeyPolicyRestrictionTokenTypeJwt ContentKeyPolicyRestrictionTokenType = "Jwt"
	// ContentKeyPolicyRestrictionTokenTypeSwt - Simple Web Token.
	ContentKeyPolicyRestrictionTokenTypeSwt ContentKeyPolicyRestrictionTokenType = "Swt"
	// ContentKeyPolicyRestrictionTokenTypeUnknown - Represents a ContentKeyPolicyRestrictionTokenType that is unavailable in
	// current API version.
	ContentKeyPolicyRestrictionTokenTypeUnknown ContentKeyPolicyRestrictionTokenType = "Unknown"
)

func PossibleContentKeyPolicyRestrictionTokenTypeValues

func PossibleContentKeyPolicyRestrictionTokenTypeValues() []ContentKeyPolicyRestrictionTokenType

PossibleContentKeyPolicyRestrictionTokenTypeValues returns the possible values for the ContentKeyPolicyRestrictionTokenType const type.

type ContentKeyPolicyRsaTokenKey

type ContentKeyPolicyRsaTokenKey struct {
	// REQUIRED; The RSA Parameter exponent
	Exponent []byte

	// REQUIRED; The RSA Parameter modulus
	Modulus []byte

	// REQUIRED; The discriminator for derived types.
	ODataType *string
}

ContentKeyPolicyRsaTokenKey - Specifies a RSA key for token validation

func (*ContentKeyPolicyRsaTokenKey) GetContentKeyPolicyRestrictionTokenKey

func (c *ContentKeyPolicyRsaTokenKey) GetContentKeyPolicyRestrictionTokenKey() *ContentKeyPolicyRestrictionTokenKey

GetContentKeyPolicyRestrictionTokenKey implements the ContentKeyPolicyRestrictionTokenKeyClassification interface for type ContentKeyPolicyRsaTokenKey.

func (ContentKeyPolicyRsaTokenKey) MarshalJSON

func (c ContentKeyPolicyRsaTokenKey) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ContentKeyPolicyRsaTokenKey.

func (*ContentKeyPolicyRsaTokenKey) UnmarshalJSON

func (c *ContentKeyPolicyRsaTokenKey) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ContentKeyPolicyRsaTokenKey.

type ContentKeyPolicySymmetricTokenKey

type ContentKeyPolicySymmetricTokenKey struct {
	// REQUIRED; The key value of the key
	KeyValue []byte

	// REQUIRED; The discriminator for derived types.
	ODataType *string
}

ContentKeyPolicySymmetricTokenKey - Specifies a symmetric key for token validation.

func (*ContentKeyPolicySymmetricTokenKey) GetContentKeyPolicyRestrictionTokenKey

func (c *ContentKeyPolicySymmetricTokenKey) GetContentKeyPolicyRestrictionTokenKey() *ContentKeyPolicyRestrictionTokenKey

GetContentKeyPolicyRestrictionTokenKey implements the ContentKeyPolicyRestrictionTokenKeyClassification interface for type ContentKeyPolicySymmetricTokenKey.

func (ContentKeyPolicySymmetricTokenKey) MarshalJSON

func (c ContentKeyPolicySymmetricTokenKey) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ContentKeyPolicySymmetricTokenKey.

func (*ContentKeyPolicySymmetricTokenKey) UnmarshalJSON

func (c *ContentKeyPolicySymmetricTokenKey) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ContentKeyPolicySymmetricTokenKey.

type ContentKeyPolicyTokenClaim

type ContentKeyPolicyTokenClaim struct {
	// Token claim type.
	ClaimType *string

	// Token claim value.
	ClaimValue *string
}

ContentKeyPolicyTokenClaim - Represents a token claim.

func (ContentKeyPolicyTokenClaim) MarshalJSON

func (c ContentKeyPolicyTokenClaim) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ContentKeyPolicyTokenClaim.

func (*ContentKeyPolicyTokenClaim) UnmarshalJSON

func (c *ContentKeyPolicyTokenClaim) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ContentKeyPolicyTokenClaim.

type ContentKeyPolicyTokenRestriction

type ContentKeyPolicyTokenRestriction struct {
	// REQUIRED; The audience for the token.
	Audience *string

	// REQUIRED; The token issuer.
	Issuer *string

	// REQUIRED; The discriminator for derived types.
	ODataType *string

	// REQUIRED; The primary verification key.
	PrimaryVerificationKey ContentKeyPolicyRestrictionTokenKeyClassification

	// REQUIRED; The type of token.
	RestrictionTokenType *ContentKeyPolicyRestrictionTokenType

	// A list of alternative verification keys.
	AlternateVerificationKeys []ContentKeyPolicyRestrictionTokenKeyClassification

	// The OpenID connect discovery document.
	OpenIDConnectDiscoveryDocument *string

	// A list of required token claims.
	RequiredClaims []*ContentKeyPolicyTokenClaim
}

ContentKeyPolicyTokenRestriction - Represents a token restriction. Provided token must match these requirements for successful license or key delivery.

func (*ContentKeyPolicyTokenRestriction) GetContentKeyPolicyRestriction

func (c *ContentKeyPolicyTokenRestriction) GetContentKeyPolicyRestriction() *ContentKeyPolicyRestriction

GetContentKeyPolicyRestriction implements the ContentKeyPolicyRestrictionClassification interface for type ContentKeyPolicyTokenRestriction.

func (ContentKeyPolicyTokenRestriction) MarshalJSON

func (c ContentKeyPolicyTokenRestriction) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ContentKeyPolicyTokenRestriction.

func (*ContentKeyPolicyTokenRestriction) UnmarshalJSON

func (c *ContentKeyPolicyTokenRestriction) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ContentKeyPolicyTokenRestriction.

type ContentKeyPolicyUnknownConfiguration

type ContentKeyPolicyUnknownConfiguration struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string
}

ContentKeyPolicyUnknownConfiguration - Represents a ContentKeyPolicyConfiguration that is unavailable in the current API version.

func (*ContentKeyPolicyUnknownConfiguration) GetContentKeyPolicyConfiguration

func (c *ContentKeyPolicyUnknownConfiguration) GetContentKeyPolicyConfiguration() *ContentKeyPolicyConfiguration

GetContentKeyPolicyConfiguration implements the ContentKeyPolicyConfigurationClassification interface for type ContentKeyPolicyUnknownConfiguration.

func (ContentKeyPolicyUnknownConfiguration) MarshalJSON

func (c ContentKeyPolicyUnknownConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ContentKeyPolicyUnknownConfiguration.

func (*ContentKeyPolicyUnknownConfiguration) UnmarshalJSON

func (c *ContentKeyPolicyUnknownConfiguration) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ContentKeyPolicyUnknownConfiguration.

type ContentKeyPolicyUnknownRestriction

type ContentKeyPolicyUnknownRestriction struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string
}

ContentKeyPolicyUnknownRestriction - Represents a ContentKeyPolicyRestriction that is unavailable in the current API version.

func (*ContentKeyPolicyUnknownRestriction) GetContentKeyPolicyRestriction

func (c *ContentKeyPolicyUnknownRestriction) GetContentKeyPolicyRestriction() *ContentKeyPolicyRestriction

GetContentKeyPolicyRestriction implements the ContentKeyPolicyRestrictionClassification interface for type ContentKeyPolicyUnknownRestriction.

func (ContentKeyPolicyUnknownRestriction) MarshalJSON

func (c ContentKeyPolicyUnknownRestriction) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ContentKeyPolicyUnknownRestriction.

func (*ContentKeyPolicyUnknownRestriction) UnmarshalJSON

func (c *ContentKeyPolicyUnknownRestriction) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ContentKeyPolicyUnknownRestriction.

type ContentKeyPolicyWidevineConfiguration

type ContentKeyPolicyWidevineConfiguration struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string

	// REQUIRED; The Widevine template.
	WidevineTemplate *string
}

ContentKeyPolicyWidevineConfiguration - Specifies a configuration for Widevine licenses.

func (*ContentKeyPolicyWidevineConfiguration) GetContentKeyPolicyConfiguration

func (c *ContentKeyPolicyWidevineConfiguration) GetContentKeyPolicyConfiguration() *ContentKeyPolicyConfiguration

GetContentKeyPolicyConfiguration implements the ContentKeyPolicyConfigurationClassification interface for type ContentKeyPolicyWidevineConfiguration.

func (ContentKeyPolicyWidevineConfiguration) MarshalJSON

func (c ContentKeyPolicyWidevineConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ContentKeyPolicyWidevineConfiguration.

func (*ContentKeyPolicyWidevineConfiguration) UnmarshalJSON

func (c *ContentKeyPolicyWidevineConfiguration) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ContentKeyPolicyWidevineConfiguration.

type ContentKeyPolicyX509CertificateTokenKey

type ContentKeyPolicyX509CertificateTokenKey struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string

	// REQUIRED; The raw data field of a certificate in PKCS 12 format (X509Certificate2 in .NET)
	RawBody []byte
}

ContentKeyPolicyX509CertificateTokenKey - Specifies a certificate for token validation.

func (*ContentKeyPolicyX509CertificateTokenKey) GetContentKeyPolicyRestrictionTokenKey

func (c *ContentKeyPolicyX509CertificateTokenKey) GetContentKeyPolicyRestrictionTokenKey() *ContentKeyPolicyRestrictionTokenKey

GetContentKeyPolicyRestrictionTokenKey implements the ContentKeyPolicyRestrictionTokenKeyClassification interface for type ContentKeyPolicyX509CertificateTokenKey.

func (ContentKeyPolicyX509CertificateTokenKey) MarshalJSON

func (c ContentKeyPolicyX509CertificateTokenKey) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ContentKeyPolicyX509CertificateTokenKey.

func (*ContentKeyPolicyX509CertificateTokenKey) UnmarshalJSON

func (c *ContentKeyPolicyX509CertificateTokenKey) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ContentKeyPolicyX509CertificateTokenKey.

type CopyAudio

type CopyAudio struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string

	// An optional label for the codec. The label can be used to control muxing behavior.
	Label *string
}

CopyAudio - A codec flag, which tells the encoder to copy the input audio bitstream.

func (*CopyAudio) GetCodec

func (c *CopyAudio) GetCodec() *Codec

GetCodec implements the CodecClassification interface for type CopyAudio.

func (CopyAudio) MarshalJSON

func (c CopyAudio) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CopyAudio.

func (*CopyAudio) UnmarshalJSON

func (c *CopyAudio) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CopyAudio.

type CopyVideo

type CopyVideo struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string

	// An optional label for the codec. The label can be used to control muxing behavior.
	Label *string
}

CopyVideo - A codec flag, which tells the encoder to copy the input video bitstream without re-encoding.

func (*CopyVideo) GetCodec

func (c *CopyVideo) GetCodec() *Codec

GetCodec implements the CodecClassification interface for type CopyVideo.

func (CopyVideo) MarshalJSON

func (c CopyVideo) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CopyVideo.

func (*CopyVideo) UnmarshalJSON

func (c *CopyVideo) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CopyVideo.

type CreatedByType

type CreatedByType string

CreatedByType - The type of identity that created the resource.

const (
	CreatedByTypeApplication     CreatedByType = "Application"
	CreatedByTypeKey             CreatedByType = "Key"
	CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity"
	CreatedByTypeUser            CreatedByType = "User"
)

func PossibleCreatedByTypeValues

func PossibleCreatedByTypeValues() []CreatedByType

PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.

type CrossSiteAccessPolicies

type CrossSiteAccessPolicies struct {
	// The content of clientaccesspolicy.xml used by Silverlight.
	ClientAccessPolicy *string

	// The content of crossdomain.xml used by Silverlight.
	CrossDomainPolicy *string
}

CrossSiteAccessPolicies - The client access policy.

func (CrossSiteAccessPolicies) MarshalJSON

func (c CrossSiteAccessPolicies) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CrossSiteAccessPolicies.

func (*CrossSiteAccessPolicies) UnmarshalJSON

func (c *CrossSiteAccessPolicies) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CrossSiteAccessPolicies.

type DDAudio added in v3.2.0

type DDAudio struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string

	// The bitrate, in bits per second, of the output encoded audio.
	Bitrate *int32

	// The number of channels in the audio.
	Channels *int32

	// An optional label for the codec. The label can be used to control muxing behavior.
	Label *string

	// The sampling rate to use for encoding in hertz.
	SamplingRate *int32
}

DDAudio - Describes Dolby Digital Audio Codec (AC3) audio encoding settings. The current implementation for Dolby Digital Audio support are: Audio channel numbers at 1((mono), 2(stereo), 6(5.1side); Audio sampling frequency rates at: 32K/44.1K/48K Hz; Audio bitrate values as AC3 specification supports: 32000, 40000, 48000, 56000, 64000, 80000, 96000, 112000, 128000, 160000, 192000, 224000, 256000, 320000, 384000, 448000, 512000, 576000, 640000 bps.

func (*DDAudio) GetAudio added in v3.2.0

func (d *DDAudio) GetAudio() *Audio

GetAudio implements the AudioClassification interface for type DDAudio.

func (*DDAudio) GetCodec added in v3.2.0

func (d *DDAudio) GetCodec() *Codec

GetCodec implements the CodecClassification interface for type DDAudio.

func (DDAudio) MarshalJSON added in v3.2.0

func (d DDAudio) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DDAudio.

func (*DDAudio) UnmarshalJSON added in v3.2.0

func (d *DDAudio) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DDAudio.

type DashSettings added in v3.1.0

type DashSettings struct {
	// The role for the DASH setting.
	Role *string
}

DashSettings - The DASH setting for a track.

func (DashSettings) MarshalJSON added in v3.1.0

func (d DashSettings) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DashSettings.

func (*DashSettings) UnmarshalJSON added in v3.1.0

func (d *DashSettings) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DashSettings.

type DefaultAction

type DefaultAction string

DefaultAction - The behavior for IP access control in Key Delivery.

const (
	// DefaultActionAllow - All public IP addresses are allowed.
	DefaultActionAllow DefaultAction = "Allow"
	// DefaultActionDeny - Public IP addresses are blocked.
	DefaultActionDeny DefaultAction = "Deny"
)

func PossibleDefaultActionValues

func PossibleDefaultActionValues() []DefaultAction

PossibleDefaultActionValues returns the possible values for the DefaultAction const type.

type DefaultKey

type DefaultKey struct {
	// Label can be used to specify Content Key when creating a Streaming Locator
	Label *string

	// Policy used by Default Key
	PolicyName *string
}

DefaultKey - Class to specify properties of default content key for each encryption scheme

func (DefaultKey) MarshalJSON

func (d DefaultKey) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DefaultKey.

func (*DefaultKey) UnmarshalJSON

func (d *DefaultKey) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DefaultKey.

type Deinterlace

type Deinterlace struct {
	// The deinterlacing mode. Defaults to AutoPixelAdaptive.
	Mode *DeinterlaceMode

	// The field parity for de-interlacing, defaults to Auto.
	Parity *DeinterlaceParity
}

Deinterlace - Describes the de-interlacing settings.

func (Deinterlace) MarshalJSON

func (d Deinterlace) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Deinterlace.

func (*Deinterlace) UnmarshalJSON

func (d *Deinterlace) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Deinterlace.

type DeinterlaceMode

type DeinterlaceMode string

DeinterlaceMode - The deinterlacing mode. Defaults to AutoPixelAdaptive.

const (
	// DeinterlaceModeAutoPixelAdaptive - Apply automatic pixel adaptive de-interlacing on each frame in the input video.
	DeinterlaceModeAutoPixelAdaptive DeinterlaceMode = "AutoPixelAdaptive"
	// DeinterlaceModeOff - Disables de-interlacing of the source video.
	DeinterlaceModeOff DeinterlaceMode = "Off"
)

func PossibleDeinterlaceModeValues

func PossibleDeinterlaceModeValues() []DeinterlaceMode

PossibleDeinterlaceModeValues returns the possible values for the DeinterlaceMode const type.

type DeinterlaceParity

type DeinterlaceParity string

DeinterlaceParity - The field parity for de-interlacing, defaults to Auto.

const (
	// DeinterlaceParityAuto - Automatically detect the order of fields
	DeinterlaceParityAuto DeinterlaceParity = "Auto"
	// DeinterlaceParityBottomFieldFirst - Apply bottom field first processing of input video.
	DeinterlaceParityBottomFieldFirst DeinterlaceParity = "BottomFieldFirst"
	// DeinterlaceParityTopFieldFirst - Apply top field first processing of input video.
	DeinterlaceParityTopFieldFirst DeinterlaceParity = "TopFieldFirst"
)

func PossibleDeinterlaceParityValues

func PossibleDeinterlaceParityValues() []DeinterlaceParity

PossibleDeinterlaceParityValues returns the possible values for the DeinterlaceParity const type.

type EdgePolicies

type EdgePolicies struct {
	UsageDataCollectionPolicy *EdgeUsageDataCollectionPolicy
}

func (EdgePolicies) MarshalJSON

func (e EdgePolicies) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type EdgePolicies.

func (*EdgePolicies) UnmarshalJSON

func (e *EdgePolicies) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type EdgePolicies.

type EdgeUsageDataCollectionPolicy

type EdgeUsageDataCollectionPolicy struct {
	// Usage data collection frequency in ISO 8601 duration format e.g. PT10M , PT5H.
	DataCollectionFrequency *string

	// Usage data reporting frequency in ISO 8601 duration format e.g. PT10M , PT5H.
	DataReportingFrequency *string

	// Details of Event Hub where the usage will be reported.
	EventHubDetails *EdgeUsageDataEventHub

	// Maximum time for which the functionality of the device will not be hampered for not reporting the usage data.
	MaxAllowedUnreportedUsageDuration *string
}

func (EdgeUsageDataCollectionPolicy) MarshalJSON

func (e EdgeUsageDataCollectionPolicy) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type EdgeUsageDataCollectionPolicy.

func (*EdgeUsageDataCollectionPolicy) UnmarshalJSON

func (e *EdgeUsageDataCollectionPolicy) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type EdgeUsageDataCollectionPolicy.

type EdgeUsageDataEventHub

type EdgeUsageDataEventHub struct {
	// Name of the Event Hub where usage will be reported.
	Name *string

	// Namespace of the Event Hub where usage will be reported.
	Namespace *string

	// SAS token needed to interact with Event Hub.
	Token *string
}

func (EdgeUsageDataEventHub) MarshalJSON

func (e EdgeUsageDataEventHub) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type EdgeUsageDataEventHub.

func (*EdgeUsageDataEventHub) UnmarshalJSON

func (e *EdgeUsageDataEventHub) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type EdgeUsageDataEventHub.

type EnabledProtocols

type EnabledProtocols struct {
	// REQUIRED; Enable DASH protocol or not
	Dash *bool

	// REQUIRED; Enable Download protocol or not
	Download *bool

	// REQUIRED; Enable HLS protocol or not
	Hls *bool

	// REQUIRED; Enable SmoothStreaming protocol or not
	SmoothStreaming *bool
}

EnabledProtocols - Class to specify which protocols are enabled

func (EnabledProtocols) MarshalJSON

func (e EnabledProtocols) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type EnabledProtocols.

func (*EnabledProtocols) UnmarshalJSON

func (e *EnabledProtocols) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type EnabledProtocols.

type EncoderNamedPreset

type EncoderNamedPreset string

EncoderNamedPreset - The built-in preset to be used for encoding videos.

const (
	// EncoderNamedPresetAACGoodQualityAudio - Produces a single MP4 file containing only AAC stereo audio encoded at 192 kbps.
	EncoderNamedPresetAACGoodQualityAudio EncoderNamedPreset = "AACGoodQualityAudio"
	// EncoderNamedPresetAdaptiveStreaming - Produces a set of GOP aligned MP4 files with H.264 video and stereo AAC audio. Auto-generates
	// a bitrate ladder based on the input resolution, bitrate and frame rate. The auto-generated preset will never exceed the
	// input resolution. For example, if the input is 720p, output will remain 720p at best.
	EncoderNamedPresetAdaptiveStreaming EncoderNamedPreset = "AdaptiveStreaming"
	// EncoderNamedPresetContentAwareEncoding - Produces a set of GOP-aligned MP4s by using content-aware encoding. Given any
	// input content, the service performs an initial lightweight analysis of the input content, and uses the results to determine
	// the optimal number of layers, appropriate bitrate and resolution settings for delivery by adaptive streaming. This preset
	// is particularly effective for low and medium complexity videos, where the output files will be at lower bitrates but at
	// a quality that still delivers a good experience to viewers. The output will contain MP4 files with video and audio interleaved.
	EncoderNamedPresetContentAwareEncoding EncoderNamedPreset = "ContentAwareEncoding"
	// EncoderNamedPresetContentAwareEncodingExperimental - Exposes an experimental preset for content-aware encoding. Given any
	// input content, the service attempts to automatically determine the optimal number of layers, appropriate bitrate and resolution
	// settings for delivery by adaptive streaming. The underlying algorithms will continue to evolve over time. The output will
	// contain MP4 files with video and audio interleaved.
	EncoderNamedPresetContentAwareEncodingExperimental EncoderNamedPreset = "ContentAwareEncodingExperimental"
	// EncoderNamedPresetCopyAllBitrateNonInterleaved - Copy all video and audio streams from the input asset as non-interleaved
	// video and audio output files. This preset can be used to clip an existing asset or convert a group of key frame (GOP) aligned
	// MP4 files as an asset that can be streamed.
	EncoderNamedPresetCopyAllBitrateNonInterleaved EncoderNamedPreset = "CopyAllBitrateNonInterleaved"
	// EncoderNamedPresetDDGoodQualityAudio - Produces a single MP4 file containing only DD(Digital Dolby) stereo audio encoded
	// at 192 kbps.
	EncoderNamedPresetDDGoodQualityAudio EncoderNamedPreset = "DDGoodQualityAudio"
	// EncoderNamedPresetH264MultipleBitrate1080P - Produces a set of 8 GOP-aligned MP4 files, ranging from 6000 kbps to 400 kbps,
	// and stereo AAC audio. Resolution starts at 1080p and goes down to 180p.
	EncoderNamedPresetH264MultipleBitrate1080P EncoderNamedPreset = "H264MultipleBitrate1080p"
	// EncoderNamedPresetH264MultipleBitrate720P - Produces a set of 6 GOP-aligned MP4 files, ranging from 3400 kbps to 400 kbps,
	// and stereo AAC audio. Resolution starts at 720p and goes down to 180p.
	EncoderNamedPresetH264MultipleBitrate720P EncoderNamedPreset = "H264MultipleBitrate720p"
	// EncoderNamedPresetH264MultipleBitrateSD - Produces a set of 5 GOP-aligned MP4 files, ranging from 1900kbps to 400 kbps,
	// and stereo AAC audio. Resolution starts at 480p and goes down to 240p.
	EncoderNamedPresetH264MultipleBitrateSD EncoderNamedPreset = "H264MultipleBitrateSD"
	// EncoderNamedPresetH264SingleBitrate1080P - Produces an MP4 file where the video is encoded with H.264 codec at 6750 kbps
	// and a picture height of 1080 pixels, and the stereo audio is encoded with AAC-LC codec at 128 kbps.
	EncoderNamedPresetH264SingleBitrate1080P EncoderNamedPreset = "H264SingleBitrate1080p"
	// EncoderNamedPresetH264SingleBitrate720P - Produces an MP4 file where the video is encoded with H.264 codec at 4500 kbps
	// and a picture height of 720 pixels, and the stereo audio is encoded with AAC-LC codec at 128 kbps.
	EncoderNamedPresetH264SingleBitrate720P EncoderNamedPreset = "H264SingleBitrate720p"
	// EncoderNamedPresetH264SingleBitrateSD - Produces an MP4 file where the video is encoded with H.264 codec at 2200 kbps and
	// a picture height of 480 pixels, and the stereo audio is encoded with AAC-LC codec at 128 kbps.
	EncoderNamedPresetH264SingleBitrateSD EncoderNamedPreset = "H264SingleBitrateSD"
	// EncoderNamedPresetH265AdaptiveStreaming - Produces a set of GOP aligned MP4 files with H.265 video and stereo AAC audio.
	// Auto-generates a bitrate ladder based on the input resolution, bitrate and frame rate. The auto-generated preset will never
	// exceed the input resolution. For example, if the input is 720p, output will remain 720p at best.
	EncoderNamedPresetH265AdaptiveStreaming EncoderNamedPreset = "H265AdaptiveStreaming"
	// EncoderNamedPresetH265ContentAwareEncoding - Produces a set of GOP-aligned MP4s by using content-aware encoding. Given
	// any input content, the service performs an initial lightweight analysis of the input content, and uses the results to determine
	// the optimal number of layers, appropriate bitrate and resolution settings for delivery by adaptive streaming. This preset
	// is particularly effective for low and medium complexity videos, where the output files will be at lower bitrates but at
	// a quality that still delivers a good experience to viewers. The output will contain MP4 files with video and audio interleaved.
	EncoderNamedPresetH265ContentAwareEncoding EncoderNamedPreset = "H265ContentAwareEncoding"
	// EncoderNamedPresetH265SingleBitrate1080P - Produces an MP4 file where the video is encoded with H.265 codec at 3500 kbps
	// and a picture height of 1080 pixels, and the stereo audio is encoded with AAC-LC codec at 128 kbps.
	EncoderNamedPresetH265SingleBitrate1080P EncoderNamedPreset = "H265SingleBitrate1080p"
	// EncoderNamedPresetH265SingleBitrate4K - Produces an MP4 file where the video is encoded with H.265 codec at 9500 kbps and
	// a picture height of 2160 pixels, and the stereo audio is encoded with AAC-LC codec at 128 kbps.
	EncoderNamedPresetH265SingleBitrate4K EncoderNamedPreset = "H265SingleBitrate4K"
	// EncoderNamedPresetH265SingleBitrate720P - Produces an MP4 file where the video is encoded with H.265 codec at 1800 kbps
	// and a picture height of 720 pixels, and the stereo audio is encoded with AAC-LC codec at 128 kbps.
	EncoderNamedPresetH265SingleBitrate720P EncoderNamedPreset = "H265SingleBitrate720p"
)

func PossibleEncoderNamedPresetValues

func PossibleEncoderNamedPresetValues() []EncoderNamedPreset

PossibleEncoderNamedPresetValues returns the possible values for the EncoderNamedPreset const type.

type EncryptionScheme

type EncryptionScheme string

EncryptionScheme - Encryption scheme

const (
	// EncryptionSchemeCommonEncryptionCbcs - CommonEncryptionCbcs scheme
	EncryptionSchemeCommonEncryptionCbcs EncryptionScheme = "CommonEncryptionCbcs"
	// EncryptionSchemeCommonEncryptionCenc - CommonEncryptionCenc scheme
	EncryptionSchemeCommonEncryptionCenc EncryptionScheme = "CommonEncryptionCenc"
	// EncryptionSchemeEnvelopeEncryption - EnvelopeEncryption scheme
	EncryptionSchemeEnvelopeEncryption EncryptionScheme = "EnvelopeEncryption"
	// EncryptionSchemeNoEncryption - NoEncryption scheme
	EncryptionSchemeNoEncryption EncryptionScheme = "NoEncryption"
)

func PossibleEncryptionSchemeValues

func PossibleEncryptionSchemeValues() []EncryptionScheme

PossibleEncryptionSchemeValues returns the possible values for the EncryptionScheme const type.

type EntityNameAvailabilityCheckOutput

type EntityNameAvailabilityCheckOutput struct {
	// REQUIRED; Specifies if the name is available.
	NameAvailable *bool

	// Specifies the detailed reason if the name is not available.
	Message *string

	// Specifies the reason if the name is not available.
	Reason *string
}

EntityNameAvailabilityCheckOutput - The response from the check name availability request.

func (EntityNameAvailabilityCheckOutput) MarshalJSON

func (e EntityNameAvailabilityCheckOutput) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type EntityNameAvailabilityCheckOutput.

func (*EntityNameAvailabilityCheckOutput) UnmarshalJSON

func (e *EntityNameAvailabilityCheckOutput) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type EntityNameAvailabilityCheckOutput.

type EntropyMode

type EntropyMode string

EntropyMode - The entropy mode to be used for this layer. If not specified, the encoder chooses the mode that is appropriate for the profile and level.

const (
	// EntropyModeCabac - Context Adaptive Binary Arithmetic Coder (CABAC) entropy encoding.
	EntropyModeCabac EntropyMode = "Cabac"
	// EntropyModeCavlc - Context Adaptive Variable Length Coder (CAVLC) entropy encoding.
	EntropyModeCavlc EntropyMode = "Cavlc"
)

func PossibleEntropyModeValues

func PossibleEntropyModeValues() []EntropyMode

PossibleEntropyModeValues returns the possible values for the EntropyMode const type.

type EnvelopeEncryption

type EnvelopeEncryption struct {
	// Representing which tracks should not be encrypted
	ClearTracks []*TrackSelection

	// Representing default content key for each encryption scheme and separate content keys for specific tracks
	ContentKeys *StreamingPolicyContentKeys

	// Template for the URL of the custom service delivering keys to end user players. Not required when using Azure Media Services
	// for issuing keys. The template supports replaceable tokens that the service
	// will update at runtime with the value specific to the request. The currently supported token values are {AlternativeMediaId},
	// which is replaced with the value of StreamingLocatorId.AlternativeMediaId,
	// and {ContentKeyId}, which is replaced with the value of identifier of the key being requested.
	CustomKeyAcquisitionURLTemplate *string

	// Representing supported protocols
	EnabledProtocols *EnabledProtocols
}

EnvelopeEncryption - Class for EnvelopeEncryption encryption scheme

func (EnvelopeEncryption) MarshalJSON

func (e EnvelopeEncryption) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type EnvelopeEncryption.

func (*EnvelopeEncryption) UnmarshalJSON

func (e *EnvelopeEncryption) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type EnvelopeEncryption.

type ErrorAdditionalInfo

type ErrorAdditionalInfo struct {
	// READ-ONLY; The additional info.
	Info any

	// READ-ONLY; The additional info type.
	Type *string
}

ErrorAdditionalInfo - The resource management error additional info.

func (ErrorAdditionalInfo) MarshalJSON

func (e ErrorAdditionalInfo) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ErrorAdditionalInfo.

func (*ErrorAdditionalInfo) UnmarshalJSON

func (e *ErrorAdditionalInfo) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorAdditionalInfo.

type ErrorDetail

type ErrorDetail struct {
	// READ-ONLY; The error additional info.
	AdditionalInfo []*ErrorAdditionalInfo

	// READ-ONLY; The error code.
	Code *string

	// READ-ONLY; The error details.
	Details []*ErrorDetail

	// READ-ONLY; The error message.
	Message *string

	// READ-ONLY; The error target.
	Target *string
}

ErrorDetail - The error detail.

func (ErrorDetail) MarshalJSON

func (e ErrorDetail) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ErrorDetail.

func (*ErrorDetail) UnmarshalJSON

func (e *ErrorDetail) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorDetail.

type ErrorResponse

type ErrorResponse struct {
	// The error object.
	Error *ErrorDetail
}

ErrorResponse - Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).

func (ErrorResponse) MarshalJSON

func (e ErrorResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ErrorResponse.

func (*ErrorResponse) UnmarshalJSON

func (e *ErrorResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponse.

type FaceDetectorPreset

type FaceDetectorPreset struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string

	// Blur type
	BlurType *BlurType

	// Dictionary containing key value pairs for parameters not exposed in the preset itself
	ExperimentalOptions map[string]*string

	// This mode provides the ability to choose between the following settings: 1) Analyze - For detection only.This mode generates
	// a metadata JSON file marking appearances of faces throughout the
	// video.Where possible, appearances of the same person are assigned the same ID. 2) Combined - Additionally redacts(blurs)
	// detected faces. 3) Redact - This enables a 2-pass process, allowing for
	// selective redaction of a subset of detected faces.It takes in the metadata file from a prior analyze pass, along with the
	// source video, and a user-selected subset of IDs that require redaction.
	Mode *FaceRedactorMode

	// Specifies the maximum resolution at which your video is analyzed. The default behavior is "SourceResolution," which will
	// keep the input video at its original resolution when analyzed. Using
	// "StandardDefinition" will resize input videos to standard definition while preserving the appropriate aspect ratio. It
	// will only resize if the video is of higher resolution. For example, a 1920x1080
	// input would be scaled to 640x360 before processing. Switching to "StandardDefinition" will reduce the time it takes to
	// process high resolution video. It may also reduce the cost of using this
	// component (see https://azure.microsoft.com/en-us/pricing/details/media-services/#analytics for details). However, faces
	// that end up being too small in the resized video may not be detected.
	Resolution *AnalysisResolution
}

FaceDetectorPreset - Describes all the settings to be used when analyzing a video in order to detect (and optionally redact) all the faces present.

func (*FaceDetectorPreset) GetPreset

func (f *FaceDetectorPreset) GetPreset() *Preset

GetPreset implements the PresetClassification interface for type FaceDetectorPreset.

func (FaceDetectorPreset) MarshalJSON

func (f FaceDetectorPreset) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type FaceDetectorPreset.

func (*FaceDetectorPreset) UnmarshalJSON

func (f *FaceDetectorPreset) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type FaceDetectorPreset.

type FaceRedactorMode

type FaceRedactorMode string

FaceRedactorMode - This mode provides the ability to choose between the following settings: 1) Analyze - For detection only.This mode generates a metadata JSON file marking appearances of faces throughout the video.Where possible, appearances of the same person are assigned the same ID. 2) Combined - Additionally redacts(blurs) detected faces. 3) Redact - This enables a 2-pass process, allowing for selective redaction of a subset of detected faces.It takes in the metadata file from a prior analyze pass, along with the source video, and a user-selected subset of IDs that require redaction.

const (
	// FaceRedactorModeAnalyze - Analyze mode detects faces and outputs a metadata file with the results. Allows editing of the
	// metadata file before faces are blurred with Redact mode.
	FaceRedactorModeAnalyze FaceRedactorMode = "Analyze"
	// FaceRedactorModeCombined - Combined mode does the Analyze and Redact steps in one pass when editing the analyzed faces
	// is not desired.
	FaceRedactorModeCombined FaceRedactorMode = "Combined"
	// FaceRedactorModeRedact - Redact mode consumes the metadata file from Analyze mode and redacts the faces found.
	FaceRedactorModeRedact FaceRedactorMode = "Redact"
)

func PossibleFaceRedactorModeValues

func PossibleFaceRedactorModeValues() []FaceRedactorMode

PossibleFaceRedactorModeValues returns the possible values for the FaceRedactorMode const type.

type Fade added in v3.2.0

type Fade struct {
	// REQUIRED; The Duration of the fade effect in the video. The value can be in ISO 8601 format (For example, PT05S to fade
	// In/Out a color during 5 seconds), or a frame count (For example, 10 to fade 10 frames from
	// the start time), or a relative value to stream duration (For example, 10% to fade 10% of stream duration)
	Duration *string

	// REQUIRED; The Color for the fade In/Out. it can be on the CSS Level1 colors https://developer.mozilla.org/en-US/docs/Web/CSS/colorvalue/colorkeywords
	// or an RGB/hex value: e.g: rgb(255,0,0), 0xFF0000 or #FF0000
	FadeColor *string

	// The position in the input video from where to start fade. The value can be in ISO 8601 format (For example, PT05S to start
	// at 5 seconds), or a frame count (For example, 10 to start at the 10th frame),
	// or a relative value to stream duration (For example, 10% to start at 10% of stream duration). Default is 0
	Start *string
}

Fade - Describes the properties of a Fade effect applied to the input media.

func (Fade) MarshalJSON added in v3.2.0

func (f Fade) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Fade.

func (*Fade) UnmarshalJSON added in v3.2.0

func (f *Fade) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Fade.

type FilterTrackPropertyCompareOperation

type FilterTrackPropertyCompareOperation string

FilterTrackPropertyCompareOperation - The track property condition operation.

const (
	// FilterTrackPropertyCompareOperationEqual - The equal operation.
	FilterTrackPropertyCompareOperationEqual FilterTrackPropertyCompareOperation = "Equal"
	// FilterTrackPropertyCompareOperationNotEqual - The not equal operation.
	FilterTrackPropertyCompareOperationNotEqual FilterTrackPropertyCompareOperation = "NotEqual"
)

func PossibleFilterTrackPropertyCompareOperationValues

func PossibleFilterTrackPropertyCompareOperationValues() []FilterTrackPropertyCompareOperation

PossibleFilterTrackPropertyCompareOperationValues returns the possible values for the FilterTrackPropertyCompareOperation const type.

type FilterTrackPropertyCondition

type FilterTrackPropertyCondition struct {
	// REQUIRED; The track property condition operation.
	Operation *FilterTrackPropertyCompareOperation

	// REQUIRED; The track property type.
	Property *FilterTrackPropertyType

	// REQUIRED; The track property value.
	Value *string
}

FilterTrackPropertyCondition - The class to specify one track property condition.

func (FilterTrackPropertyCondition) MarshalJSON

func (f FilterTrackPropertyCondition) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type FilterTrackPropertyCondition.

func (*FilterTrackPropertyCondition) UnmarshalJSON

func (f *FilterTrackPropertyCondition) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type FilterTrackPropertyCondition.

type FilterTrackPropertyType

type FilterTrackPropertyType string

FilterTrackPropertyType - The track property type.

const (
	// FilterTrackPropertyTypeBitrate - The bitrate.
	FilterTrackPropertyTypeBitrate FilterTrackPropertyType = "Bitrate"
	// FilterTrackPropertyTypeFourCC - The fourCC.
	FilterTrackPropertyTypeFourCC FilterTrackPropertyType = "FourCC"
	// FilterTrackPropertyTypeLanguage - The language.
	FilterTrackPropertyTypeLanguage FilterTrackPropertyType = "Language"
	// FilterTrackPropertyTypeName - The name.
	FilterTrackPropertyTypeName FilterTrackPropertyType = "Name"
	// FilterTrackPropertyTypeType - The type.
	FilterTrackPropertyTypeType FilterTrackPropertyType = "Type"
	// FilterTrackPropertyTypeUnknown - The unknown track property type.
	FilterTrackPropertyTypeUnknown FilterTrackPropertyType = "Unknown"
)

func PossibleFilterTrackPropertyTypeValues

func PossibleFilterTrackPropertyTypeValues() []FilterTrackPropertyType

PossibleFilterTrackPropertyTypeValues returns the possible values for the FilterTrackPropertyType const type.

type FilterTrackSelection

type FilterTrackSelection struct {
	// REQUIRED; The track selections.
	TrackSelections []*FilterTrackPropertyCondition
}

FilterTrackSelection - Representing a list of FilterTrackPropertyConditions to select a track. The filters are combined using a logical AND operation.

func (FilterTrackSelection) MarshalJSON

func (f FilterTrackSelection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type FilterTrackSelection.

func (*FilterTrackSelection) UnmarshalJSON

func (f *FilterTrackSelection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type FilterTrackSelection.

type Filters

type Filters struct {
	// The parameters for the rectangular window with which to crop the input video.
	Crop *Rectangle

	// The de-interlacing settings.
	Deinterlace *Deinterlace

	// Describes the properties of a Fade effect applied to the input media.
	FadeIn *Fade

	// Describes the properties of a Fade effect applied to the input media.
	FadeOut *Fade

	// The properties of overlays to be applied to the input video. These could be audio, image or video overlays.
	Overlays []OverlayClassification

	// The rotation, if any, to be applied to the input video, before it is encoded. Default is Auto
	Rotation *Rotation
}

Filters - Describes all the filtering operations, such as de-interlacing, rotation etc. that are to be applied to the input media before encoding.

func (Filters) MarshalJSON

func (f Filters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Filters.

func (*Filters) UnmarshalJSON

func (f *Filters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Filters.

type FirstQuality

type FirstQuality struct {
	// REQUIRED; The first quality bitrate.
	Bitrate *int32
}

FirstQuality - Filter First Quality

func (FirstQuality) MarshalJSON

func (f FirstQuality) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type FirstQuality.

func (*FirstQuality) UnmarshalJSON

func (f *FirstQuality) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type FirstQuality.

type Format

type Format struct {
	// REQUIRED; The file naming pattern used for the creation of output files. The following macros are supported in the file
	// name: {Basename} - An expansion macro that will use the name of the input video file. If
	// the base name(the file suffix is not included) of the input video file is less than 32 characters long, the base name of
	// input video files will be used. If the length of base name of the input video
	// file exceeds 32 characters, the base name is truncated to the first 32 characters in total length. {Extension} - The appropriate
	// extension for this format. {Label} - The label assigned to the
	// codec/layer. {Index} - A unique index for thumbnails. Only applicable to thumbnails. {AudioStream} - string "Audio" plus
	// audio stream number(start from 1). {Bitrate} - The audio/video bitrate in kbps.
	// Not applicable to thumbnails. {Codec} - The type of the audio/video codec. {Resolution} - The video resolution. Any unsubstituted
	// macros will be collapsed and removed from the filename.
	FilenamePattern *string

	// REQUIRED; The discriminator for derived types.
	ODataType *string
}

Format - Base class for output.

func (*Format) GetFormat

func (f *Format) GetFormat() *Format

GetFormat implements the FormatClassification interface for type Format.

func (Format) MarshalJSON

func (f Format) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Format.

func (*Format) UnmarshalJSON

func (f *Format) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Format.

type FormatClassification

type FormatClassification interface {
	// GetFormat returns the Format content of the underlying type.
	GetFormat() *Format
}

FormatClassification provides polymorphic access to related types. Call the interface's GetFormat() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *Format, *ImageFormat, *JpgFormat, *Mp4Format, *MultiBitrateFormat, *PNGFormat, *TransportStreamFormat

type FromAllInputFile

type FromAllInputFile struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string

	// The list of TrackDescriptors which define the metadata and selection of tracks in the input.
	IncludedTracks []TrackDescriptorClassification
}

FromAllInputFile - An InputDefinition that looks across all of the files provided to select tracks specified by the IncludedTracks property. Generally used with the AudioTrackByAttribute and VideoTrackByAttribute to allow selection of a single track across a set of input files.

func (*FromAllInputFile) GetInputDefinition

func (f *FromAllInputFile) GetInputDefinition() *InputDefinition

GetInputDefinition implements the InputDefinitionClassification interface for type FromAllInputFile.

func (FromAllInputFile) MarshalJSON

func (f FromAllInputFile) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type FromAllInputFile.

func (*FromAllInputFile) UnmarshalJSON

func (f *FromAllInputFile) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type FromAllInputFile.

type FromEachInputFile

type FromEachInputFile struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string

	// The list of TrackDescriptors which define the metadata and selection of tracks in the input.
	IncludedTracks []TrackDescriptorClassification
}

FromEachInputFile - An InputDefinition that looks at each input file provided to select tracks specified by the IncludedTracks property. Generally used with the AudioTrackByAttribute and VideoTrackByAttribute to select tracks from each file given.

func (*FromEachInputFile) GetInputDefinition

func (f *FromEachInputFile) GetInputDefinition() *InputDefinition

GetInputDefinition implements the InputDefinitionClassification interface for type FromEachInputFile.

func (FromEachInputFile) MarshalJSON

func (f FromEachInputFile) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type FromEachInputFile.

func (*FromEachInputFile) UnmarshalJSON

func (f *FromEachInputFile) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type FromEachInputFile.

type H264Complexity

type H264Complexity string

H264Complexity - Tells the encoder how to choose its encoding settings. The default value is Balanced.

const (
	// H264ComplexityBalanced - Tells the encoder to use settings that achieve a balance between speed and quality.
	H264ComplexityBalanced H264Complexity = "Balanced"
	// H264ComplexityQuality - Tells the encoder to use settings that are optimized to produce higher quality output at the expense
	// of slower overall encode time.
	H264ComplexityQuality H264Complexity = "Quality"
	// H264ComplexitySpeed - Tells the encoder to use settings that are optimized for faster encoding. Quality is sacrificed to
	// decrease encoding time.
	H264ComplexitySpeed H264Complexity = "Speed"
)

func PossibleH264ComplexityValues

func PossibleH264ComplexityValues() []H264Complexity

PossibleH264ComplexityValues returns the possible values for the H264Complexity const type.

type H264Layer

type H264Layer struct {
	// REQUIRED; The average bitrate in bits per second at which to encode the input video when generating this layer. This is
	// a required field.
	Bitrate *int32

	// Whether or not adaptive B-frames are to be used when encoding this layer. If not specified, the encoder will turn it on
	// whenever the video profile permits its use.
	AdaptiveBFrame *bool

	// The number of B-frames to be used when encoding this layer. If not specified, the encoder chooses an appropriate number
	// based on the video profile and level.
	BFrames *int32

	// The VBV buffer window length. The value should be in ISO 8601 format. The value should be in the range [0.1-100] seconds.
	// The default is 5 seconds (for example, PT5S).
	BufferWindow *string

	// The value of CRF to be used when encoding this layer. This setting takes effect when RateControlMode of video codec is
	// set at CRF mode. The range of CRF value is between 0 and 51, where lower values
	// would result in better quality, at the expense of higher file sizes. Higher values mean more compression, but at some point
	// quality degradation will be noticed. Default value is 23.
	Crf *float32

	// The entropy mode to be used for this layer. If not specified, the encoder chooses the mode that is appropriate for the
	// profile and level.
	EntropyMode *EntropyMode

	// The frame rate (in frames per second) at which to encode this layer. The value can be in the form of M/N where M and N
	// are integers (For example, 30000/1001), or in the form of a number (For example,
	// 30, or 29.97). The encoder enforces constraints on allowed frame rates based on the profile and level. If it is not specified,
	// the encoder will use the same frame rate as the input video.
	FrameRate *string

	// The height of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example
	// 50% means the output video has half as many pixels in height as the input.
	Height *string

	// The alphanumeric label for this layer, which can be used in multiplexing different video and audio layers, or in naming
	// the output file.
	Label *string

	// We currently support Level up to 6.2. The value can be Auto, or a number that matches the H.264 profile. If not specified,
	// the default is Auto, which lets the encoder choose the Level that is
	// appropriate for this layer.
	Level *string

	// The maximum bitrate (in bits per second), at which the VBV buffer should be assumed to refill. If not specified, defaults
	// to the same value as bitrate.
	MaxBitrate *int32

	// We currently support Baseline, Main, High, High422, High444. Default is Auto.
	Profile *H264VideoProfile

	// The number of reference frames to be used when encoding this layer. If not specified, the encoder determines an appropriate
	// number based on the encoder complexity setting.
	ReferenceFrames *int32

	// The number of slices to be used when encoding this layer. If not specified, default is zero, which means that encoder will
	// use a single slice for each frame.
	Slices *int32

	// The width of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example
	// 50% means the output video has half as many pixels in width as the input.
	Width *string
}

H264Layer - Describes the settings to be used when encoding the input video into a desired output bitrate layer with the H.264 video codec.

func (H264Layer) MarshalJSON

func (h H264Layer) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type H264Layer.

func (*H264Layer) UnmarshalJSON

func (h *H264Layer) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type H264Layer.

type H264RateControlMode

type H264RateControlMode string

H264RateControlMode - The video rate control mode

const (
	// H264RateControlModeABR - Average Bitrate (ABR) mode that hits the target bitrate: Default mode.
	H264RateControlModeABR H264RateControlMode = "ABR"
	// H264RateControlModeCBR - Constant Bitrate (CBR) mode that tightens bitrate variations around target bitrate.
	H264RateControlModeCBR H264RateControlMode = "CBR"
	// H264RateControlModeCRF - Constant Rate Factor (CRF) mode that targets at constant subjective quality.
	H264RateControlModeCRF H264RateControlMode = "CRF"
)

func PossibleH264RateControlModeValues

func PossibleH264RateControlModeValues() []H264RateControlMode

PossibleH264RateControlModeValues returns the possible values for the H264RateControlMode const type.

type H264Video

type H264Video struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string

	// Tells the encoder how to choose its encoding settings. The default value is Balanced.
	Complexity *H264Complexity

	// The distance between two key frames. The value should be non-zero in the range [0.5, 20] seconds, specified in ISO 8601
	// format. The default is 2 seconds(PT2S). Note that this setting is ignored if
	// VideoSyncMode.Passthrough is set, where the KeyFrameInterval value will follow the input source setting.
	KeyFrameInterval *string

	// An optional label for the codec. The label can be used to control muxing behavior.
	Label *string

	// The collection of output H.264 layers to be produced by the encoder.
	Layers []*H264Layer

	// The video rate control mode
	RateControlMode *H264RateControlMode

	// Whether or not the encoder should insert key frames at scene changes. If not specified, the default is false. This flag
	// should be set to true only when the encoder is being configured to produce a
	// single output video.
	SceneChangeDetection *bool

	// The resizing mode - how the input video will be resized to fit the desired output resolution(s). Default is AutoSize
	StretchMode *StretchMode

	// The Video Sync Mode
	SyncMode *VideoSyncMode
}

H264Video - Describes all the properties for encoding a video with the H.264 codec.

func (*H264Video) GetCodec

func (h *H264Video) GetCodec() *Codec

GetCodec implements the CodecClassification interface for type H264Video.

func (*H264Video) GetVideo

func (h *H264Video) GetVideo() *Video

GetVideo implements the VideoClassification interface for type H264Video.

func (H264Video) MarshalJSON

func (h H264Video) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type H264Video.

func (*H264Video) UnmarshalJSON

func (h *H264Video) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type H264Video.

type H264VideoProfile

type H264VideoProfile string

H264VideoProfile - We currently support Baseline, Main, High, High422, High444. Default is Auto.

const (
	// H264VideoProfileAuto - Tells the encoder to automatically determine the appropriate H.264 profile.
	H264VideoProfileAuto H264VideoProfile = "Auto"
	// H264VideoProfileBaseline - Baseline profile
	H264VideoProfileBaseline H264VideoProfile = "Baseline"
	// H264VideoProfileHigh - High profile.
	H264VideoProfileHigh H264VideoProfile = "High"
	// H264VideoProfileHigh422 - High 4:2:2 profile.
	H264VideoProfileHigh422 H264VideoProfile = "High422"
	// H264VideoProfileHigh444 - High 4:4:4 predictive profile.
	H264VideoProfileHigh444 H264VideoProfile = "High444"
	// H264VideoProfileMain - Main profile
	H264VideoProfileMain H264VideoProfile = "Main"
)

func PossibleH264VideoProfileValues

func PossibleH264VideoProfileValues() []H264VideoProfile

PossibleH264VideoProfileValues returns the possible values for the H264VideoProfile const type.

type H265Complexity

type H265Complexity string

H265Complexity - Tells the encoder how to choose its encoding settings. Quality will provide for a higher compression ratio but at a higher cost and longer compute time. Speed will produce a relatively larger file but is faster and more economical. The default value is Balanced.

const (
	// H265ComplexityBalanced - Tells the encoder to use settings that achieve a balance between speed and quality.
	H265ComplexityBalanced H265Complexity = "Balanced"
	// H265ComplexityQuality - Tells the encoder to use settings that are optimized to produce higher quality output at the expense
	// of slower overall encode time.
	H265ComplexityQuality H265Complexity = "Quality"
	// H265ComplexitySpeed - Tells the encoder to use settings that are optimized for faster encoding. Quality is sacrificed to
	// decrease encoding time.
	H265ComplexitySpeed H265Complexity = "Speed"
)

func PossibleH265ComplexityValues

func PossibleH265ComplexityValues() []H265Complexity

PossibleH265ComplexityValues returns the possible values for the H265Complexity const type.

type H265Layer

type H265Layer struct {
	// REQUIRED; The average bitrate in bits per second at which to encode the input video when generating this layer. For example:
	// a target bitrate of 3000Kbps or 3Mbps means this value should be 3000000 This is a
	// required field.
	Bitrate *int32

	// Specifies whether or not adaptive B-frames are to be used when encoding this layer. If not specified, the encoder will
	// turn it on whenever the video profile permits its use.
	AdaptiveBFrame *bool

	// The number of B-frames to be used when encoding this layer. If not specified, the encoder chooses an appropriate number
	// based on the video profile and level.
	BFrames *int32

	// The VBV buffer window length. The value should be in ISO 8601 format. The value should be in the range [0.1-100] seconds.
	// The default is 5 seconds (for example, PT5S).
	BufferWindow *string

	// The value of CRF to be used when encoding this layer. This setting takes effect when RateControlMode of video codec is
	// set at CRF mode. The range of CRF value is between 0 and 51, where lower values
	// would result in better quality, at the expense of higher file sizes. Higher values mean more compression, but at some point
	// quality degradation will be noticed. Default value is 28.
	Crf *float32

	// The frame rate (in frames per second) at which to encode this layer. The value can be in the form of M/N where M and N
	// are integers (For example, 30000/1001), or in the form of a number (For example,
	// 30, or 29.97). The encoder enforces constraints on allowed frame rates based on the profile and level. If it is not specified,
	// the encoder will use the same frame rate as the input video.
	FrameRate *string

	// The height of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example
	// 50% means the output video has half as many pixels in height as the input.
	Height *string

	// The alphanumeric label for this layer, which can be used in multiplexing different video and audio layers, or in naming
	// the output file.
	Label *string

	// We currently support Level up to 6.2. The value can be Auto, or a number that matches the H.265 profile. If not specified,
	// the default is Auto, which lets the encoder choose the Level that is
	// appropriate for this layer.
	Level *string

	// The maximum bitrate (in bits per second), at which the VBV buffer should be assumed to refill. If not specified, defaults
	// to the same value as bitrate.
	MaxBitrate *int32

	// We currently support Main. Default is Auto.
	Profile *H265VideoProfile

	// The number of reference frames to be used when encoding this layer. If not specified, the encoder determines an appropriate
	// number based on the encoder complexity setting.
	ReferenceFrames *int32

	// The number of slices to be used when encoding this layer. If not specified, default is zero, which means that encoder will
	// use a single slice for each frame.
	Slices *int32

	// The width of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example
	// 50% means the output video has half as many pixels in width as the input.
	Width *string
}

H265Layer - Describes the settings to be used when encoding the input video into a desired output bitrate layer with the H.265 video codec.

func (H265Layer) MarshalJSON

func (h H265Layer) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type H265Layer.

func (*H265Layer) UnmarshalJSON

func (h *H265Layer) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type H265Layer.

type H265Video

type H265Video struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string

	// Tells the encoder how to choose its encoding settings. Quality will provide for a higher compression ratio but at a higher
	// cost and longer compute time. Speed will produce a relatively larger file but
	// is faster and more economical. The default value is Balanced.
	Complexity *H265Complexity

	// The distance between two key frames. The value should be non-zero in the range [0.5, 20] seconds, specified in ISO 8601
	// format. The default is 2 seconds(PT2S). Note that this setting is ignored if
	// VideoSyncMode.Passthrough is set, where the KeyFrameInterval value will follow the input source setting.
	KeyFrameInterval *string

	// An optional label for the codec. The label can be used to control muxing behavior.
	Label *string

	// The collection of output H.265 layers to be produced by the encoder.
	Layers []*H265Layer

	// Specifies whether or not the encoder should insert key frames at scene changes. If not specified, the default is false.
	// This flag should be set to true only when the encoder is being configured to
	// produce a single output video.
	SceneChangeDetection *bool

	// The resizing mode - how the input video will be resized to fit the desired output resolution(s). Default is AutoSize
	StretchMode *StretchMode

	// The Video Sync Mode
	SyncMode *VideoSyncMode
}

H265Video - Describes all the properties for encoding a video with the H.265 codec.

func (*H265Video) GetCodec

func (h *H265Video) GetCodec() *Codec

GetCodec implements the CodecClassification interface for type H265Video.

func (*H265Video) GetVideo

func (h *H265Video) GetVideo() *Video

GetVideo implements the VideoClassification interface for type H265Video.

func (H265Video) MarshalJSON

func (h H265Video) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type H265Video.

func (*H265Video) UnmarshalJSON

func (h *H265Video) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type H265Video.

type H265VideoLayer

type H265VideoLayer struct {
	// REQUIRED; The average bitrate in bits per second at which to encode the input video when generating this layer. For example:
	// a target bitrate of 3000Kbps or 3Mbps means this value should be 3000000 This is a
	// required field.
	Bitrate *int32

	// Specifies whether or not adaptive B-frames are to be used when encoding this layer. If not specified, the encoder will
	// turn it on whenever the video profile permits its use.
	AdaptiveBFrame *bool

	// The number of B-frames to be used when encoding this layer. If not specified, the encoder chooses an appropriate number
	// based on the video profile and level.
	BFrames *int32

	// The frame rate (in frames per second) at which to encode this layer. The value can be in the form of M/N where M and N
	// are integers (For example, 30000/1001), or in the form of a number (For example,
	// 30, or 29.97). The encoder enforces constraints on allowed frame rates based on the profile and level. If it is not specified,
	// the encoder will use the same frame rate as the input video.
	FrameRate *string

	// The height of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example
	// 50% means the output video has half as many pixels in height as the input.
	Height *string

	// The alphanumeric label for this layer, which can be used in multiplexing different video and audio layers, or in naming
	// the output file.
	Label *string

	// The maximum bitrate (in bits per second), at which the VBV buffer should be assumed to refill. If not specified, defaults
	// to the same value as bitrate.
	MaxBitrate *int32

	// The number of slices to be used when encoding this layer. If not specified, default is zero, which means that encoder will
	// use a single slice for each frame.
	Slices *int32

	// The width of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example
	// 50% means the output video has half as many pixels in width as the input.
	Width *string
}

H265VideoLayer - Describes the settings to be used when encoding the input video into a desired output bitrate layer.

func (H265VideoLayer) MarshalJSON

func (h H265VideoLayer) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type H265VideoLayer.

func (*H265VideoLayer) UnmarshalJSON

func (h *H265VideoLayer) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type H265VideoLayer.

type H265VideoProfile

type H265VideoProfile string

H265VideoProfile - We currently support Main. Default is Auto.

const (
	// H265VideoProfileAuto - Tells the encoder to automatically determine the appropriate H.265 profile.
	H265VideoProfileAuto H265VideoProfile = "Auto"
	// H265VideoProfileMain - Main profile (https://x265.readthedocs.io/en/default/cli.html?highlight=profile#profile-level-tier)
	H265VideoProfileMain H265VideoProfile = "Main"
	// H265VideoProfileMain10 - Main 10 profile (https://en.wikipedia.org/wiki/High_Efficiency_Video_Coding#Main_10)
	H265VideoProfileMain10 H265VideoProfile = "Main10"
)

func PossibleH265VideoProfileValues

func PossibleH265VideoProfileValues() []H265VideoProfile

PossibleH265VideoProfileValues returns the possible values for the H265VideoProfile const type.

type Hls

type Hls struct {
	// The number of fragments in an HTTP Live Streaming (HLS) TS segment in the output of the live event. This value does not
	// affect the packing ratio for HLS CMAF output.
	FragmentsPerTsSegment *int32
}

Hls - HTTP Live Streaming (HLS) packing setting for the live output.

func (Hls) MarshalJSON

func (h Hls) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Hls.

func (*Hls) UnmarshalJSON

func (h *Hls) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Hls.

type HlsSettings

type HlsSettings struct {
	// The characteristics for the HLS setting.
	Characteristics *string

	// The default for the HLS setting.
	Default *bool

	// The forced for the HLS setting.
	Forced *bool
}

HlsSettings - The HLS setting for a track.

func (HlsSettings) MarshalJSON

func (h HlsSettings) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type HlsSettings.

func (*HlsSettings) UnmarshalJSON

func (h *HlsSettings) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type HlsSettings.

type IPAccessControl

type IPAccessControl struct {
	// The IP allow list.
	Allow []*IPRange
}

IPAccessControl - The IP access control.

func (IPAccessControl) MarshalJSON

func (i IPAccessControl) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type IPAccessControl.

func (*IPAccessControl) UnmarshalJSON

func (i *IPAccessControl) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type IPAccessControl.

type IPRange

type IPRange struct {
	// The IP address.
	Address *string

	// The friendly name for the IP address range.
	Name *string

	// The subnet mask prefix length (see CIDR notation).
	SubnetPrefixLength *int32
}

IPRange - The IP address range in the CIDR scheme.

func (IPRange) MarshalJSON

func (i IPRange) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type IPRange.

func (*IPRange) UnmarshalJSON

func (i *IPRange) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type IPRange.

type Image

type Image struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string

	// REQUIRED; The position in the input video from where to start generating thumbnails. The value can be in ISO 8601 format
	// (For example, PT05S to start at 5 seconds), or a frame count (For example, 10 to start at
	// the 10th frame), or a relative value to stream duration (For example, 10% to start at 10% of stream duration). Also supports
	// a macro {Best}, which tells the encoder to select the best thumbnail from
	// the first few seconds of the video and will only produce one thumbnail, no matter what other settings are for Step and
	// Range. The default value is macro {Best}.
	Start *string

	// The distance between two key frames. The value should be non-zero in the range [0.5, 20] seconds, specified in ISO 8601
	// format. The default is 2 seconds(PT2S). Note that this setting is ignored if
	// VideoSyncMode.Passthrough is set, where the KeyFrameInterval value will follow the input source setting.
	KeyFrameInterval *string

	// An optional label for the codec. The label can be used to control muxing behavior.
	Label *string

	// The position relative to transform preset start time in the input video at which to stop generating thumbnails. The value
	// can be in ISO 8601 format (For example, PT5M30S to stop at 5 minutes and 30
	// seconds from start time), or a frame count (For example, 300 to stop at the 300th frame from the frame at start time. If
	// this value is 1, it means only producing one thumbnail at start time), or a
	// relative value to the stream duration (For example, 50% to stop at half of stream duration from start time). The default
	// value is 100%, which means to stop at the end of the stream.
	Range *string

	// The intervals at which thumbnails are generated. The value can be in ISO 8601 format (For example, PT05S for one image
	// every 5 seconds), or a frame count (For example, 30 for one image every 30
	// frames), or a relative value to stream duration (For example, 10% for one image every 10% of stream duration). Note: Step
	// value will affect the first generated thumbnail, which may not be exactly the
	// one specified at transform preset start time. This is due to the encoder, which tries to select the best thumbnail between
	// start time and Step position from start time as the first output. As the
	// default value is 10%, it means if stream has long duration, the first generated thumbnail might be far away from the one
	// specified at start time. Try to select reasonable value for Step if the first
	// thumbnail is expected close to start time, or set Range value at 1 if only one thumbnail is needed at start time.
	Step *string

	// The resizing mode - how the input video will be resized to fit the desired output resolution(s). Default is AutoSize
	StretchMode *StretchMode

	// The Video Sync Mode
	SyncMode *VideoSyncMode
}

Image - Describes the basic properties for generating thumbnails from the input video

func (*Image) GetCodec

func (i *Image) GetCodec() *Codec

GetCodec implements the CodecClassification interface for type Image.

func (*Image) GetImage

func (i *Image) GetImage() *Image

GetImage implements the ImageClassification interface for type Image.

func (*Image) GetVideo

func (i *Image) GetVideo() *Video

GetVideo implements the VideoClassification interface for type Image.

func (Image) MarshalJSON

func (i Image) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Image.

func (*Image) UnmarshalJSON

func (i *Image) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Image.

type ImageClassification

type ImageClassification interface {
	VideoClassification
	// GetImage returns the Image content of the underlying type.
	GetImage() *Image
}

ImageClassification provides polymorphic access to related types. Call the interface's GetImage() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *Image, *JpgImage, *PNGImage

type ImageFormat

type ImageFormat struct {
	// REQUIRED; The file naming pattern used for the creation of output files. The following macros are supported in the file
	// name: {Basename} - An expansion macro that will use the name of the input video file. If
	// the base name(the file suffix is not included) of the input video file is less than 32 characters long, the base name of
	// input video files will be used. If the length of base name of the input video
	// file exceeds 32 characters, the base name is truncated to the first 32 characters in total length. {Extension} - The appropriate
	// extension for this format. {Label} - The label assigned to the
	// codec/layer. {Index} - A unique index for thumbnails. Only applicable to thumbnails. {AudioStream} - string "Audio" plus
	// audio stream number(start from 1). {Bitrate} - The audio/video bitrate in kbps.
	// Not applicable to thumbnails. {Codec} - The type of the audio/video codec. {Resolution} - The video resolution. Any unsubstituted
	// macros will be collapsed and removed from the filename.
	FilenamePattern *string

	// REQUIRED; The discriminator for derived types.
	ODataType *string
}

ImageFormat - Describes the properties for an output image file.

func (*ImageFormat) GetFormat

func (i *ImageFormat) GetFormat() *Format

GetFormat implements the FormatClassification interface for type ImageFormat.

func (*ImageFormat) GetImageFormat

func (i *ImageFormat) GetImageFormat() *ImageFormat

GetImageFormat implements the ImageFormatClassification interface for type ImageFormat.

func (ImageFormat) MarshalJSON

func (i ImageFormat) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ImageFormat.

func (*ImageFormat) UnmarshalJSON

func (i *ImageFormat) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ImageFormat.

type ImageFormatClassification

type ImageFormatClassification interface {
	FormatClassification
	// GetImageFormat returns the ImageFormat content of the underlying type.
	GetImageFormat() *ImageFormat
}

ImageFormatClassification provides polymorphic access to related types. Call the interface's GetImageFormat() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *ImageFormat, *JpgFormat, *PNGFormat

type InputDefinition

type InputDefinition struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string

	// The list of TrackDescriptors which define the metadata and selection of tracks in the input.
	IncludedTracks []TrackDescriptorClassification
}

InputDefinition - Base class for defining an input. Use sub classes of this class to specify tracks selections and related metadata.

func (*InputDefinition) GetInputDefinition

func (i *InputDefinition) GetInputDefinition() *InputDefinition

GetInputDefinition implements the InputDefinitionClassification interface for type InputDefinition.

func (InputDefinition) MarshalJSON

func (i InputDefinition) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type InputDefinition.

func (*InputDefinition) UnmarshalJSON

func (i *InputDefinition) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type InputDefinition.

type InputDefinitionClassification

type InputDefinitionClassification interface {
	// GetInputDefinition returns the InputDefinition content of the underlying type.
	GetInputDefinition() *InputDefinition
}

InputDefinitionClassification provides polymorphic access to related types. Call the interface's GetInputDefinition() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *FromAllInputFile, *FromEachInputFile, *InputDefinition, *InputFile

type InputFile

type InputFile struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string

	// Name of the file that this input definition applies to.
	Filename *string

	// The list of TrackDescriptors which define the metadata and selection of tracks in the input.
	IncludedTracks []TrackDescriptorClassification
}

InputFile - An InputDefinition for a single file. TrackSelections are scoped to the file specified.

func (*InputFile) GetInputDefinition

func (i *InputFile) GetInputDefinition() *InputDefinition

GetInputDefinition implements the InputDefinitionClassification interface for type InputFile.

func (InputFile) MarshalJSON

func (i InputFile) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type InputFile.

func (*InputFile) UnmarshalJSON

func (i *InputFile) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type InputFile.

type InsightsType

type InsightsType string

InsightsType - Defines the type of insights that you want the service to generate. The allowed values are 'AudioInsightsOnly', 'VideoInsightsOnly', and 'AllInsights'. The default is AllInsights. If you set this to AllInsights and the input is audio only, then only audio insights are generated. Similarly if the input is video only, then only video insights are generated. It is recommended that you not use AudioInsightsOnly if you expect some of your inputs to be video only; or use VideoInsightsOnly if you expect some of your inputs to be audio only. Your Jobs in such conditions would error out.

const (
	// InsightsTypeAllInsights - Generate both audio and video insights. Fails if either audio or video Insights fail.
	InsightsTypeAllInsights InsightsType = "AllInsights"
	// InsightsTypeAudioInsightsOnly - Generate audio only insights. Ignore video even if present. Fails if no audio is present.
	InsightsTypeAudioInsightsOnly InsightsType = "AudioInsightsOnly"
	// InsightsTypeVideoInsightsOnly - Generate video only insights. Ignore audio if present. Fails if no video is present.
	InsightsTypeVideoInsightsOnly InsightsType = "VideoInsightsOnly"
)

func PossibleInsightsTypeValues

func PossibleInsightsTypeValues() []InsightsType

PossibleInsightsTypeValues returns the possible values for the InsightsType const type.

type InterleaveOutput

type InterleaveOutput string

InterleaveOutput - Sets the interleave mode of the output to control how audio and video are stored in the container format. Example: set InterleavedOutput as NonInterleavedOutput to produce audio-only and video-only outputs in separate MP4 files.

const (
	// InterleaveOutputInterleavedOutput - The output includes both audio and video.
	InterleaveOutputInterleavedOutput InterleaveOutput = "InterleavedOutput"
	// InterleaveOutputNonInterleavedOutput - The output is video-only or audio-only.
	InterleaveOutputNonInterleavedOutput InterleaveOutput = "NonInterleavedOutput"
)

func PossibleInterleaveOutputValues

func PossibleInterleaveOutputValues() []InterleaveOutput

PossibleInterleaveOutputValues returns the possible values for the InterleaveOutput const type.

type Job

type Job struct {
	// The resource properties.
	Properties *JobProperties

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; The system metadata relating to this resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

Job - A Job resource type. The progress and state can be obtained by polling a Job or subscribing to events using EventGrid.

func (Job) MarshalJSON

func (j Job) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Job.

func (*Job) UnmarshalJSON

func (j *Job) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Job.

type JobCollection

type JobCollection struct {
	// A link to the next page of the collection (when the collection contains too many results to return in one response).
	ODataNextLink *string

	// A collection of Job items.
	Value []*Job
}

JobCollection - A collection of Job items.

func (JobCollection) MarshalJSON

func (j JobCollection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type JobCollection.

func (*JobCollection) UnmarshalJSON

func (j *JobCollection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type JobCollection.

type JobError

type JobError struct {
	// READ-ONLY; Helps with categorization of errors.
	Category *JobErrorCategory

	// READ-ONLY; Error code describing the error.
	Code *JobErrorCode

	// READ-ONLY; An array of details about specific errors that led to this reported error.
	Details []*JobErrorDetail

	// READ-ONLY; A human-readable language-dependent representation of the error.
	Message *string

	// READ-ONLY; Indicates that it may be possible to retry the Job. If retry is unsuccessful, please contact Azure support via
	// Azure Portal.
	Retry *JobRetry
}

JobError - Details of JobOutput errors.

func (JobError) MarshalJSON

func (j JobError) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type JobError.

func (*JobError) UnmarshalJSON

func (j *JobError) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type JobError.

type JobErrorCategory

type JobErrorCategory string

JobErrorCategory - Helps with categorization of errors.

const (
	// JobErrorCategoryAccount - The error is related to account information.
	JobErrorCategoryAccount JobErrorCategory = "Account"
	// JobErrorCategoryConfiguration - The error is configuration related.
	JobErrorCategoryConfiguration JobErrorCategory = "Configuration"
	// JobErrorCategoryContent - The error is related to data in the input files.
	JobErrorCategoryContent JobErrorCategory = "Content"
	// JobErrorCategoryDownload - The error is download related.
	JobErrorCategoryDownload JobErrorCategory = "Download"
	// JobErrorCategoryService - The error is service related.
	JobErrorCategoryService JobErrorCategory = "Service"
	// JobErrorCategoryUpload - The error is upload related.
	JobErrorCategoryUpload JobErrorCategory = "Upload"
)

func PossibleJobErrorCategoryValues

func PossibleJobErrorCategoryValues() []JobErrorCategory

PossibleJobErrorCategoryValues returns the possible values for the JobErrorCategory const type.

type JobErrorCode

type JobErrorCode string

JobErrorCode - Error code describing the error.

const (
	// JobErrorCodeConfigurationUnsupported - There was a problem with the combination of input files and the configuration settings
	// applied, fix the configuration settings and retry with the same input, or change input to match the configuration.
	JobErrorCodeConfigurationUnsupported JobErrorCode = "ConfigurationUnsupported"
	// JobErrorCodeContentMalformed - There was a problem with the input content (for example: zero byte files, or corrupt/non-decodable
	// files), check the input files.
	JobErrorCodeContentMalformed JobErrorCode = "ContentMalformed"
	// JobErrorCodeContentUnsupported - There was a problem with the format of the input (not valid media file, or an unsupported
	// file/codec), check the validity of the input files.
	JobErrorCodeContentUnsupported JobErrorCode = "ContentUnsupported"
	// JobErrorCodeDownloadNotAccessible - While trying to download the input files, the files were not accessible, please check
	// the availability of the source.
	JobErrorCodeDownloadNotAccessible JobErrorCode = "DownloadNotAccessible"
	// JobErrorCodeDownloadTransientError - While trying to download the input files, there was an issue during transfer (storage
	// service, network errors), see details and check your source.
	JobErrorCodeDownloadTransientError JobErrorCode = "DownloadTransientError"
	// JobErrorCodeIdentityUnsupported - There was an error verifying to the account identity. Check and fix the identity configurations
	// and retry. If unsuccessful, please contact support.
	JobErrorCodeIdentityUnsupported JobErrorCode = "IdentityUnsupported"
	// JobErrorCodeServiceError - Fatal service error, please contact support.
	JobErrorCodeServiceError JobErrorCode = "ServiceError"
	// JobErrorCodeServiceTransientError - Transient error, please retry, if retry is unsuccessful, please contact support.
	JobErrorCodeServiceTransientError JobErrorCode = "ServiceTransientError"
	// JobErrorCodeUploadNotAccessible - While trying to upload the output files, the destination was not reachable, please check
	// the availability of the destination.
	JobErrorCodeUploadNotAccessible JobErrorCode = "UploadNotAccessible"
	// JobErrorCodeUploadTransientError - While trying to upload the output files, there was an issue during transfer (storage
	// service, network errors), see details and check your destination.
	JobErrorCodeUploadTransientError JobErrorCode = "UploadTransientError"
)

func PossibleJobErrorCodeValues

func PossibleJobErrorCodeValues() []JobErrorCode

PossibleJobErrorCodeValues returns the possible values for the JobErrorCode const type.

type JobErrorDetail

type JobErrorDetail struct {
	// READ-ONLY; Code describing the error detail.
	Code *string

	// READ-ONLY; A human-readable representation of the error.
	Message *string
}

JobErrorDetail - Details of JobOutput errors.

func (JobErrorDetail) MarshalJSON

func (j JobErrorDetail) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type JobErrorDetail.

func (*JobErrorDetail) UnmarshalJSON

func (j *JobErrorDetail) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type JobErrorDetail.

type JobInput

type JobInput struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string
}

JobInput - Base class for inputs to a Job.

func (*JobInput) GetJobInput

func (j *JobInput) GetJobInput() *JobInput

GetJobInput implements the JobInputClassification interface for type JobInput.

func (JobInput) MarshalJSON

func (j JobInput) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type JobInput.

func (*JobInput) UnmarshalJSON

func (j *JobInput) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type JobInput.

type JobInputAsset

type JobInputAsset struct {
	// REQUIRED; The name of the input Asset.
	AssetName *string

	// REQUIRED; The discriminator for derived types.
	ODataType *string

	// Defines a point on the timeline of the input media at which processing will end. Defaults to the end of the input media.
	End ClipTimeClassification

	// List of files. Required for JobInputHttp. Maximum of 4000 characters each. Query strings will not be returned in service
	// responses to prevent sensitive data exposure.
	Files []*string

	// Defines a list of InputDefinitions. For each InputDefinition, it defines a list of track selections and related metadata.
	InputDefinitions []InputDefinitionClassification

	// A label that is assigned to a JobInputClip, that is used to satisfy a reference used in the Transform. For example, a Transform
	// can be authored so as to take an image file with the label 'xyz' and
	// apply it as an overlay onto the input video before it is encoded. When submitting a Job, exactly one of the JobInputs should
	// be the image file, and it should have the label 'xyz'.
	Label *string

	// Defines a point on the timeline of the input media at which processing will start. Defaults to the beginning of the input
	// media.
	Start ClipTimeClassification
}

JobInputAsset - Represents an Asset for input into a Job.

func (*JobInputAsset) GetJobInput

func (j *JobInputAsset) GetJobInput() *JobInput

GetJobInput implements the JobInputClassification interface for type JobInputAsset.

func (*JobInputAsset) GetJobInputClip

func (j *JobInputAsset) GetJobInputClip() *JobInputClip

GetJobInputClip implements the JobInputClipClassification interface for type JobInputAsset.

func (JobInputAsset) MarshalJSON

func (j JobInputAsset) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type JobInputAsset.

func (*JobInputAsset) UnmarshalJSON

func (j *JobInputAsset) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type JobInputAsset.

type JobInputClassification

type JobInputClassification interface {
	// GetJobInput returns the JobInput content of the underlying type.
	GetJobInput() *JobInput
}

JobInputClassification provides polymorphic access to related types. Call the interface's GetJobInput() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *JobInput, *JobInputAsset, *JobInputClip, *JobInputHTTP, *JobInputSequence, *JobInputs

type JobInputClip

type JobInputClip struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string

	// Defines a point on the timeline of the input media at which processing will end. Defaults to the end of the input media.
	End ClipTimeClassification

	// List of files. Required for JobInputHttp. Maximum of 4000 characters each. Query strings will not be returned in service
	// responses to prevent sensitive data exposure.
	Files []*string

	// Defines a list of InputDefinitions. For each InputDefinition, it defines a list of track selections and related metadata.
	InputDefinitions []InputDefinitionClassification

	// A label that is assigned to a JobInputClip, that is used to satisfy a reference used in the Transform. For example, a Transform
	// can be authored so as to take an image file with the label 'xyz' and
	// apply it as an overlay onto the input video before it is encoded. When submitting a Job, exactly one of the JobInputs should
	// be the image file, and it should have the label 'xyz'.
	Label *string

	// Defines a point on the timeline of the input media at which processing will start. Defaults to the beginning of the input
	// media.
	Start ClipTimeClassification
}

JobInputClip - Represents input files for a Job.

func (*JobInputClip) GetJobInput

func (j *JobInputClip) GetJobInput() *JobInput

GetJobInput implements the JobInputClassification interface for type JobInputClip.

func (*JobInputClip) GetJobInputClip

func (j *JobInputClip) GetJobInputClip() *JobInputClip

GetJobInputClip implements the JobInputClipClassification interface for type JobInputClip.

func (JobInputClip) MarshalJSON

func (j JobInputClip) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type JobInputClip.

func (*JobInputClip) UnmarshalJSON

func (j *JobInputClip) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type JobInputClip.

type JobInputClipClassification

type JobInputClipClassification interface {
	JobInputClassification
	// GetJobInputClip returns the JobInputClip content of the underlying type.
	GetJobInputClip() *JobInputClip
}

JobInputClipClassification provides polymorphic access to related types. Call the interface's GetJobInputClip() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *JobInputAsset, *JobInputClip, *JobInputHTTP

type JobInputHTTP

type JobInputHTTP struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string

	// Base URI for HTTPS job input. It will be concatenated with provided file names. If no base uri is given, then the provided
	// file list is assumed to be fully qualified uris. Maximum length of 4000
	// characters. The query strings will not be returned in service responses to prevent sensitive data exposure.
	BaseURI *string

	// Defines a point on the timeline of the input media at which processing will end. Defaults to the end of the input media.
	End ClipTimeClassification

	// List of files. Required for JobInputHttp. Maximum of 4000 characters each. Query strings will not be returned in service
	// responses to prevent sensitive data exposure.
	Files []*string

	// Defines a list of InputDefinitions. For each InputDefinition, it defines a list of track selections and related metadata.
	InputDefinitions []InputDefinitionClassification

	// A label that is assigned to a JobInputClip, that is used to satisfy a reference used in the Transform. For example, a Transform
	// can be authored so as to take an image file with the label 'xyz' and
	// apply it as an overlay onto the input video before it is encoded. When submitting a Job, exactly one of the JobInputs should
	// be the image file, and it should have the label 'xyz'.
	Label *string

	// Defines a point on the timeline of the input media at which processing will start. Defaults to the beginning of the input
	// media.
	Start ClipTimeClassification
}

JobInputHTTP - Represents HTTPS job input.

func (*JobInputHTTP) GetJobInput

func (j *JobInputHTTP) GetJobInput() *JobInput

GetJobInput implements the JobInputClassification interface for type JobInputHTTP.

func (*JobInputHTTP) GetJobInputClip

func (j *JobInputHTTP) GetJobInputClip() *JobInputClip

GetJobInputClip implements the JobInputClipClassification interface for type JobInputHTTP.

func (JobInputHTTP) MarshalJSON

func (j JobInputHTTP) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type JobInputHTTP.

func (*JobInputHTTP) UnmarshalJSON

func (j *JobInputHTTP) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type JobInputHTTP.

type JobInputSequence

type JobInputSequence struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string

	// JobInputs that make up the timeline.
	Inputs []JobInputClipClassification
}

JobInputSequence - A Sequence contains an ordered list of Clips where each clip is a JobInput. The Sequence will be treated as a single input.

func (*JobInputSequence) GetJobInput

func (j *JobInputSequence) GetJobInput() *JobInput

GetJobInput implements the JobInputClassification interface for type JobInputSequence.

func (JobInputSequence) MarshalJSON

func (j JobInputSequence) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type JobInputSequence.

func (*JobInputSequence) UnmarshalJSON

func (j *JobInputSequence) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type JobInputSequence.

type JobInputs

type JobInputs struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string

	// List of inputs to a Job.
	Inputs []JobInputClassification
}

JobInputs - Describes a list of inputs to a Job.

func (*JobInputs) GetJobInput

func (j *JobInputs) GetJobInput() *JobInput

GetJobInput implements the JobInputClassification interface for type JobInputs.

func (JobInputs) MarshalJSON

func (j JobInputs) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type JobInputs.

func (*JobInputs) UnmarshalJSON

func (j *JobInputs) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type JobInputs.

type JobOutput

type JobOutput struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string

	// A label that is assigned to a JobOutput in order to help uniquely identify it. This is useful when your Transform has more
	// than one TransformOutput, whereby your Job has more than one JobOutput. In
	// such cases, when you submit the Job, you will add two or more JobOutputs, in the same order as TransformOutputs in the
	// Transform. Subsequently, when you retrieve the Job, either through events or on a
	// GET request, you can use the label to easily identify the JobOutput. If a label is not provided, a default value of '{presetName}_{outputIndex}'
	// will be used, where the preset name is the name of the
	// preset in the corresponding TransformOutput and the output index is the relative index of the this JobOutput within the
	// Job. Note that this index is the same as the relative index of the corresponding
	// TransformOutput within its Transform.
	Label *string

	// A preset used to override the preset in the corresponding transform output.
	PresetOverride PresetClassification

	// READ-ONLY; The UTC date and time at which this Job Output finished processing.
	EndTime *time.Time

	// READ-ONLY; If the JobOutput is in the Error state, it contains the details of the error.
	Error *JobError

	// READ-ONLY; If the JobOutput is in a Processing state, this contains the Job completion percentage. The value is an estimate
	// and not intended to be used to predict Job completion times. To determine if the
	// JobOutput is complete, use the State property.
	Progress *int32

	// READ-ONLY; The UTC date and time at which this Job Output began processing.
	StartTime *time.Time

	// READ-ONLY; Describes the state of the JobOutput.
	State *JobState
}

JobOutput - Describes all the properties of a JobOutput.

func (*JobOutput) GetJobOutput

func (j *JobOutput) GetJobOutput() *JobOutput

GetJobOutput implements the JobOutputClassification interface for type JobOutput.

func (JobOutput) MarshalJSON

func (j JobOutput) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type JobOutput.

func (*JobOutput) UnmarshalJSON

func (j *JobOutput) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type JobOutput.

type JobOutputAsset

type JobOutputAsset struct {
	// REQUIRED; The name of the output Asset.
	AssetName *string

	// REQUIRED; The discriminator for derived types.
	ODataType *string

	// A label that is assigned to a JobOutput in order to help uniquely identify it. This is useful when your Transform has more
	// than one TransformOutput, whereby your Job has more than one JobOutput. In
	// such cases, when you submit the Job, you will add two or more JobOutputs, in the same order as TransformOutputs in the
	// Transform. Subsequently, when you retrieve the Job, either through events or on a
	// GET request, you can use the label to easily identify the JobOutput. If a label is not provided, a default value of '{presetName}_{outputIndex}'
	// will be used, where the preset name is the name of the
	// preset in the corresponding TransformOutput and the output index is the relative index of the this JobOutput within the
	// Job. Note that this index is the same as the relative index of the corresponding
	// TransformOutput within its Transform.
	Label *string

	// A preset used to override the preset in the corresponding transform output.
	PresetOverride PresetClassification

	// READ-ONLY; The UTC date and time at which this Job Output finished processing.
	EndTime *time.Time

	// READ-ONLY; If the JobOutput is in the Error state, it contains the details of the error.
	Error *JobError

	// READ-ONLY; If the JobOutput is in a Processing state, this contains the Job completion percentage. The value is an estimate
	// and not intended to be used to predict Job completion times. To determine if the
	// JobOutput is complete, use the State property.
	Progress *int32

	// READ-ONLY; The UTC date and time at which this Job Output began processing.
	StartTime *time.Time

	// READ-ONLY; Describes the state of the JobOutput.
	State *JobState
}

JobOutputAsset - Represents an Asset used as a JobOutput.

func (*JobOutputAsset) GetJobOutput

func (j *JobOutputAsset) GetJobOutput() *JobOutput

GetJobOutput implements the JobOutputClassification interface for type JobOutputAsset.

func (JobOutputAsset) MarshalJSON

func (j JobOutputAsset) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type JobOutputAsset.

func (*JobOutputAsset) UnmarshalJSON

func (j *JobOutputAsset) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type JobOutputAsset.

type JobOutputClassification

type JobOutputClassification interface {
	// GetJobOutput returns the JobOutput content of the underlying type.
	GetJobOutput() *JobOutput
}

JobOutputClassification provides polymorphic access to related types. Call the interface's GetJobOutput() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *JobOutput, *JobOutputAsset

type JobProperties

type JobProperties struct {
	// REQUIRED; The inputs for the Job.
	Input JobInputClassification

	// REQUIRED; The outputs for the Job.
	Outputs []JobOutputClassification

	// Customer provided key, value pairs that will be returned in Job and JobOutput state events.
	CorrelationData map[string]*string

	// Optional customer supplied description of the Job.
	Description *string

	// Priority with which the job should be processed. Higher priority jobs are processed before lower priority jobs. If not
	// set, the default is normal.
	Priority *Priority

	// READ-ONLY; The UTC date and time when the customer has created the Job, in 'YYYY-MM-DDThh:mm:ssZ' format.
	Created *time.Time

	// READ-ONLY; The UTC date and time at which this Job finished processing.
	EndTime *time.Time

	// READ-ONLY; The UTC date and time when the customer has last updated the Job, in 'YYYY-MM-DDThh:mm:ssZ' format.
	LastModified *time.Time

	// READ-ONLY; The UTC date and time at which this Job began processing.
	StartTime *time.Time

	// READ-ONLY; The current state of the job.
	State *JobState
}

JobProperties - Properties of the Job.

func (JobProperties) MarshalJSON

func (j JobProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type JobProperties.

func (*JobProperties) UnmarshalJSON

func (j *JobProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type JobProperties.

type JobRetry

type JobRetry string

JobRetry - Indicates that it may be possible to retry the Job. If retry is unsuccessful, please contact Azure support via Azure Portal.

const (
	// JobRetryDoNotRetry - Issue needs to be investigated and then the job resubmitted with corrections or retried once the underlying
	// issue has been corrected.
	JobRetryDoNotRetry JobRetry = "DoNotRetry"
	// JobRetryMayRetry - Issue may be resolved after waiting for a period of time and resubmitting the same Job.
	JobRetryMayRetry JobRetry = "MayRetry"
)

func PossibleJobRetryValues

func PossibleJobRetryValues() []JobRetry

PossibleJobRetryValues returns the possible values for the JobRetry const type.

type JobState

type JobState string

JobState - Describes the state of the JobOutput.

const (
	// JobStateCanceled - The job was canceled. This is a final state for the job.
	JobStateCanceled JobState = "Canceled"
	// JobStateCanceling - The job is in the process of being canceled. This is a transient state for the job.
	JobStateCanceling JobState = "Canceling"
	// JobStateError - The job has encountered an error. This is a final state for the job.
	JobStateError JobState = "Error"
	// JobStateFinished - The job is finished. This is a final state for the job.
	JobStateFinished JobState = "Finished"
	// JobStateProcessing - The job is processing. This is a transient state for the job.
	JobStateProcessing JobState = "Processing"
	// JobStateQueued - The job is in a queued state, waiting for resources to become available. This is a transient state.
	JobStateQueued JobState = "Queued"
	// JobStateScheduled - The job is being scheduled to run on an available resource. This is a transient state, between queued
	// and processing states.
	JobStateScheduled JobState = "Scheduled"
)

func PossibleJobStateValues

func PossibleJobStateValues() []JobState

PossibleJobStateValues returns the possible values for the JobState const type.

type JobsClient

type JobsClient struct {
	// contains filtered or unexported fields
}

JobsClient contains the methods for the Jobs group. Don't use this type directly, use NewJobsClient() instead.

func NewJobsClient

func NewJobsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*JobsClient, error)

NewJobsClient creates a new instance of JobsClient with the specified values.

  • subscriptionID - The unique identifier for a Microsoft Azure subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*JobsClient) CancelJob

func (client *JobsClient) CancelJob(ctx context.Context, resourceGroupName string, accountName string, transformName string, jobName string, options *JobsClientCancelJobOptions) (JobsClientCancelJobResponse, error)

CancelJob - Cancel a Job. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-07-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • transformName - The Transform name.
  • jobName - The Job name.
  • options - JobsClientCancelJobOptions contains the optional parameters for the JobsClient.CancelJob method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Encoding/stable/2022-07-01/examples/jobs-cancel.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewJobsClient().CancelJob(ctx, "contosoresources", "contosomedia", "exampleTransform", "job1", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*JobsClient) Create

func (client *JobsClient) Create(ctx context.Context, resourceGroupName string, accountName string, transformName string, jobName string, parameters Job, options *JobsClientCreateOptions) (JobsClientCreateResponse, error)

Create - Creates a Job. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-07-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • transformName - The Transform name.
  • jobName - The Job name.
  • parameters - The request parameters
  • options - JobsClientCreateOptions contains the optional parameters for the JobsClient.Create method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Encoding/stable/2022-07-01/examples/jobs-create.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewJobsClient().Create(ctx, "contosoresources", "contosomedia", "exampleTransform", "job1", armmediaservices.Job{
	Properties: &armmediaservices.JobProperties{
		CorrelationData: map[string]*string{
			"Key 2": to.Ptr("Value 2"),
			"key1":  to.Ptr("value1"),
		},
		Input: &armmediaservices.JobInputAsset{
			ODataType: to.Ptr("#Microsoft.Media.JobInputAsset"),
			AssetName: to.Ptr("job1-InputAsset"),
		},
		Outputs: []armmediaservices.JobOutputClassification{
			&armmediaservices.JobOutputAsset{
				ODataType: to.Ptr("#Microsoft.Media.JobOutputAsset"),
				AssetName: to.Ptr("job1-OutputAsset"),
			}},
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*JobsClient) Delete

func (client *JobsClient) Delete(ctx context.Context, resourceGroupName string, accountName string, transformName string, jobName string, options *JobsClientDeleteOptions) (JobsClientDeleteResponse, error)

Delete - Deletes a Job. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-07-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • transformName - The Transform name.
  • jobName - The Job name.
  • options - JobsClientDeleteOptions contains the optional parameters for the JobsClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Encoding/stable/2022-07-01/examples/jobs-delete.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewJobsClient().Delete(ctx, "contosoresources", "contosomedia", "exampleTransform", "jobToDelete", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*JobsClient) Get

func (client *JobsClient) Get(ctx context.Context, resourceGroupName string, accountName string, transformName string, jobName string, options *JobsClientGetOptions) (JobsClientGetResponse, error)

Get - Gets a Job. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-07-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • transformName - The Transform name.
  • jobName - The Job name.
  • options - JobsClientGetOptions contains the optional parameters for the JobsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Encoding/stable/2022-07-01/examples/jobs-get-by-name.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewJobsClient().Get(ctx, "contosoresources", "contosomedia", "exampleTransform", "job1", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.Job = armmediaservices.Job{
// 	Name: to.Ptr("job1"),
// 	Type: to.Ptr("Microsoft.Media/mediaservices/transforms/jobs"),
// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosoresources/providers/Microsoft.Media/mediaservices/contosomedia/transforms/exampleTransform/jobs/job1"),
// 	Properties: &armmediaservices.JobProperties{
// 		CorrelationData: map[string]*string{
// 		},
// 		Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-01T00:00:00.000Z"); return t}()),
// 		Input: &armmediaservices.JobInputs{
// 			ODataType: to.Ptr("#Microsoft.Media.JobInputs"),
// 			Inputs: []armmediaservices.JobInputClassification{
// 				&armmediaservices.JobInputAsset{
// 					ODataType: to.Ptr("#Microsoft.Media.JobInputAsset"),
// 					Files: []*string{
// 					},
// 					InputDefinitions: []armmediaservices.InputDefinitionClassification{
// 					},
// 					AssetName: to.Ptr("job1-InputAsset"),
// 			}},
// 		},
// 		LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-01T00:00:00.000Z"); return t}()),
// 		Outputs: []armmediaservices.JobOutputClassification{
// 			&armmediaservices.JobOutputAsset{
// 				ODataType: to.Ptr("#Microsoft.Media.JobOutputAsset"),
// 				Label: to.Ptr("example-custom-label"),
// 				Progress: to.Ptr[int32](0),
// 				State: to.Ptr(armmediaservices.JobStateQueued),
// 				AssetName: to.Ptr("job1-OutputAsset"),
// 		}},
// 		Priority: to.Ptr(armmediaservices.PriorityLow),
// 		State: to.Ptr(armmediaservices.JobStateQueued),
// 	},
// 	SystemData: &armmediaservices.SystemData{
// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-01T00:00:00.000Z"); return t}()),
// 		CreatedBy: to.Ptr("contoso@microsoft.com"),
// 		CreatedByType: to.Ptr(armmediaservices.CreatedByTypeUser),
// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-01T00:00:00.000Z"); return t}()),
// 		LastModifiedBy: to.Ptr("contoso@microsoft.com"),
// 		LastModifiedByType: to.Ptr(armmediaservices.CreatedByTypeUser),
// 	},
// }
Output:

func (*JobsClient) NewListPager

func (client *JobsClient) NewListPager(resourceGroupName string, accountName string, transformName string, options *JobsClientListOptions) *runtime.Pager[JobsClientListResponse]

NewListPager - Lists all of the Jobs for the Transform.

Generated from API version 2022-07-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • transformName - The Transform name.
  • options - JobsClientListOptions contains the optional parameters for the JobsClient.NewListPager method.
Example (ListsAllOfTheJobsForTheTransform)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Encoding/stable/2022-07-01/examples/jobs-list-all.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewJobsClient().NewListPager("contosoresources", "contosomedia", "exampleTransform", &armmediaservices.JobsClientListOptions{Filter: nil,
	Orderby: nil,
})
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.JobCollection = armmediaservices.JobCollection{
	// 	Value: []*armmediaservices.Job{
	// 		{
	// 			Name: to.Ptr("job1"),
	// 			Type: to.Ptr("Microsoft.Media/mediaservices/transforms/jobs"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosoresources/providers/Microsoft.Media/mediaservices/contosomedia/transforms/exampleTransform/jobs/job1"),
	// 			Properties: &armmediaservices.JobProperties{
	// 				CorrelationData: map[string]*string{
	// 				},
	// 				Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-01T00:00:00.000Z"); return t}()),
	// 				Input: &armmediaservices.JobInputs{
	// 					ODataType: to.Ptr("#Microsoft.Media.JobInputs"),
	// 					Inputs: []armmediaservices.JobInputClassification{
	// 						&armmediaservices.JobInputAsset{
	// 							ODataType: to.Ptr("#Microsoft.Media.JobInputAsset"),
	// 							Files: []*string{
	// 							},
	// 							InputDefinitions: []armmediaservices.InputDefinitionClassification{
	// 							},
	// 							AssetName: to.Ptr("job1-InputAsset"),
	// 					}},
	// 				},
	// 				LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-01T00:00:00.000Z"); return t}()),
	// 				Outputs: []armmediaservices.JobOutputClassification{
	// 					&armmediaservices.JobOutputAsset{
	// 						ODataType: to.Ptr("#Microsoft.Media.JobOutputAsset"),
	// 						Label: to.Ptr("example-custom-label"),
	// 						Progress: to.Ptr[int32](0),
	// 						State: to.Ptr(armmediaservices.JobStateQueued),
	// 						AssetName: to.Ptr("job1-OutputAsset"),
	// 				}},
	// 				Priority: to.Ptr(armmediaservices.PriorityLow),
	// 				State: to.Ptr(armmediaservices.JobStateQueued),
	// 			},
	// 			SystemData: &armmediaservices.SystemData{
	// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-01T00:00:00.000Z"); return t}()),
	// 				CreatedBy: to.Ptr("contoso@microsoft.com"),
	// 				CreatedByType: to.Ptr(armmediaservices.CreatedByTypeUser),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-01T00:00:00.000Z"); return t}()),
	// 				LastModifiedBy: to.Ptr("contoso@microsoft.com"),
	// 				LastModifiedByType: to.Ptr(armmediaservices.CreatedByTypeUser),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("job2"),
	// 			Type: to.Ptr("Microsoft.Media/mediaservices/transforms/jobs"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosoresources/providers/Microsoft.Media/mediaservices/contosomedia/transforms/exampleTransform/jobs/job2"),
	// 			Properties: &armmediaservices.JobProperties{
	// 				CorrelationData: map[string]*string{
	// 				},
	// 				Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-01T00:00:00.000Z"); return t}()),
	// 				Input: &armmediaservices.JobInputs{
	// 					ODataType: to.Ptr("#Microsoft.Media.JobInputs"),
	// 					Inputs: []armmediaservices.JobInputClassification{
	// 						&armmediaservices.JobInputAsset{
	// 							ODataType: to.Ptr("#Microsoft.Media.JobInputAsset"),
	// 							Files: []*string{
	// 							},
	// 							InputDefinitions: []armmediaservices.InputDefinitionClassification{
	// 							},
	// 							AssetName: to.Ptr("job2-InputAsset"),
	// 					}},
	// 				},
	// 				LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-01T00:00:00.000Z"); return t}()),
	// 				Outputs: []armmediaservices.JobOutputClassification{
	// 					&armmediaservices.JobOutputAsset{
	// 						ODataType: to.Ptr("#Microsoft.Media.JobOutputAsset"),
	// 						Label: to.Ptr("example-custom-label"),
	// 						Progress: to.Ptr[int32](50),
	// 						StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-17T23:04:32.246Z"); return t}()),
	// 						State: to.Ptr(armmediaservices.JobStateProcessing),
	// 						AssetName: to.Ptr("job2-OutputAsset"),
	// 				}},
	// 				Priority: to.Ptr(armmediaservices.PriorityLow),
	// 				StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-17T23:04:32.246Z"); return t}()),
	// 				State: to.Ptr(armmediaservices.JobStateProcessing),
	// 			},
	// 			SystemData: &armmediaservices.SystemData{
	// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-01T00:00:00.000Z"); return t}()),
	// 				CreatedBy: to.Ptr("contoso@microsoft.com"),
	// 				CreatedByType: to.Ptr(armmediaservices.CreatedByTypeUser),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-01T00:00:00.000Z"); return t}()),
	// 				LastModifiedBy: to.Ptr("contoso@microsoft.com"),
	// 				LastModifiedByType: to.Ptr(armmediaservices.CreatedByTypeUser),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("job3"),
	// 			Type: to.Ptr("Microsoft.Media/mediaservices/transforms/jobs"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosoresources/providers/Microsoft.Media/mediaservices/contosomedia/transforms/exampleTransform/jobs/job3"),
	// 			Properties: &armmediaservices.JobProperties{
	// 				CorrelationData: map[string]*string{
	// 				},
	// 				Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-01T00:00:00.000Z"); return t}()),
	// 				EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-17T23:14:32.246Z"); return t}()),
	// 				Input: &armmediaservices.JobInputs{
	// 					ODataType: to.Ptr("#Microsoft.Media.JobInputs"),
	// 					Inputs: []armmediaservices.JobInputClassification{
	// 						&armmediaservices.JobInputAsset{
	// 							ODataType: to.Ptr("#Microsoft.Media.JobInputAsset"),
	// 							Files: []*string{
	// 							},
	// 							InputDefinitions: []armmediaservices.InputDefinitionClassification{
	// 							},
	// 							AssetName: to.Ptr("job3-InputAsset"),
	// 					}},
	// 				},
	// 				LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-01T00:00:00.000Z"); return t}()),
	// 				Outputs: []armmediaservices.JobOutputClassification{
	// 					&armmediaservices.JobOutputAsset{
	// 						ODataType: to.Ptr("#Microsoft.Media.JobOutputAsset"),
	// 						EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-17T23:14:32.246Z"); return t}()),
	// 						Label: to.Ptr("example-custom-label"),
	// 						Progress: to.Ptr[int32](100),
	// 						StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-17T23:04:32.246Z"); return t}()),
	// 						State: to.Ptr(armmediaservices.JobStateFinished),
	// 						AssetName: to.Ptr("job3-OutputAsset"),
	// 				}},
	// 				Priority: to.Ptr(armmediaservices.PriorityLow),
	// 				StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-17T23:04:32.246Z"); return t}()),
	// 				State: to.Ptr(armmediaservices.JobStateFinished),
	// 			},
	// 			SystemData: &armmediaservices.SystemData{
	// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-01T00:00:00.000Z"); return t}()),
	// 				CreatedBy: to.Ptr("contoso@microsoft.com"),
	// 				CreatedByType: to.Ptr(armmediaservices.CreatedByTypeUser),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-01T00:00:00.000Z"); return t}()),
	// 				LastModifiedBy: to.Ptr("contoso@microsoft.com"),
	// 				LastModifiedByType: to.Ptr(armmediaservices.CreatedByTypeUser),
	// 			},
	// 	}},
	// }
}
Output:

Example (ListsJobsForTheTransformFilterByCreated)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Encoding/stable/2022-07-01/examples/jobs-list-all-filter-by-created.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewJobsClient().NewListPager("contosoresources", "contosomedia", "exampleTransform", &armmediaservices.JobsClientListOptions{Filter: to.Ptr("properties/created ge 2021-06-01T00:00:10.0000000Z and properties/created le 2021-06-01T00:00:20.0000000Z"),
	Orderby: to.Ptr("properties/created"),
})
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.JobCollection = armmediaservices.JobCollection{
	// 	Value: []*armmediaservices.Job{
	// 		{
	// 			Name: to.Ptr("job2"),
	// 			Type: to.Ptr("Microsoft.Media/mediaservices/transforms/jobs"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosoresources/providers/Microsoft.Media/mediaservices/contosomedia/transforms/exampleTransform/jobs/job2"),
	// 			Properties: &armmediaservices.JobProperties{
	// 				CorrelationData: map[string]*string{
	// 				},
	// 				Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-01T00:00:10.000Z"); return t}()),
	// 				Input: &armmediaservices.JobInputs{
	// 					ODataType: to.Ptr("#Microsoft.Media.JobInputs"),
	// 					Inputs: []armmediaservices.JobInputClassification{
	// 						&armmediaservices.JobInputAsset{
	// 							ODataType: to.Ptr("#Microsoft.Media.JobInputAsset"),
	// 							Files: []*string{
	// 							},
	// 							InputDefinitions: []armmediaservices.InputDefinitionClassification{
	// 							},
	// 							AssetName: to.Ptr("job2-InputAsset"),
	// 					}},
	// 				},
	// 				LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-01T00:00:10.000Z"); return t}()),
	// 				Outputs: []armmediaservices.JobOutputClassification{
	// 					&armmediaservices.JobOutputAsset{
	// 						ODataType: to.Ptr("#Microsoft.Media.JobOutputAsset"),
	// 						Label: to.Ptr("example-custom-label"),
	// 						Progress: to.Ptr[int32](50),
	// 						StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-17T23:04:33.233Z"); return t}()),
	// 						State: to.Ptr(armmediaservices.JobStateProcessing),
	// 						AssetName: to.Ptr("job2-OutputAsset"),
	// 				}},
	// 				Priority: to.Ptr(armmediaservices.PriorityLow),
	// 				StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-17T23:04:33.233Z"); return t}()),
	// 				State: to.Ptr(armmediaservices.JobStateProcessing),
	// 			},
	// 			SystemData: &armmediaservices.SystemData{
	// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-01T00:00:10.000Z"); return t}()),
	// 				CreatedBy: to.Ptr("contoso@microsoft.com"),
	// 				CreatedByType: to.Ptr(armmediaservices.CreatedByTypeUser),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-01T00:00:10.000Z"); return t}()),
	// 				LastModifiedBy: to.Ptr("contoso@microsoft.com"),
	// 				LastModifiedByType: to.Ptr(armmediaservices.CreatedByTypeUser),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("job3"),
	// 			Type: to.Ptr("Microsoft.Media/mediaservices/transforms/jobs"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosoresources/providers/Microsoft.Media/mediaservices/contosomedia/transforms/exampleTransform/jobs/job3"),
	// 			Properties: &armmediaservices.JobProperties{
	// 				CorrelationData: map[string]*string{
	// 				},
	// 				Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-01T00:00:20.000Z"); return t}()),
	// 				EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-17T23:14:33.233Z"); return t}()),
	// 				Input: &armmediaservices.JobInputs{
	// 					ODataType: to.Ptr("#Microsoft.Media.JobInputs"),
	// 					Inputs: []armmediaservices.JobInputClassification{
	// 						&armmediaservices.JobInputAsset{
	// 							ODataType: to.Ptr("#Microsoft.Media.JobInputAsset"),
	// 							Files: []*string{
	// 							},
	// 							InputDefinitions: []armmediaservices.InputDefinitionClassification{
	// 							},
	// 							AssetName: to.Ptr("job3-InputAsset"),
	// 					}},
	// 				},
	// 				LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-01T00:00:20.000Z"); return t}()),
	// 				Outputs: []armmediaservices.JobOutputClassification{
	// 					&armmediaservices.JobOutputAsset{
	// 						ODataType: to.Ptr("#Microsoft.Media.JobOutputAsset"),
	// 						EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-17T23:14:33.233Z"); return t}()),
	// 						Label: to.Ptr("example-custom-label"),
	// 						Progress: to.Ptr[int32](100),
	// 						StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-17T23:04:33.233Z"); return t}()),
	// 						State: to.Ptr(armmediaservices.JobStateFinished),
	// 						AssetName: to.Ptr("job3-OutputAsset"),
	// 				}},
	// 				Priority: to.Ptr(armmediaservices.PriorityLow),
	// 				StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-17T23:04:33.233Z"); return t}()),
	// 				State: to.Ptr(armmediaservices.JobStateFinished),
	// 			},
	// 			SystemData: &armmediaservices.SystemData{
	// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-01T00:00:20.000Z"); return t}()),
	// 				CreatedBy: to.Ptr("contoso@microsoft.com"),
	// 				CreatedByType: to.Ptr(armmediaservices.CreatedByTypeUser),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-01T00:00:20.000Z"); return t}()),
	// 				LastModifiedBy: to.Ptr("contoso@microsoft.com"),
	// 				LastModifiedByType: to.Ptr(armmediaservices.CreatedByTypeUser),
	// 			},
	// 	}},
	// }
}
Output:

Example (ListsJobsForTheTransformFilterByLastmodified)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Encoding/stable/2022-07-01/examples/jobs-list-all-filter-by-lastmodified.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewJobsClient().NewListPager("contosoresources", "contosomedia", "exampleTransform", &armmediaservices.JobsClientListOptions{Filter: to.Ptr("properties/lastmodified ge 2021-06-01T00:00:10.0000000Z and properties/lastmodified le 2021-06-01T00:00:20.0000000Z"),
	Orderby: to.Ptr("properties/lastmodified desc"),
})
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.JobCollection = armmediaservices.JobCollection{
	// 	Value: []*armmediaservices.Job{
	// 		{
	// 			Name: to.Ptr("job3"),
	// 			Type: to.Ptr("Microsoft.Media/mediaservices/transforms/jobs"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosoresources/providers/Microsoft.Media/mediaservices/contosomedia/transforms/exampleTransform/jobs/job3"),
	// 			Properties: &armmediaservices.JobProperties{
	// 				CorrelationData: map[string]*string{
	// 				},
	// 				Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-01T00:00:20.000Z"); return t}()),
	// 				EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-17T23:14:33.362Z"); return t}()),
	// 				Input: &armmediaservices.JobInputs{
	// 					ODataType: to.Ptr("#Microsoft.Media.JobInputs"),
	// 					Inputs: []armmediaservices.JobInputClassification{
	// 						&armmediaservices.JobInputAsset{
	// 							ODataType: to.Ptr("#Microsoft.Media.JobInputAsset"),
	// 							Files: []*string{
	// 							},
	// 							InputDefinitions: []armmediaservices.InputDefinitionClassification{
	// 							},
	// 							AssetName: to.Ptr("job3-InputAsset"),
	// 					}},
	// 				},
	// 				LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-01T00:00:20.000Z"); return t}()),
	// 				Outputs: []armmediaservices.JobOutputClassification{
	// 					&armmediaservices.JobOutputAsset{
	// 						ODataType: to.Ptr("#Microsoft.Media.JobOutputAsset"),
	// 						EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-17T23:14:33.362Z"); return t}()),
	// 						Label: to.Ptr("example-custom-label"),
	// 						Progress: to.Ptr[int32](100),
	// 						StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-17T23:04:33.362Z"); return t}()),
	// 						State: to.Ptr(armmediaservices.JobStateFinished),
	// 						AssetName: to.Ptr("job3-OutputAsset"),
	// 				}},
	// 				Priority: to.Ptr(armmediaservices.PriorityLow),
	// 				StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-17T23:04:33.362Z"); return t}()),
	// 				State: to.Ptr(armmediaservices.JobStateFinished),
	// 			},
	// 			SystemData: &armmediaservices.SystemData{
	// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-01T00:00:20.000Z"); return t}()),
	// 				CreatedBy: to.Ptr("contoso@microsoft.com"),
	// 				CreatedByType: to.Ptr(armmediaservices.CreatedByTypeUser),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-01T00:00:20.000Z"); return t}()),
	// 				LastModifiedBy: to.Ptr("contoso@microsoft.com"),
	// 				LastModifiedByType: to.Ptr(armmediaservices.CreatedByTypeUser),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("job2"),
	// 			Type: to.Ptr("Microsoft.Media/mediaservices/transforms/jobs"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosoresources/providers/Microsoft.Media/mediaservices/contosomedia/transforms/exampleTransform/jobs/job2"),
	// 			Properties: &armmediaservices.JobProperties{
	// 				CorrelationData: map[string]*string{
	// 				},
	// 				Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-01T00:00:10.000Z"); return t}()),
	// 				Input: &armmediaservices.JobInputs{
	// 					ODataType: to.Ptr("#Microsoft.Media.JobInputs"),
	// 					Inputs: []armmediaservices.JobInputClassification{
	// 						&armmediaservices.JobInputAsset{
	// 							ODataType: to.Ptr("#Microsoft.Media.JobInputAsset"),
	// 							Files: []*string{
	// 							},
	// 							InputDefinitions: []armmediaservices.InputDefinitionClassification{
	// 							},
	// 							AssetName: to.Ptr("job2-InputAsset"),
	// 					}},
	// 				},
	// 				LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-01T00:00:10.000Z"); return t}()),
	// 				Outputs: []armmediaservices.JobOutputClassification{
	// 					&armmediaservices.JobOutputAsset{
	// 						ODataType: to.Ptr("#Microsoft.Media.JobOutputAsset"),
	// 						Label: to.Ptr("example-custom-label"),
	// 						Progress: to.Ptr[int32](50),
	// 						StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-17T23:04:33.362Z"); return t}()),
	// 						State: to.Ptr(armmediaservices.JobStateProcessing),
	// 						AssetName: to.Ptr("job2-OutputAsset"),
	// 				}},
	// 				Priority: to.Ptr(armmediaservices.PriorityLow),
	// 				StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-17T23:04:33.362Z"); return t}()),
	// 				State: to.Ptr(armmediaservices.JobStateProcessing),
	// 			},
	// 			SystemData: &armmediaservices.SystemData{
	// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-01T00:00:10.000Z"); return t}()),
	// 				CreatedBy: to.Ptr("contoso@microsoft.com"),
	// 				CreatedByType: to.Ptr(armmediaservices.CreatedByTypeUser),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-01T00:00:10.000Z"); return t}()),
	// 				LastModifiedBy: to.Ptr("contoso@microsoft.com"),
	// 				LastModifiedByType: to.Ptr(armmediaservices.CreatedByTypeUser),
	// 			},
	// 	}},
	// }
}
Output:

Example (ListsJobsForTheTransformFilterByName)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Encoding/stable/2022-07-01/examples/jobs-list-all-filter-by-name.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewJobsClient().NewListPager("contosoresources", "contosomedia", "exampleTransform", &armmediaservices.JobsClientListOptions{Filter: to.Ptr("name eq 'job1' or name eq 'job2'"),
	Orderby: to.Ptr("name"),
})
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.JobCollection = armmediaservices.JobCollection{
	// 	Value: []*armmediaservices.Job{
	// 		{
	// 			Name: to.Ptr("job1"),
	// 			Type: to.Ptr("Microsoft.Media/mediaservices/transforms/jobs"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosoresources/providers/Microsoft.Media/mediaservices/contosomedia/transforms/exampleTransform/jobs/job1"),
	// 			Properties: &armmediaservices.JobProperties{
	// 				CorrelationData: map[string]*string{
	// 				},
	// 				Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-01T00:00:00.000Z"); return t}()),
	// 				Input: &armmediaservices.JobInputs{
	// 					ODataType: to.Ptr("#Microsoft.Media.JobInputs"),
	// 					Inputs: []armmediaservices.JobInputClassification{
	// 						&armmediaservices.JobInputAsset{
	// 							ODataType: to.Ptr("#Microsoft.Media.JobInputAsset"),
	// 							Files: []*string{
	// 							},
	// 							InputDefinitions: []armmediaservices.InputDefinitionClassification{
	// 							},
	// 							AssetName: to.Ptr("job1-InputAsset"),
	// 					}},
	// 				},
	// 				LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-01T00:00:00.000Z"); return t}()),
	// 				Outputs: []armmediaservices.JobOutputClassification{
	// 					&armmediaservices.JobOutputAsset{
	// 						ODataType: to.Ptr("#Microsoft.Media.JobOutputAsset"),
	// 						Label: to.Ptr("example-custom-label"),
	// 						Progress: to.Ptr[int32](0),
	// 						State: to.Ptr(armmediaservices.JobStateQueued),
	// 						AssetName: to.Ptr("job1-OutputAsset"),
	// 				}},
	// 				Priority: to.Ptr(armmediaservices.PriorityLow),
	// 				State: to.Ptr(armmediaservices.JobStateQueued),
	// 			},
	// 			SystemData: &armmediaservices.SystemData{
	// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-01T00:00:00.000Z"); return t}()),
	// 				CreatedBy: to.Ptr("contoso@microsoft.com"),
	// 				CreatedByType: to.Ptr(armmediaservices.CreatedByTypeUser),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-01T00:00:00.000Z"); return t}()),
	// 				LastModifiedBy: to.Ptr("contoso@microsoft.com"),
	// 				LastModifiedByType: to.Ptr(armmediaservices.CreatedByTypeUser),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("job2"),
	// 			Type: to.Ptr("Microsoft.Media/mediaservices/transforms/jobs"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosoresources/providers/Microsoft.Media/mediaservices/contosomedia/transforms/exampleTransform/jobs/job2"),
	// 			Properties: &armmediaservices.JobProperties{
	// 				CorrelationData: map[string]*string{
	// 				},
	// 				Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-01T00:00:00.000Z"); return t}()),
	// 				Input: &armmediaservices.JobInputs{
	// 					ODataType: to.Ptr("#Microsoft.Media.JobInputs"),
	// 					Inputs: []armmediaservices.JobInputClassification{
	// 						&armmediaservices.JobInputAsset{
	// 							ODataType: to.Ptr("#Microsoft.Media.JobInputAsset"),
	// 							Files: []*string{
	// 							},
	// 							InputDefinitions: []armmediaservices.InputDefinitionClassification{
	// 							},
	// 							AssetName: to.Ptr("job2-InputAsset"),
	// 					}},
	// 				},
	// 				LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-01T00:00:00.000Z"); return t}()),
	// 				Outputs: []armmediaservices.JobOutputClassification{
	// 					&armmediaservices.JobOutputAsset{
	// 						ODataType: to.Ptr("#Microsoft.Media.JobOutputAsset"),
	// 						Label: to.Ptr("example-custom-label"),
	// 						Progress: to.Ptr[int32](50),
	// 						StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-17T23:04:32.689Z"); return t}()),
	// 						State: to.Ptr(armmediaservices.JobStateProcessing),
	// 						AssetName: to.Ptr("job2-OutputAsset"),
	// 				}},
	// 				Priority: to.Ptr(armmediaservices.PriorityLow),
	// 				StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-17T23:04:32.689Z"); return t}()),
	// 				State: to.Ptr(armmediaservices.JobStateProcessing),
	// 			},
	// 			SystemData: &armmediaservices.SystemData{
	// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-01T00:00:00.000Z"); return t}()),
	// 				CreatedBy: to.Ptr("contoso@microsoft.com"),
	// 				CreatedByType: to.Ptr(armmediaservices.CreatedByTypeUser),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-01T00:00:00.000Z"); return t}()),
	// 				LastModifiedBy: to.Ptr("contoso@microsoft.com"),
	// 				LastModifiedByType: to.Ptr(armmediaservices.CreatedByTypeUser),
	// 			},
	// 	}},
	// }
}
Output:

Example (ListsJobsForTheTransformFilterByNameAndState)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Encoding/stable/2022-07-01/examples/jobs-list-all-filter-by-name-and-state.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewJobsClient().NewListPager("contosoresources", "contosomedia", "exampleTransform", &armmediaservices.JobsClientListOptions{Filter: to.Ptr("name eq 'job3' and properties/state eq Microsoft.Media.JobState'finished'"),
	Orderby: nil,
})
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.JobCollection = armmediaservices.JobCollection{
	// 	Value: []*armmediaservices.Job{
	// 		{
	// 			Name: to.Ptr("job3"),
	// 			Type: to.Ptr("Microsoft.Media/mediaservices/transforms/jobs"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosoresources/providers/Microsoft.Media/mediaservices/contosomedia/transforms/exampleTransform/jobs/job3"),
	// 			Properties: &armmediaservices.JobProperties{
	// 				CorrelationData: map[string]*string{
	// 				},
	// 				Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-01T00:00:00.000Z"); return t}()),
	// 				EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-17T23:14:33.110Z"); return t}()),
	// 				Input: &armmediaservices.JobInputs{
	// 					ODataType: to.Ptr("#Microsoft.Media.JobInputs"),
	// 					Inputs: []armmediaservices.JobInputClassification{
	// 						&armmediaservices.JobInputAsset{
	// 							ODataType: to.Ptr("#Microsoft.Media.JobInputAsset"),
	// 							Files: []*string{
	// 							},
	// 							InputDefinitions: []armmediaservices.InputDefinitionClassification{
	// 							},
	// 							AssetName: to.Ptr("job3-InputAsset"),
	// 					}},
	// 				},
	// 				LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-01T00:00:00.000Z"); return t}()),
	// 				Outputs: []armmediaservices.JobOutputClassification{
	// 					&armmediaservices.JobOutputAsset{
	// 						ODataType: to.Ptr("#Microsoft.Media.JobOutputAsset"),
	// 						EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-17T23:14:33.110Z"); return t}()),
	// 						Label: to.Ptr("example-custom-label"),
	// 						Progress: to.Ptr[int32](100),
	// 						StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-17T23:04:33.110Z"); return t}()),
	// 						State: to.Ptr(armmediaservices.JobStateFinished),
	// 						AssetName: to.Ptr("job3-OutputAsset"),
	// 				}},
	// 				Priority: to.Ptr(armmediaservices.PriorityLow),
	// 				StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-17T23:04:33.110Z"); return t}()),
	// 				State: to.Ptr(armmediaservices.JobStateFinished),
	// 			},
	// 			SystemData: &armmediaservices.SystemData{
	// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-01T00:00:00.000Z"); return t}()),
	// 				CreatedBy: to.Ptr("contoso@microsoft.com"),
	// 				CreatedByType: to.Ptr(armmediaservices.CreatedByTypeUser),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-01T00:00:00.000Z"); return t}()),
	// 				LastModifiedBy: to.Ptr("contoso@microsoft.com"),
	// 				LastModifiedByType: to.Ptr(armmediaservices.CreatedByTypeUser),
	// 			},
	// 	}},
	// }
}
Output:

Example (ListsJobsForTheTransformFilterByStateEqual)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Encoding/stable/2022-07-01/examples/jobs-list-all-filter-by-state-eq.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewJobsClient().NewListPager("contosoresources", "contosomedia", "exampleTransform", &armmediaservices.JobsClientListOptions{Filter: to.Ptr("properties/state eq Microsoft.Media.JobState'Processing'"),
	Orderby: nil,
})
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.JobCollection = armmediaservices.JobCollection{
	// 	Value: []*armmediaservices.Job{
	// 		{
	// 			Name: to.Ptr("job2"),
	// 			Type: to.Ptr("Microsoft.Media/mediaservices/transforms/jobs"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosoresources/providers/Microsoft.Media/mediaservices/contosomedia/transforms/exampleTransform/jobs/job2"),
	// 			Properties: &armmediaservices.JobProperties{
	// 				CorrelationData: map[string]*string{
	// 				},
	// 				Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-01T00:00:00.000Z"); return t}()),
	// 				Input: &armmediaservices.JobInputs{
	// 					ODataType: to.Ptr("#Microsoft.Media.JobInputs"),
	// 					Inputs: []armmediaservices.JobInputClassification{
	// 						&armmediaservices.JobInputAsset{
	// 							ODataType: to.Ptr("#Microsoft.Media.JobInputAsset"),
	// 							Files: []*string{
	// 							},
	// 							InputDefinitions: []armmediaservices.InputDefinitionClassification{
	// 							},
	// 							AssetName: to.Ptr("job2-InputAsset"),
	// 					}},
	// 				},
	// 				LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-01T00:00:00.000Z"); return t}()),
	// 				Outputs: []armmediaservices.JobOutputClassification{
	// 					&armmediaservices.JobOutputAsset{
	// 						ODataType: to.Ptr("#Microsoft.Media.JobOutputAsset"),
	// 						Label: to.Ptr("example-custom-label"),
	// 						Progress: to.Ptr[int32](50),
	// 						StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-17T23:04:32.828Z"); return t}()),
	// 						State: to.Ptr(armmediaservices.JobStateProcessing),
	// 						AssetName: to.Ptr("job2-OutputAsset"),
	// 				}},
	// 				Priority: to.Ptr(armmediaservices.PriorityLow),
	// 				StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-17T23:04:32.828Z"); return t}()),
	// 				State: to.Ptr(armmediaservices.JobStateProcessing),
	// 			},
	// 			SystemData: &armmediaservices.SystemData{
	// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-01T00:00:00.000Z"); return t}()),
	// 				CreatedBy: to.Ptr("contoso@microsoft.com"),
	// 				CreatedByType: to.Ptr(armmediaservices.CreatedByTypeUser),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-01T00:00:00.000Z"); return t}()),
	// 				LastModifiedBy: to.Ptr("contoso@microsoft.com"),
	// 				LastModifiedByType: to.Ptr(armmediaservices.CreatedByTypeUser),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("job3"),
	// 			Type: to.Ptr("Microsoft.Media/mediaservices/transforms/jobs"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosoresources/providers/Microsoft.Media/mediaservices/contosomedia/transforms/exampleTransform/jobs/job3"),
	// 			Properties: &armmediaservices.JobProperties{
	// 				CorrelationData: map[string]*string{
	// 				},
	// 				Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-01T00:00:00.000Z"); return t}()),
	// 				Input: &armmediaservices.JobInputs{
	// 					ODataType: to.Ptr("#Microsoft.Media.JobInputs"),
	// 					Inputs: []armmediaservices.JobInputClassification{
	// 						&armmediaservices.JobInputAsset{
	// 							ODataType: to.Ptr("#Microsoft.Media.JobInputAsset"),
	// 							Files: []*string{
	// 							},
	// 							InputDefinitions: []armmediaservices.InputDefinitionClassification{
	// 							},
	// 							AssetName: to.Ptr("job3-InputAsset"),
	// 					}},
	// 				},
	// 				LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-01T00:00:00.000Z"); return t}()),
	// 				Outputs: []armmediaservices.JobOutputClassification{
	// 					&armmediaservices.JobOutputAsset{
	// 						ODataType: to.Ptr("#Microsoft.Media.JobOutputAsset"),
	// 						Label: to.Ptr("example-custom-label"),
	// 						Progress: to.Ptr[int32](50),
	// 						StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-17T23:04:32.828Z"); return t}()),
	// 						State: to.Ptr(armmediaservices.JobStateProcessing),
	// 						AssetName: to.Ptr("job3-OutputAsset"),
	// 				}},
	// 				Priority: to.Ptr(armmediaservices.PriorityLow),
	// 				StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-17T23:04:32.828Z"); return t}()),
	// 				State: to.Ptr(armmediaservices.JobStateProcessing),
	// 			},
	// 			SystemData: &armmediaservices.SystemData{
	// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-01T00:00:00.000Z"); return t}()),
	// 				CreatedBy: to.Ptr("contoso@microsoft.com"),
	// 				CreatedByType: to.Ptr(armmediaservices.CreatedByTypeUser),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-01T00:00:00.000Z"); return t}()),
	// 				LastModifiedBy: to.Ptr("contoso@microsoft.com"),
	// 				LastModifiedByType: to.Ptr(armmediaservices.CreatedByTypeUser),
	// 			},
	// 	}},
	// }
}
Output:

Example (ListsJobsForTheTransformFilterByStateNotEqual)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Encoding/stable/2022-07-01/examples/jobs-list-all-filter-by-state-ne.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewJobsClient().NewListPager("contosoresources", "contosomedia", "exampleTransform", &armmediaservices.JobsClientListOptions{Filter: to.Ptr("properties/state ne Microsoft.Media.JobState'processing'"),
	Orderby: nil,
})
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.JobCollection = armmediaservices.JobCollection{
	// 	Value: []*armmediaservices.Job{
	// 		{
	// 			Name: to.Ptr("job1"),
	// 			Type: to.Ptr("Microsoft.Media/mediaservices/transforms/jobs"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosoresources/providers/Microsoft.Media/mediaservices/contosomedia/transforms/exampleTransform/jobs/job1"),
	// 			Properties: &armmediaservices.JobProperties{
	// 				CorrelationData: map[string]*string{
	// 				},
	// 				Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-01T00:00:00.000Z"); return t}()),
	// 				Input: &armmediaservices.JobInputs{
	// 					ODataType: to.Ptr("#Microsoft.Media.JobInputs"),
	// 					Inputs: []armmediaservices.JobInputClassification{
	// 						&armmediaservices.JobInputAsset{
	// 							ODataType: to.Ptr("#Microsoft.Media.JobInputAsset"),
	// 							Files: []*string{
	// 							},
	// 							InputDefinitions: []armmediaservices.InputDefinitionClassification{
	// 							},
	// 							AssetName: to.Ptr("job1-InputAsset"),
	// 					}},
	// 				},
	// 				LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-01T00:00:00.000Z"); return t}()),
	// 				Outputs: []armmediaservices.JobOutputClassification{
	// 					&armmediaservices.JobOutputAsset{
	// 						ODataType: to.Ptr("#Microsoft.Media.JobOutputAsset"),
	// 						Label: to.Ptr("example-custom-label"),
	// 						Progress: to.Ptr[int32](0),
	// 						State: to.Ptr(armmediaservices.JobStateQueued),
	// 						AssetName: to.Ptr("job1-OutputAsset"),
	// 				}},
	// 				Priority: to.Ptr(armmediaservices.PriorityLow),
	// 				State: to.Ptr(armmediaservices.JobStateQueued),
	// 			},
	// 			SystemData: &armmediaservices.SystemData{
	// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-01T00:00:00.000Z"); return t}()),
	// 				CreatedBy: to.Ptr("contoso@microsoft.com"),
	// 				CreatedByType: to.Ptr(armmediaservices.CreatedByTypeUser),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-01T00:00:00.000Z"); return t}()),
	// 				LastModifiedBy: to.Ptr("contoso@microsoft.com"),
	// 				LastModifiedByType: to.Ptr(armmediaservices.CreatedByTypeUser),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("job4"),
	// 			Type: to.Ptr("Microsoft.Media/mediaservices/transforms/jobs"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosoresources/providers/Microsoft.Media/mediaservices/contosomedia/transforms/exampleTransform/jobs/job4"),
	// 			Properties: &armmediaservices.JobProperties{
	// 				CorrelationData: map[string]*string{
	// 				},
	// 				Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-01T00:00:00.000Z"); return t}()),
	// 				EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-17T23:14:33.009Z"); return t}()),
	// 				Input: &armmediaservices.JobInputs{
	// 					ODataType: to.Ptr("#Microsoft.Media.JobInputs"),
	// 					Inputs: []armmediaservices.JobInputClassification{
	// 						&armmediaservices.JobInputAsset{
	// 							ODataType: to.Ptr("#Microsoft.Media.JobInputAsset"),
	// 							Files: []*string{
	// 							},
	// 							InputDefinitions: []armmediaservices.InputDefinitionClassification{
	// 							},
	// 							AssetName: to.Ptr("job4-InputAsset"),
	// 					}},
	// 				},
	// 				LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-01T00:00:00.000Z"); return t}()),
	// 				Outputs: []armmediaservices.JobOutputClassification{
	// 					&armmediaservices.JobOutputAsset{
	// 						ODataType: to.Ptr("#Microsoft.Media.JobOutputAsset"),
	// 						EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-17T23:14:33.009Z"); return t}()),
	// 						Label: to.Ptr("example-custom-label"),
	// 						Progress: to.Ptr[int32](100),
	// 						StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-17T23:04:33.009Z"); return t}()),
	// 						State: to.Ptr(armmediaservices.JobStateFinished),
	// 						AssetName: to.Ptr("job4-OutputAsset"),
	// 				}},
	// 				Priority: to.Ptr(armmediaservices.PriorityLow),
	// 				StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-17T23:04:33.009Z"); return t}()),
	// 				State: to.Ptr(armmediaservices.JobStateFinished),
	// 			},
	// 			SystemData: &armmediaservices.SystemData{
	// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-01T00:00:00.000Z"); return t}()),
	// 				CreatedBy: to.Ptr("contoso@microsoft.com"),
	// 				CreatedByType: to.Ptr(armmediaservices.CreatedByTypeUser),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-01T00:00:00.000Z"); return t}()),
	// 				LastModifiedBy: to.Ptr("contoso@microsoft.com"),
	// 				LastModifiedByType: to.Ptr(armmediaservices.CreatedByTypeUser),
	// 			},
	// 	}},
	// }
}
Output:

func (*JobsClient) Update

func (client *JobsClient) Update(ctx context.Context, resourceGroupName string, accountName string, transformName string, jobName string, parameters Job, options *JobsClientUpdateOptions) (JobsClientUpdateResponse, error)

Update - Update is only supported for description and priority. Updating Priority will take effect when the Job state is Queued or Scheduled and depending on the timing the priority update may be ignored. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-07-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • transformName - The Transform name.
  • jobName - The Job name.
  • parameters - The request parameters
  • options - JobsClientUpdateOptions contains the optional parameters for the JobsClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Encoding/stable/2022-07-01/examples/jobs-update.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewJobsClient().Update(ctx, "contosoresources", "contosomedia", "exampleTransform", "job1", armmediaservices.Job{
	Properties: &armmediaservices.JobProperties{
		Description: to.Ptr("Example job to illustrate update."),
		Input: &armmediaservices.JobInputAsset{
			ODataType: to.Ptr("#Microsoft.Media.JobInputAsset"),
			AssetName: to.Ptr("job1-InputAsset"),
		},
		Outputs: []armmediaservices.JobOutputClassification{
			&armmediaservices.JobOutputAsset{
				ODataType: to.Ptr("#Microsoft.Media.JobOutputAsset"),
				AssetName: to.Ptr("job1-OutputAsset"),
			}},
		Priority: to.Ptr(armmediaservices.PriorityHigh),
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.Job = armmediaservices.Job{
// 	Name: to.Ptr("job1"),
// 	Type: to.Ptr("Microsoft.Media/mediaservices/transforms/jobs"),
// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosoresources/providers/Microsoft.Media/mediaservices/contosomedia/transforms/exampleTransform/jobs/job1"),
// 	Properties: &armmediaservices.JobProperties{
// 		Description: to.Ptr("Example job to illustrate update."),
// 		CorrelationData: map[string]*string{
// 		},
// 		Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-01T00:00:00.000Z"); return t}()),
// 		Input: &armmediaservices.JobInputs{
// 			ODataType: to.Ptr("#Microsoft.Media.JobInputs"),
// 			Inputs: []armmediaservices.JobInputClassification{
// 				&armmediaservices.JobInputAsset{
// 					ODataType: to.Ptr("#Microsoft.Media.JobInputAsset"),
// 					Files: []*string{
// 					},
// 					InputDefinitions: []armmediaservices.InputDefinitionClassification{
// 					},
// 					AssetName: to.Ptr("job1-InputAsset"),
// 			}},
// 		},
// 		LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-17T23:14:33.958Z"); return t}()),
// 		Outputs: []armmediaservices.JobOutputClassification{
// 			&armmediaservices.JobOutputAsset{
// 				ODataType: to.Ptr("#Microsoft.Media.JobOutputAsset"),
// 				Label: to.Ptr("example-custom-label"),
// 				Progress: to.Ptr[int32](0),
// 				State: to.Ptr(armmediaservices.JobStateQueued),
// 				AssetName: to.Ptr("job1-OutputAsset"),
// 		}},
// 		Priority: to.Ptr(armmediaservices.PriorityHigh),
// 		State: to.Ptr(armmediaservices.JobStateQueued),
// 	},
// 	SystemData: &armmediaservices.SystemData{
// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-01T00:00:00.000Z"); return t}()),
// 		CreatedBy: to.Ptr("contoso@microsoft.com"),
// 		CreatedByType: to.Ptr(armmediaservices.CreatedByTypeUser),
// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-17T23:14:33.958Z"); return t}()),
// 		LastModifiedBy: to.Ptr("contoso@microsoft.com"),
// 		LastModifiedByType: to.Ptr(armmediaservices.CreatedByTypeUser),
// 	},
// }
Output:

type JobsClientCancelJobOptions

type JobsClientCancelJobOptions struct {
}

JobsClientCancelJobOptions contains the optional parameters for the JobsClient.CancelJob method.

type JobsClientCancelJobResponse

type JobsClientCancelJobResponse struct {
}

JobsClientCancelJobResponse contains the response from method JobsClient.CancelJob.

type JobsClientCreateOptions

type JobsClientCreateOptions struct {
}

JobsClientCreateOptions contains the optional parameters for the JobsClient.Create method.

type JobsClientCreateResponse

type JobsClientCreateResponse struct {
	// A Job resource type. The progress and state can be obtained by polling a Job or subscribing to events using EventGrid.
	Job
}

JobsClientCreateResponse contains the response from method JobsClient.Create.

type JobsClientDeleteOptions

type JobsClientDeleteOptions struct {
}

JobsClientDeleteOptions contains the optional parameters for the JobsClient.Delete method.

type JobsClientDeleteResponse

type JobsClientDeleteResponse struct {
}

JobsClientDeleteResponse contains the response from method JobsClient.Delete.

type JobsClientGetOptions

type JobsClientGetOptions struct {
}

JobsClientGetOptions contains the optional parameters for the JobsClient.Get method.

type JobsClientGetResponse

type JobsClientGetResponse struct {
	// A Job resource type. The progress and state can be obtained by polling a Job or subscribing to events using EventGrid.
	Job
}

JobsClientGetResponse contains the response from method JobsClient.Get.

type JobsClientListOptions

type JobsClientListOptions struct {
	// Restricts the set of items returned.
	Filter *string

	// Specifies the key by which the result collection should be ordered.
	Orderby *string
}

JobsClientListOptions contains the optional parameters for the JobsClient.NewListPager method.

type JobsClientListResponse

type JobsClientListResponse struct {
	// A collection of Job items.
	JobCollection
}

JobsClientListResponse contains the response from method JobsClient.NewListPager.

type JobsClientUpdateOptions

type JobsClientUpdateOptions struct {
}

JobsClientUpdateOptions contains the optional parameters for the JobsClient.Update method.

type JobsClientUpdateResponse

type JobsClientUpdateResponse struct {
	// A Job resource type. The progress and state can be obtained by polling a Job or subscribing to events using EventGrid.
	Job
}

JobsClientUpdateResponse contains the response from method JobsClient.Update.

type JpgFormat

type JpgFormat struct {
	// REQUIRED; The file naming pattern used for the creation of output files. The following macros are supported in the file
	// name: {Basename} - An expansion macro that will use the name of the input video file. If
	// the base name(the file suffix is not included) of the input video file is less than 32 characters long, the base name of
	// input video files will be used. If the length of base name of the input video
	// file exceeds 32 characters, the base name is truncated to the first 32 characters in total length. {Extension} - The appropriate
	// extension for this format. {Label} - The label assigned to the
	// codec/layer. {Index} - A unique index for thumbnails. Only applicable to thumbnails. {AudioStream} - string "Audio" plus
	// audio stream number(start from 1). {Bitrate} - The audio/video bitrate in kbps.
	// Not applicable to thumbnails. {Codec} - The type of the audio/video codec. {Resolution} - The video resolution. Any unsubstituted
	// macros will be collapsed and removed from the filename.
	FilenamePattern *string

	// REQUIRED; The discriminator for derived types.
	ODataType *string
}

JpgFormat - Describes the settings for producing JPEG thumbnails.

func (*JpgFormat) GetFormat

func (j *JpgFormat) GetFormat() *Format

GetFormat implements the FormatClassification interface for type JpgFormat.

func (*JpgFormat) GetImageFormat

func (j *JpgFormat) GetImageFormat() *ImageFormat

GetImageFormat implements the ImageFormatClassification interface for type JpgFormat.

func (JpgFormat) MarshalJSON

func (j JpgFormat) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type JpgFormat.

func (*JpgFormat) UnmarshalJSON

func (j *JpgFormat) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type JpgFormat.

type JpgImage

type JpgImage struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string

	// REQUIRED; The position in the input video from where to start generating thumbnails. The value can be in ISO 8601 format
	// (For example, PT05S to start at 5 seconds), or a frame count (For example, 10 to start at
	// the 10th frame), or a relative value to stream duration (For example, 10% to start at 10% of stream duration). Also supports
	// a macro {Best}, which tells the encoder to select the best thumbnail from
	// the first few seconds of the video and will only produce one thumbnail, no matter what other settings are for Step and
	// Range. The default value is macro {Best}.
	Start *string

	// The distance between two key frames. The value should be non-zero in the range [0.5, 20] seconds, specified in ISO 8601
	// format. The default is 2 seconds(PT2S). Note that this setting is ignored if
	// VideoSyncMode.Passthrough is set, where the KeyFrameInterval value will follow the input source setting.
	KeyFrameInterval *string

	// An optional label for the codec. The label can be used to control muxing behavior.
	Label *string

	// A collection of output JPEG image layers to be produced by the encoder.
	Layers []*JpgLayer

	// The position relative to transform preset start time in the input video at which to stop generating thumbnails. The value
	// can be in ISO 8601 format (For example, PT5M30S to stop at 5 minutes and 30
	// seconds from start time), or a frame count (For example, 300 to stop at the 300th frame from the frame at start time. If
	// this value is 1, it means only producing one thumbnail at start time), or a
	// relative value to the stream duration (For example, 50% to stop at half of stream duration from start time). The default
	// value is 100%, which means to stop at the end of the stream.
	Range *string

	// Sets the number of columns used in thumbnail sprite image. The number of rows are automatically calculated and a VTT file
	// is generated with the coordinate mappings for each thumbnail in the sprite.
	// Note: this value should be a positive integer and a proper value is recommended so that the output image resolution will
	// not go beyond JPEG maximum pixel resolution limit 65535x65535.
	SpriteColumn *int32

	// The intervals at which thumbnails are generated. The value can be in ISO 8601 format (For example, PT05S for one image
	// every 5 seconds), or a frame count (For example, 30 for one image every 30
	// frames), or a relative value to stream duration (For example, 10% for one image every 10% of stream duration). Note: Step
	// value will affect the first generated thumbnail, which may not be exactly the
	// one specified at transform preset start time. This is due to the encoder, which tries to select the best thumbnail between
	// start time and Step position from start time as the first output. As the
	// default value is 10%, it means if stream has long duration, the first generated thumbnail might be far away from the one
	// specified at start time. Try to select reasonable value for Step if the first
	// thumbnail is expected close to start time, or set Range value at 1 if only one thumbnail is needed at start time.
	Step *string

	// The resizing mode - how the input video will be resized to fit the desired output resolution(s). Default is AutoSize
	StretchMode *StretchMode

	// The Video Sync Mode
	SyncMode *VideoSyncMode
}

JpgImage - Describes the properties for producing a series of JPEG images from the input video.

func (*JpgImage) GetCodec

func (j *JpgImage) GetCodec() *Codec

GetCodec implements the CodecClassification interface for type JpgImage.

func (*JpgImage) GetImage

func (j *JpgImage) GetImage() *Image

GetImage implements the ImageClassification interface for type JpgImage.

func (*JpgImage) GetVideo

func (j *JpgImage) GetVideo() *Video

GetVideo implements the VideoClassification interface for type JpgImage.

func (JpgImage) MarshalJSON

func (j JpgImage) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type JpgImage.

func (*JpgImage) UnmarshalJSON

func (j *JpgImage) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type JpgImage.

type JpgLayer

type JpgLayer struct {
	// The height of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example
	// 50% means the output video has half as many pixels in height as the input.
	Height *string

	// The alphanumeric label for this layer, which can be used in multiplexing different video and audio layers, or in naming
	// the output file.
	Label *string

	// The compression quality of the JPEG output. Range is from 0-100 and the default is 70.
	Quality *int32

	// The width of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example
	// 50% means the output video has half as many pixels in width as the input.
	Width *string
}

JpgLayer - Describes the settings to produce a JPEG image from the input video.

func (JpgLayer) MarshalJSON

func (j JpgLayer) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type JpgLayer.

func (*JpgLayer) UnmarshalJSON

func (j *JpgLayer) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type JpgLayer.

type KeyDelivery

type KeyDelivery struct {
	// The access control properties for Key Delivery.
	AccessControl *AccessControl
}

func (KeyDelivery) MarshalJSON

func (k KeyDelivery) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type KeyDelivery.

func (*KeyDelivery) UnmarshalJSON

func (k *KeyDelivery) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type KeyDelivery.

type KeyVaultProperties

type KeyVaultProperties struct {
	// The URL of the Key Vault key used to encrypt the account. The key may either be versioned (for example https://vault/keys/mykey/version1)
	// or reference a key without a version (for example
	// https://vault/keys/mykey).
	KeyIdentifier *string

	// READ-ONLY; The current key used to encrypt the Media Services account, including the key version.
	CurrentKeyIdentifier *string
}

func (KeyVaultProperties) MarshalJSON

func (k KeyVaultProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type KeyVaultProperties.

func (*KeyVaultProperties) UnmarshalJSON

func (k *KeyVaultProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type KeyVaultProperties.

type Layer

type Layer struct {
	// The height of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example
	// 50% means the output video has half as many pixels in height as the input.
	Height *string

	// The alphanumeric label for this layer, which can be used in multiplexing different video and audio layers, or in naming
	// the output file.
	Label *string

	// The width of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example
	// 50% means the output video has half as many pixels in width as the input.
	Width *string
}

Layer - The encoder can be configured to produce video and/or images (thumbnails) at different resolutions, by specifying a layer for each desired resolution. A layer represents the properties for the video or image at a resolution.

func (Layer) MarshalJSON

func (l Layer) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Layer.

func (*Layer) UnmarshalJSON

func (l *Layer) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Layer.

type ListContainerSasInput

type ListContainerSasInput struct {
	// The SAS URL expiration time. This must be less than 24 hours from the current time.
	ExpiryTime *time.Time

	// The permissions to set on the SAS URL.
	Permissions *AssetContainerPermission
}

ListContainerSasInput - The parameters to the list SAS request.

func (ListContainerSasInput) MarshalJSON

func (l ListContainerSasInput) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ListContainerSasInput.

func (*ListContainerSasInput) UnmarshalJSON

func (l *ListContainerSasInput) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ListContainerSasInput.

type ListContentKeysResponse

type ListContentKeysResponse struct {
	// ContentKeys used by current Streaming Locator
	ContentKeys []*StreamingLocatorContentKey
}

ListContentKeysResponse - Class of response for listContentKeys action

func (ListContentKeysResponse) MarshalJSON

func (l ListContentKeysResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ListContentKeysResponse.

func (*ListContentKeysResponse) UnmarshalJSON

func (l *ListContentKeysResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ListContentKeysResponse.

type ListEdgePoliciesInput

type ListEdgePoliciesInput struct {
	// Unique identifier of the edge device.
	DeviceID *string
}

func (ListEdgePoliciesInput) MarshalJSON

func (l ListEdgePoliciesInput) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ListEdgePoliciesInput.

func (*ListEdgePoliciesInput) UnmarshalJSON

func (l *ListEdgePoliciesInput) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ListEdgePoliciesInput.

type ListPathsResponse

type ListPathsResponse struct {
	// Download Paths supported by current Streaming Locator
	DownloadPaths []*string

	// Streaming Paths supported by current Streaming Locator
	StreamingPaths []*StreamingPath
}

ListPathsResponse - Class of response for listPaths action

func (ListPathsResponse) MarshalJSON

func (l ListPathsResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ListPathsResponse.

func (*ListPathsResponse) UnmarshalJSON

func (l *ListPathsResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ListPathsResponse.

type ListStreamingLocatorsResponse

type ListStreamingLocatorsResponse struct {
	// READ-ONLY; The list of Streaming Locators.
	StreamingLocators []*AssetStreamingLocator
}

ListStreamingLocatorsResponse - The Streaming Locators associated with this Asset.

func (ListStreamingLocatorsResponse) MarshalJSON

func (l ListStreamingLocatorsResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ListStreamingLocatorsResponse.

func (*ListStreamingLocatorsResponse) UnmarshalJSON

func (l *ListStreamingLocatorsResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ListStreamingLocatorsResponse.

type LiveEvent

type LiveEvent struct {
	// REQUIRED; The geo-location where the resource lives
	Location *string

	// The live event properties.
	Properties *LiveEventProperties

	// Resource tags.
	Tags map[string]*string

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; The system metadata relating to this resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

LiveEvent - The live event.

func (LiveEvent) MarshalJSON

func (l LiveEvent) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type LiveEvent.

func (*LiveEvent) UnmarshalJSON

func (l *LiveEvent) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type LiveEvent.

type LiveEventActionInput

type LiveEventActionInput struct {
	// The flag indicates whether live outputs are automatically deleted when live event is being stopped. Deleting live outputs
	// do not delete the underlying assets.
	RemoveOutputsOnStop *bool
}

LiveEventActionInput - The LiveEvent action input parameter definition.

func (LiveEventActionInput) MarshalJSON

func (l LiveEventActionInput) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type LiveEventActionInput.

func (*LiveEventActionInput) UnmarshalJSON

func (l *LiveEventActionInput) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type LiveEventActionInput.

type LiveEventEncoding

type LiveEventEncoding struct {
	// Live event type. When encodingType is set to PassthroughBasic or PassthroughStandard, the service simply passes through
	// the incoming video and audio layer(s) to the output. When encodingType is set to
	// Standard or Premium1080p, a live encoder transcodes the incoming stream into multiple bitrates or layers. See https://go.microsoft.com/fwlink/?linkid=2095101
	// for more information. This property cannot
	// be modified after the live event is created.
	EncodingType *LiveEventEncodingType

	// Use an ISO 8601 time value between 0.5 to 20 seconds to specify the output fragment length for the video and audio tracks
	// of an encoding live event. For example, use PT2S to indicate 2 seconds. For
	// the video track it also defines the key frame interval, or the length of a GoP (group of pictures). If this value is not
	// set for an encoding live event, the fragment duration defaults to 2 seconds.
	// The value cannot be set for pass-through live events.
	KeyFrameInterval *string

	// The optional encoding preset name, used when encodingType is not None. This value is specified at creation time and cannot
	// be updated. If the encodingType is set to Standard, then the default preset
	// name is ‘Default720p’. Else if the encodingType is set to Premium1080p, the default preset is ‘Default1080p’.
	PresetName *string

	// Specifies how the input video will be resized to fit the desired output resolution(s). Default is None
	StretchMode *StretchMode
}

LiveEventEncoding - Specifies the live event type and optional encoding settings for encoding live events.

func (LiveEventEncoding) MarshalJSON

func (l LiveEventEncoding) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type LiveEventEncoding.

func (*LiveEventEncoding) UnmarshalJSON

func (l *LiveEventEncoding) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type LiveEventEncoding.

type LiveEventEncodingType

type LiveEventEncodingType string

LiveEventEncodingType - Live event type. When encodingType is set to PassthroughBasic or PassthroughStandard, the service simply passes through the incoming video and audio layer(s) to the output. When encodingType is set to Standard or Premium1080p, a live encoder transcodes the incoming stream into multiple bitrates or layers. See https://go.microsoft.com/fwlink/?linkid=2095101 for more information. This property cannot be modified after the live event is created.

const (
	// LiveEventEncodingTypeNone - This is the same as PassthroughStandard, please see description below. This enumeration value
	// is being deprecated.
	LiveEventEncodingTypeNone LiveEventEncodingType = "None"
	// LiveEventEncodingTypePassthroughBasic - The ingested stream passes through the live event from the contribution encoder
	// without any further processing. In the PassthroughBasic mode, ingestion is limited to up to 5Mbps and only 1 concurrent
	// live output is allowed. Live transcription is not available.
	LiveEventEncodingTypePassthroughBasic LiveEventEncodingType = "PassthroughBasic"
	// LiveEventEncodingTypePassthroughStandard - The ingested stream passes through the live event from the contribution encoder
	// without any further processing. Live transcription is available. Ingestion bitrate limits are much higher and up to 3 concurrent
	// live outputs are allowed.
	LiveEventEncodingTypePassthroughStandard LiveEventEncodingType = "PassthroughStandard"
	// LiveEventEncodingTypePremium1080P - A contribution live encoder sends a single bitrate stream to the live event and Media
	// Services creates multiple bitrate streams. The output cannot exceed 1080p in resolution.
	LiveEventEncodingTypePremium1080P LiveEventEncodingType = "Premium1080p"
	// LiveEventEncodingTypeStandard - A contribution live encoder sends a single bitrate stream to the live event and Media Services
	// creates multiple bitrate streams. The output cannot exceed 720p in resolution.
	LiveEventEncodingTypeStandard LiveEventEncodingType = "Standard"
)

func PossibleLiveEventEncodingTypeValues

func PossibleLiveEventEncodingTypeValues() []LiveEventEncodingType

PossibleLiveEventEncodingTypeValues returns the possible values for the LiveEventEncodingType const type.

type LiveEventEndpoint

type LiveEventEndpoint struct {
	// The endpoint protocol.
	Protocol *string

	// The endpoint URL.
	URL *string
}

LiveEventEndpoint - The live event endpoint.

func (LiveEventEndpoint) MarshalJSON

func (l LiveEventEndpoint) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type LiveEventEndpoint.

func (*LiveEventEndpoint) UnmarshalJSON

func (l *LiveEventEndpoint) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type LiveEventEndpoint.

type LiveEventInput

type LiveEventInput struct {
	// REQUIRED; The input protocol for the live event. This is specified at creation time and cannot be updated.
	StreamingProtocol *LiveEventInputProtocol

	// Access control for live event input.
	AccessControl *LiveEventInputAccessControl

	// A UUID in string form to uniquely identify the stream. This can be specified at creation time but cannot be updated. If
	// omitted, the service will generate a unique value.
	AccessToken *string

	// The input endpoints for the live event.
	Endpoints []*LiveEventEndpoint

	// ISO 8601 time duration of the key frame interval duration of the input. This value sets the EXT-X-TARGETDURATION property
	// in the HLS output. For example, use PT2S to indicate 2 seconds. Leave the
	// value empty for encoding live events.
	KeyFrameIntervalDuration *string
}

LiveEventInput - The live event input.

func (LiveEventInput) MarshalJSON

func (l LiveEventInput) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type LiveEventInput.

func (*LiveEventInput) UnmarshalJSON

func (l *LiveEventInput) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type LiveEventInput.

type LiveEventInputAccessControl

type LiveEventInputAccessControl struct {
	// The IP access control properties.
	IP *IPAccessControl
}

LiveEventInputAccessControl - The IP access control for live event input.

func (LiveEventInputAccessControl) MarshalJSON

func (l LiveEventInputAccessControl) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type LiveEventInputAccessControl.

func (*LiveEventInputAccessControl) UnmarshalJSON

func (l *LiveEventInputAccessControl) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type LiveEventInputAccessControl.

type LiveEventInputProtocol

type LiveEventInputProtocol string

LiveEventInputProtocol - The input protocol for the live event. This is specified at creation time and cannot be updated.

const (
	// LiveEventInputProtocolFragmentedMP4 - Smooth Streaming input will be sent by the contribution encoder to the live event.
	LiveEventInputProtocolFragmentedMP4 LiveEventInputProtocol = "FragmentedMP4"
	// LiveEventInputProtocolRTMP - RTMP input will be sent by the contribution encoder to the live event.
	LiveEventInputProtocolRTMP LiveEventInputProtocol = "RTMP"
)

func PossibleLiveEventInputProtocolValues

func PossibleLiveEventInputProtocolValues() []LiveEventInputProtocol

PossibleLiveEventInputProtocolValues returns the possible values for the LiveEventInputProtocol const type.

type LiveEventInputTrackSelection

type LiveEventInputTrackSelection struct {
	// Comparing operation. This property is reserved for future use, any value set on this property will be ignored.
	Operation *string

	// Property name to select. This property is reserved for future use, any value set on this property will be ignored.
	Property *string

	// Property value to select. This property is reserved for future use, any value set on this property will be ignored.
	Value *string
}

LiveEventInputTrackSelection - A track selection condition. This property is reserved for future use, any value set on this property will be ignored.

func (LiveEventInputTrackSelection) MarshalJSON

func (l LiveEventInputTrackSelection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type LiveEventInputTrackSelection.

func (*LiveEventInputTrackSelection) UnmarshalJSON

func (l *LiveEventInputTrackSelection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type LiveEventInputTrackSelection.

type LiveEventListResult

type LiveEventListResult struct {
	// The number of result.
	ODataCount *int32

	// The link to the next set of results. Not empty if value contains incomplete list of live outputs.
	ODataNextLink *string

	// The result of the List Live Event operation.
	Value []*LiveEvent
}

LiveEventListResult - The LiveEvent list result.

func (LiveEventListResult) MarshalJSON

func (l LiveEventListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type LiveEventListResult.

func (*LiveEventListResult) UnmarshalJSON

func (l *LiveEventListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type LiveEventListResult.

type LiveEventOutputTranscriptionTrack

type LiveEventOutputTranscriptionTrack struct {
	// REQUIRED; The output track name. This property is reserved for future use, any value set on this property will be ignored.
	TrackName *string
}

LiveEventOutputTranscriptionTrack - Describes a transcription track in the output of a live event, generated using speech-to-text transcription. This property is reserved for future use, any value set on this property will be ignored.

func (LiveEventOutputTranscriptionTrack) MarshalJSON

func (l LiveEventOutputTranscriptionTrack) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type LiveEventOutputTranscriptionTrack.

func (*LiveEventOutputTranscriptionTrack) UnmarshalJSON

func (l *LiveEventOutputTranscriptionTrack) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type LiveEventOutputTranscriptionTrack.

type LiveEventPreview

type LiveEventPreview struct {
	// The access control for live event preview.
	AccessControl *LiveEventPreviewAccessControl

	// An alternative media identifier associated with the streaming locator created for the preview. This value is specified
	// at creation time and cannot be updated. The identifier can be used in the
	// CustomLicenseAcquisitionUrlTemplate or the CustomKeyAcquisitionUrlTemplate of the StreamingPolicy specified in the StreamingPolicyName
	// field.
	AlternativeMediaID *string

	// The endpoints for preview. Do not share the preview URL with the live event audience.
	Endpoints []*LiveEventEndpoint

	// The identifier of the preview locator in Guid format. Specifying this at creation time allows the caller to know the preview
	// locator url before the event is created. If omitted, the service will
	// generate a random identifier. This value cannot be updated once the live event is created.
	PreviewLocator *string

	// The name of streaming policy used for the live event preview. This value is specified at creation time and cannot be updated.
	StreamingPolicyName *string
}

LiveEventPreview - Live event preview settings.

func (LiveEventPreview) MarshalJSON

func (l LiveEventPreview) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type LiveEventPreview.

func (*LiveEventPreview) UnmarshalJSON

func (l *LiveEventPreview) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type LiveEventPreview.

type LiveEventPreviewAccessControl

type LiveEventPreviewAccessControl struct {
	// The IP access control properties.
	IP *IPAccessControl
}

LiveEventPreviewAccessControl - The IP access control for the live event preview endpoint.

func (LiveEventPreviewAccessControl) MarshalJSON

func (l LiveEventPreviewAccessControl) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type LiveEventPreviewAccessControl.

func (*LiveEventPreviewAccessControl) UnmarshalJSON

func (l *LiveEventPreviewAccessControl) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type LiveEventPreviewAccessControl.

type LiveEventProperties

type LiveEventProperties struct {
	// REQUIRED; Live event input settings. It defines how the live event receives input from a contribution encoder.
	Input *LiveEventInput

	// Live event cross site access policies.
	CrossSiteAccessPolicies *CrossSiteAccessPolicies

	// A description for the live event.
	Description *string

	// Encoding settings for the live event. It configures whether a live encoder is used for the live event and settings for
	// the live encoder if it is used.
	Encoding *LiveEventEncoding

	// When useStaticHostname is set to true, the hostnamePrefix specifies the first part of the hostname assigned to the live
	// event preview and ingest endpoints. The final hostname would be a combination of
	// this prefix, the media service account name and a short code for the Azure Media Services data center.
	HostnamePrefix *string

	// Live event preview settings. Preview allows live event producers to preview the live streaming content without creating
	// any live output.
	Preview *LiveEventPreview

	// The options to use for the LiveEvent. This value is specified at creation time and cannot be updated. The valid values
	// for the array entry values are 'Default' and 'LowLatency'.
	StreamOptions []*StreamOptionsFlag

	// Live transcription settings for the live event. See https://go.microsoft.com/fwlink/?linkid=2133742 for more information
	// about the live transcription feature.
	Transcriptions []*LiveEventTranscription

	// Specifies whether a static hostname would be assigned to the live event preview and ingest endpoints. This value can only
	// be updated if the live event is in Standby state
	UseStaticHostname *bool

	// READ-ONLY; The creation time for the live event
	Created *time.Time

	// READ-ONLY; The last modified time of the live event.
	LastModified *time.Time

	// READ-ONLY; The provisioning state of the live event.
	ProvisioningState *string

	// READ-ONLY; The resource state of the live event. See https://go.microsoft.com/fwlink/?linkid=2139012 for more information.
	ResourceState *LiveEventResourceState
}

LiveEventProperties - The live event properties.

func (LiveEventProperties) MarshalJSON

func (l LiveEventProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type LiveEventProperties.

func (*LiveEventProperties) UnmarshalJSON

func (l *LiveEventProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type LiveEventProperties.

type LiveEventResourceState

type LiveEventResourceState string

LiveEventResourceState - The resource state of the live event. See https://go.microsoft.com/fwlink/?linkid=2139012 for more information.

const (
	// LiveEventResourceStateAllocating - Allocate action was called on the live event and resources are being provisioned for
	// this live event. Once allocation completes successfully, the live event will transition to StandBy state.
	LiveEventResourceStateAllocating LiveEventResourceState = "Allocating"
	// LiveEventResourceStateDeleting - The live event is being deleted. No billing occurs in this transient state. Updates or
	// streaming are not allowed during this state.
	LiveEventResourceStateDeleting LiveEventResourceState = "Deleting"
	// LiveEventResourceStateRunning - The live event resources have been allocated, ingest and preview URLs have been generated,
	// and it is capable of receiving live streams. At this point, billing is active. You must explicitly call Stop on the live
	// event resource to halt further billing.
	LiveEventResourceStateRunning LiveEventResourceState = "Running"
	// LiveEventResourceStateStandBy - Live event resources have been provisioned and is ready to start. Billing occurs in this
	// state. Most properties can still be updated, however ingest or streaming is not allowed during this state.
	LiveEventResourceStateStandBy LiveEventResourceState = "StandBy"
	// LiveEventResourceStateStarting - The live event is being started and resources are being allocated. No billing occurs in
	// this state. Updates or streaming are not allowed during this state. If an error occurs, the live event returns to the Stopped
	// state.
	LiveEventResourceStateStarting LiveEventResourceState = "Starting"
	// LiveEventResourceStateStopped - This is the initial state of the live event after creation (unless autostart was set to
	// true.) No billing occurs in this state. In this state, the live event properties can be updated but streaming is not allowed.
	LiveEventResourceStateStopped LiveEventResourceState = "Stopped"
	// LiveEventResourceStateStopping - The live event is being stopped and resources are being de-provisioned. No billing occurs
	// in this transient state. Updates or streaming are not allowed during this state.
	LiveEventResourceStateStopping LiveEventResourceState = "Stopping"
)

func PossibleLiveEventResourceStateValues

func PossibleLiveEventResourceStateValues() []LiveEventResourceState

PossibleLiveEventResourceStateValues returns the possible values for the LiveEventResourceState const type.

type LiveEventTranscription

type LiveEventTranscription struct {
	// Provides a mechanism to select the audio track in the input live feed, to which speech-to-text transcription is applied.
	// This property is reserved for future use, any value set on this property will
	// be ignored.
	InputTrackSelection []*LiveEventInputTrackSelection

	// Specifies the language (locale) to be used for speech-to-text transcription – it should match the spoken language in the
	// audio track. The value should be in BCP-47 format (e.g: 'en-US'). See
	// https://go.microsoft.com/fwlink/?linkid=2133742 for more information about the live transcription feature and the list
	// of supported languages.
	Language *string

	// Describes a transcription track in the output of a live event, generated using speech-to-text transcription. This property
	// is reserved for future use, any value set on this property will be ignored.
	OutputTranscriptionTrack *LiveEventOutputTranscriptionTrack
}

LiveEventTranscription - Describes the transcription tracks in the output of a live event, generated using speech-to-text transcription. This property is reserved for future use, any value set on this property will be ignored.

func (LiveEventTranscription) MarshalJSON

func (l LiveEventTranscription) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type LiveEventTranscription.

func (*LiveEventTranscription) UnmarshalJSON

func (l *LiveEventTranscription) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type LiveEventTranscription.

type LiveEventsClient

type LiveEventsClient struct {
	// contains filtered or unexported fields
}

LiveEventsClient contains the methods for the LiveEvents group. Don't use this type directly, use NewLiveEventsClient() instead.

func NewLiveEventsClient

func NewLiveEventsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LiveEventsClient, error)

NewLiveEventsClient creates a new instance of LiveEventsClient with the specified values.

  • subscriptionID - The unique identifier for a Microsoft Azure subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*LiveEventsClient) AsyncOperation added in v3.1.0

func (client *LiveEventsClient) AsyncOperation(ctx context.Context, resourceGroupName string, accountName string, operationID string, options *LiveEventsClientAsyncOperationOptions) (LiveEventsClientAsyncOperationResponse, error)

AsyncOperation - Get a live event operation status. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • operationID - The ID of an ongoing async operation.
  • options - LiveEventsClientAsyncOperationOptions contains the optional parameters for the LiveEventsClient.AsyncOperation method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-08-01/examples/async-operation-result.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewLiveEventsClient().AsyncOperation(ctx, "mediaresources", "slitestmedia10", "62e4d893-d233-4005-988e-a428d9f77076", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.AsyncOperationResult = armmediaservices.AsyncOperationResult{
// 	Name: to.Ptr("62e4d893-d233-4005-988e-a428d9f77076"),
// 	Error: &armmediaservices.ErrorDetail{
// 		Code: to.Ptr("None"),
// 		Target: to.Ptr("d7aea790-8acb-40b9-8f9f-21cc37c9e519"),
// 	},
// 	Status: to.Ptr(armmediaservices.AsyncOperationStatusInProgress),
// }
Output:

func (*LiveEventsClient) BeginAllocate

func (client *LiveEventsClient) BeginAllocate(ctx context.Context, resourceGroupName string, accountName string, liveEventName string, options *LiveEventsClientBeginAllocateOptions) (*runtime.Poller[LiveEventsClientAllocateResponse], error)

BeginAllocate - A live event is in StandBy state after allocation completes, and is ready to start. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • liveEventName - The name of the live event, maximum length is 32.
  • options - LiveEventsClientBeginAllocateOptions contains the optional parameters for the LiveEventsClient.BeginAllocate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-08-01/examples/liveevent-allocate.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewLiveEventsClient().BeginAllocate(ctx, "mediaresources", "slitestmedia10", "myLiveEvent1", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
_, err = poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
Output:

func (*LiveEventsClient) BeginCreate

func (client *LiveEventsClient) BeginCreate(ctx context.Context, resourceGroupName string, accountName string, liveEventName string, parameters LiveEvent, options *LiveEventsClientBeginCreateOptions) (*runtime.Poller[LiveEventsClientCreateResponse], error)

BeginCreate - Creates a new live event. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • liveEventName - The name of the live event, maximum length is 32.
  • parameters - Live event properties needed for creation.
  • options - LiveEventsClientBeginCreateOptions contains the optional parameters for the LiveEventsClient.BeginCreate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-08-01/examples/liveevent-create.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewLiveEventsClient().BeginCreate(ctx, "mediaresources", "slitestmedia10", "myLiveEvent1", armmediaservices.LiveEvent{
	Location: to.Ptr("West US"),
	Tags: map[string]*string{
		"tag1": to.Ptr("value1"),
		"tag2": to.Ptr("value2"),
	},
	Properties: &armmediaservices.LiveEventProperties{
		Description: to.Ptr("test event 1"),
		Input: &armmediaservices.LiveEventInput{
			AccessControl: &armmediaservices.LiveEventInputAccessControl{
				IP: &armmediaservices.IPAccessControl{
					Allow: []*armmediaservices.IPRange{
						{
							Name:               to.Ptr("AllowAll"),
							Address:            to.Ptr("0.0.0.0"),
							SubnetPrefixLength: to.Ptr[int32](0),
						}},
				},
			},
			KeyFrameIntervalDuration: to.Ptr("PT6S"),
			StreamingProtocol:        to.Ptr(armmediaservices.LiveEventInputProtocolRTMP),
		},
		Preview: &armmediaservices.LiveEventPreview{
			AccessControl: &armmediaservices.LiveEventPreviewAccessControl{
				IP: &armmediaservices.IPAccessControl{
					Allow: []*armmediaservices.IPRange{
						{
							Name:               to.Ptr("AllowAll"),
							Address:            to.Ptr("0.0.0.0"),
							SubnetPrefixLength: to.Ptr[int32](0),
						}},
				},
			},
		},
	},
}, &armmediaservices.LiveEventsClientBeginCreateOptions{AutoStart: nil})
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.LiveEvent = armmediaservices.LiveEvent{
// 	Name: to.Ptr("myLiveEvent1"),
// 	Type: to.Ptr("Microsoft.Media/mediaservices/liveevents"),
// 	ID: to.Ptr("/subscriptions/0a6ec948-5a62-437d-b9df-934dc7c1b722/resourceGroups/mediaresources/providers/Microsoft.Media/mediaservices/slitestmedia10/liveevents/myLiveEvent1"),
// 	Location: to.Ptr("West US"),
// 	Tags: map[string]*string{
// 		"tag1": to.Ptr("value1"),
// 		"tag2": to.Ptr("value2"),
// 	},
// 	Properties: &armmediaservices.LiveEventProperties{
// 		Description: to.Ptr("test event 1"),
// 		Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-03T02:25:06.098Z"); return t}()),
// 		CrossSiteAccessPolicies: &armmediaservices.CrossSiteAccessPolicies{
// 		},
// 		Encoding: &armmediaservices.LiveEventEncoding{
// 			EncodingType: to.Ptr(armmediaservices.LiveEventEncodingTypeNone),
// 		},
// 		Input: &armmediaservices.LiveEventInput{
// 			AccessControl: &armmediaservices.LiveEventInputAccessControl{
// 				IP: &armmediaservices.IPAccessControl{
// 					Allow: []*armmediaservices.IPRange{
// 						{
// 							Name: to.Ptr("AllowAll"),
// 							Address: to.Ptr("0.0.0.0"),
// 							SubnetPrefixLength: to.Ptr[int32](0),
// 					}},
// 				},
// 			},
// 			AccessToken: to.Ptr("<accessToken>"),
// 			Endpoints: []*armmediaservices.LiveEventEndpoint{
// 			},
// 			KeyFrameIntervalDuration: to.Ptr("PT6S"),
// 			StreamingProtocol: to.Ptr(armmediaservices.LiveEventInputProtocolFragmentedMP4),
// 		},
// 		LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-03T02:25:06.098Z"); return t}()),
// 		Preview: &armmediaservices.LiveEventPreview{
// 			AccessControl: &armmediaservices.LiveEventPreviewAccessControl{
// 				IP: &armmediaservices.IPAccessControl{
// 					Allow: []*armmediaservices.IPRange{
// 						{
// 							Name: to.Ptr("AllowAll"),
// 							Address: to.Ptr("0.0.0.0"),
// 							SubnetPrefixLength: to.Ptr[int32](0),
// 					}},
// 				},
// 			},
// 			Endpoints: []*armmediaservices.LiveEventEndpoint{
// 			},
// 			PreviewLocator: to.Ptr("c91726b4-880c-4090-94aa-e6ddb1384b37"),
// 		},
// 		ProvisioningState: to.Ptr("Succeeded"),
// 		ResourceState: to.Ptr(armmediaservices.LiveEventResourceStateStopped),
// 		StreamOptions: []*armmediaservices.StreamOptionsFlag{
// 		},
// 		UseStaticHostname: to.Ptr(false),
// 	},
// }
Output:

func (*LiveEventsClient) BeginDelete

func (client *LiveEventsClient) BeginDelete(ctx context.Context, resourceGroupName string, accountName string, liveEventName string, options *LiveEventsClientBeginDeleteOptions) (*runtime.Poller[LiveEventsClientDeleteResponse], error)

BeginDelete - Deletes a live event. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • liveEventName - The name of the live event, maximum length is 32.
  • options - LiveEventsClientBeginDeleteOptions contains the optional parameters for the LiveEventsClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-08-01/examples/liveevent-delete.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewLiveEventsClient().BeginDelete(ctx, "mediaresources", "slitestmedia10", "myLiveEvent1", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
_, err = poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
Output:

func (*LiveEventsClient) BeginReset

func (client *LiveEventsClient) BeginReset(ctx context.Context, resourceGroupName string, accountName string, liveEventName string, options *LiveEventsClientBeginResetOptions) (*runtime.Poller[LiveEventsClientResetResponse], error)

BeginReset - Resets an existing live event. All live outputs for the live event are deleted and the live event is stopped and will be started again. All assets used by the live outputs and streaming locators created on these assets are unaffected. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • liveEventName - The name of the live event, maximum length is 32.
  • options - LiveEventsClientBeginResetOptions contains the optional parameters for the LiveEventsClient.BeginReset method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-08-01/examples/liveevent-reset.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewLiveEventsClient().BeginReset(ctx, "mediaresources", "slitestmedia10", "myLiveEvent1", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
_, err = poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
Output:

func (*LiveEventsClient) BeginStart

func (client *LiveEventsClient) BeginStart(ctx context.Context, resourceGroupName string, accountName string, liveEventName string, options *LiveEventsClientBeginStartOptions) (*runtime.Poller[LiveEventsClientStartResponse], error)

BeginStart - A live event in Stopped or StandBy state will be in Running state after the start operation completes. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • liveEventName - The name of the live event, maximum length is 32.
  • options - LiveEventsClientBeginStartOptions contains the optional parameters for the LiveEventsClient.BeginStart method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-08-01/examples/liveevent-start.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewLiveEventsClient().BeginStart(ctx, "mediaresources", "slitestmedia10", "myLiveEvent1", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
_, err = poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
Output:

func (*LiveEventsClient) BeginStop

func (client *LiveEventsClient) BeginStop(ctx context.Context, resourceGroupName string, accountName string, liveEventName string, parameters LiveEventActionInput, options *LiveEventsClientBeginStopOptions) (*runtime.Poller[LiveEventsClientStopResponse], error)

BeginStop - Stops a running live event. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • liveEventName - The name of the live event, maximum length is 32.
  • parameters - LiveEvent stop parameters
  • options - LiveEventsClientBeginStopOptions contains the optional parameters for the LiveEventsClient.BeginStop method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-08-01/examples/liveevent-stop.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewLiveEventsClient().BeginStop(ctx, "mediaresources", "slitestmedia10", "myLiveEvent1", armmediaservices.LiveEventActionInput{
	RemoveOutputsOnStop: to.Ptr(false),
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
_, err = poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
Output:

func (*LiveEventsClient) BeginUpdate

func (client *LiveEventsClient) BeginUpdate(ctx context.Context, resourceGroupName string, accountName string, liveEventName string, parameters LiveEvent, options *LiveEventsClientBeginUpdateOptions) (*runtime.Poller[LiveEventsClientUpdateResponse], error)

BeginUpdate - Updates settings on an existing live event. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • liveEventName - The name of the live event, maximum length is 32.
  • parameters - Live event properties needed for patch.
  • options - LiveEventsClientBeginUpdateOptions contains the optional parameters for the LiveEventsClient.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-08-01/examples/liveevent-update.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewLiveEventsClient().BeginUpdate(ctx, "mediaresources", "slitestmedia10", "myLiveEvent1", armmediaservices.LiveEvent{
	Location: to.Ptr("West US"),
	Tags: map[string]*string{
		"tag1": to.Ptr("value1"),
		"tag2": to.Ptr("value2"),
		"tag3": to.Ptr("value3"),
	},
	Properties: &armmediaservices.LiveEventProperties{
		Description: to.Ptr("test event updated"),
		Input: &armmediaservices.LiveEventInput{
			AccessControl: &armmediaservices.LiveEventInputAccessControl{
				IP: &armmediaservices.IPAccessControl{
					Allow: []*armmediaservices.IPRange{
						{
							Name:    to.Ptr("AllowOne"),
							Address: to.Ptr("192.1.1.0"),
						}},
				},
			},
			KeyFrameIntervalDuration: to.Ptr("PT6S"),
			StreamingProtocol:        to.Ptr(armmediaservices.LiveEventInputProtocolFragmentedMP4),
		},
		Preview: &armmediaservices.LiveEventPreview{
			AccessControl: &armmediaservices.LiveEventPreviewAccessControl{
				IP: &armmediaservices.IPAccessControl{
					Allow: []*armmediaservices.IPRange{
						{
							Name:    to.Ptr("AllowOne"),
							Address: to.Ptr("192.1.1.0"),
						}},
				},
			},
		},
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.LiveEvent = armmediaservices.LiveEvent{
// 	Name: to.Ptr("myLiveEvent1"),
// 	Type: to.Ptr("Microsoft.Media/mediaservices/liveevents"),
// 	ID: to.Ptr("/subscriptions/0a6ec948-5a62-437d-b9df-934dc7c1b722/resourceGroups/mediaresources/providers/Microsoft.Media/mediaservices/slitestmedia10/liveevents/myLiveEvent1"),
// 	Location: to.Ptr("West US"),
// 	Tags: map[string]*string{
// 		"tag1": to.Ptr("value1"),
// 		"tag2": to.Ptr("value2"),
// 		"tag3": to.Ptr("value3"),
// 	},
// 	Properties: &armmediaservices.LiveEventProperties{
// 		Description: to.Ptr("test event updated"),
// 		Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "1-01-01T00:00:00.000Z"); return t}()),
// 		Encoding: &armmediaservices.LiveEventEncoding{
// 			EncodingType: to.Ptr(armmediaservices.LiveEventEncodingTypeNone),
// 		},
// 		Input: &armmediaservices.LiveEventInput{
// 			AccessControl: &armmediaservices.LiveEventInputAccessControl{
// 				IP: &armmediaservices.IPAccessControl{
// 					Allow: []*armmediaservices.IPRange{
// 						{
// 							Name: to.Ptr("AllowOne"),
// 							Address: to.Ptr("192.1.1.0"),
// 					}},
// 				},
// 			},
// 			AccessToken: to.Ptr("<accessToken>"),
// 			Endpoints: []*armmediaservices.LiveEventEndpoint{
// 			},
// 			KeyFrameIntervalDuration: to.Ptr("PT6S"),
// 			StreamingProtocol: to.Ptr(armmediaservices.LiveEventInputProtocolFragmentedMP4),
// 		},
// 		LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "1-01-01T00:00:00.000Z"); return t}()),
// 		Preview: &armmediaservices.LiveEventPreview{
// 			AccessControl: &armmediaservices.LiveEventPreviewAccessControl{
// 				IP: &armmediaservices.IPAccessControl{
// 					Allow: []*armmediaservices.IPRange{
// 						{
// 							Name: to.Ptr("AllowOne"),
// 							Address: to.Ptr("192.1.1.0"),
// 					}},
// 				},
// 			},
// 			Endpoints: []*armmediaservices.LiveEventEndpoint{
// 			},
// 			PreviewLocator: to.Ptr("c10ea3fc-587f-4daf-b2b2-fa8f647a9ed2"),
// 		},
// 		ProvisioningState: to.Ptr("Succeeded"),
// 		ResourceState: to.Ptr(armmediaservices.LiveEventResourceStateRunning),
// 		StreamOptions: []*armmediaservices.StreamOptionsFlag{
// 		},
// 		UseStaticHostname: to.Ptr(false),
// 	},
// }
Output:

func (*LiveEventsClient) Get

func (client *LiveEventsClient) Get(ctx context.Context, resourceGroupName string, accountName string, liveEventName string, options *LiveEventsClientGetOptions) (LiveEventsClientGetResponse, error)

Get - Gets properties of a live event. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • liveEventName - The name of the live event, maximum length is 32.
  • options - LiveEventsClientGetOptions contains the optional parameters for the LiveEventsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-08-01/examples/liveevent-list-by-name.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewLiveEventsClient().Get(ctx, "mediaresources", "slitestmedia10", "myLiveEvent1", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.LiveEvent = armmediaservices.LiveEvent{
// 	Name: to.Ptr("myLiveEvent1"),
// 	Type: to.Ptr("Microsoft.Media/mediaservices/liveevents"),
// 	ID: to.Ptr("/subscriptions/0a6ec948-5a62-437d-b9df-934dc7c1b722/resourceGroups/mediaresources/providers/Microsoft.Media/mediaservices/slitestmedia10/liveevents/myLiveEvent1"),
// 	Location: to.Ptr("West US"),
// 	Tags: map[string]*string{
// 	},
// 	Properties: &armmediaservices.LiveEventProperties{
// 		Description: to.Ptr(""),
// 		Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-03T02:25:08.347Z"); return t}()),
// 		CrossSiteAccessPolicies: &armmediaservices.CrossSiteAccessPolicies{
// 			ClientAccessPolicy: to.Ptr("<access-policy><cross-domain-access><policy><allow-from http-methods=\"*\"><domain uri=\"http://*\"/></allow-from><grant-to><resource path=\"/\" include-subpaths=\"true\"/></grant-to></policy></cross-domain-access></access-policy>"),
// 			CrossDomainPolicy: to.Ptr("<cross-domain-policy><allow-access-from domain=\"*\" secure=\"false\" /></cross-domain-policy>"),
// 		},
// 		Encoding: &armmediaservices.LiveEventEncoding{
// 			EncodingType: to.Ptr(armmediaservices.LiveEventEncodingTypeNone),
// 		},
// 		Input: &armmediaservices.LiveEventInput{
// 			Endpoints: []*armmediaservices.LiveEventEndpoint{
// 				{
// 					URL: to.Ptr("http://clouddeployment.media-test.net/ingest.isml"),
// 					Protocol: to.Ptr("FragmentedMP4"),
// 			}},
// 			KeyFrameIntervalDuration: to.Ptr("PT6S"),
// 			StreamingProtocol: to.Ptr(armmediaservices.LiveEventInputProtocolFragmentedMP4),
// 		},
// 		LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-03T02:25:08.347Z"); return t}()),
// 		Preview: &armmediaservices.LiveEventPreview{
// 			AccessControl: &armmediaservices.LiveEventPreviewAccessControl{
// 				IP: &armmediaservices.IPAccessControl{
// 					Allow: []*armmediaservices.IPRange{
// 						{
// 							Name: to.Ptr("AllowAll"),
// 							Address: to.Ptr("0.0.0.0"),
// 							SubnetPrefixLength: to.Ptr[int32](0),
// 					}},
// 				},
// 			},
// 			Endpoints: []*armmediaservices.LiveEventEndpoint{
// 				{
// 					URL: to.Ptr("https://testeventopito4idh2r-weibzmedia05.preview-ts051.channel.media-test.windows-int.net/763f3ea4-d94f-441c-a634-c833f61a4e04/preview.ism/manifest"),
// 					Protocol: to.Ptr("FragmentedMP4"),
// 			}},
// 			PreviewLocator: to.Ptr("763f3ea4-d94f-441c-a634-c833f61a4e04"),
// 		},
// 		ProvisioningState: to.Ptr("Succeeded"),
// 		ResourceState: to.Ptr(armmediaservices.LiveEventResourceStateStopped),
// 		StreamOptions: []*armmediaservices.StreamOptionsFlag{
// 			to.Ptr(armmediaservices.StreamOptionsFlagDefault)},
// 			UseStaticHostname: to.Ptr(false),
// 		},
// 	}
Output:

func (*LiveEventsClient) NewListPager

func (client *LiveEventsClient) NewListPager(resourceGroupName string, accountName string, options *LiveEventsClientListOptions) *runtime.Pager[LiveEventsClientListResponse]

NewListPager - Lists all the live events in the account.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • options - LiveEventsClientListOptions contains the optional parameters for the LiveEventsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-08-01/examples/liveevent-list-all.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewLiveEventsClient().NewListPager("mediaresources", "slitestmedia10", nil)
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.LiveEventListResult = armmediaservices.LiveEventListResult{
	// 	Value: []*armmediaservices.LiveEvent{
	// 		{
	// 			Name: to.Ptr("myLiveEvent1"),
	// 			Type: to.Ptr("Microsoft.Media/mediaservices/liveevents"),
	// 			ID: to.Ptr("/subscriptions/0a6ec948-5a62-437d-b9df-934dc7c1b722/resourceGroups/mediaresources/providers/Microsoft.Media/mediaservices/slitestmedia10/liveevents/myLiveEvent1"),
	// 			Location: to.Ptr("West US"),
	// 			Tags: map[string]*string{
	// 				"tag1": to.Ptr("value1"),
	// 				"tag2": to.Ptr("value2"),
	// 			},
	// 			Properties: &armmediaservices.LiveEventProperties{
	// 				Description: to.Ptr("test event 1"),
	// 				Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-03T02:25:08.556Z"); return t}()),
	// 				CrossSiteAccessPolicies: &armmediaservices.CrossSiteAccessPolicies{
	// 				},
	// 				Encoding: &armmediaservices.LiveEventEncoding{
	// 					EncodingType: to.Ptr(armmediaservices.LiveEventEncodingTypeNone),
	// 				},
	// 				Input: &armmediaservices.LiveEventInput{
	// 					AccessToken: to.Ptr("<accessToken>"),
	// 					Endpoints: []*armmediaservices.LiveEventEndpoint{
	// 						{
	// 							URL: to.Ptr("http://clouddeployment.media-test.net/de153bb0814542d9b7e2339ce9430dc4/ingest.isml"),
	// 							Protocol: to.Ptr("FragmentedMP4"),
	// 					}},
	// 					KeyFrameIntervalDuration: to.Ptr("PT6S"),
	// 					StreamingProtocol: to.Ptr(armmediaservices.LiveEventInputProtocolFragmentedMP4),
	// 				},
	// 				LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-03T02:25:08.556Z"); return t}()),
	// 				Preview: &armmediaservices.LiveEventPreview{
	// 					AccessControl: &armmediaservices.LiveEventPreviewAccessControl{
	// 						IP: &armmediaservices.IPAccessControl{
	// 							Allow: []*armmediaservices.IPRange{
	// 								{
	// 									Name: to.Ptr("AllowAll"),
	// 									Address: to.Ptr("0.0.0.0"),
	// 									SubnetPrefixLength: to.Ptr[int32](0),
	// 							}},
	// 						},
	// 					},
	// 					Endpoints: []*armmediaservices.LiveEventEndpoint{
	// 						{
	// 							URL: to.Ptr("https://myliveevent1-slitestmedia10.preview-usso.channel.mediaservices.windows.net/a220e223-faf8-4e03-b9a9-2c2432f48025/preview.ism/manifest"),
	// 							Protocol: to.Ptr("FragmentedMP4"),
	// 					}},
	// 					PreviewLocator: to.Ptr("a220e223-faf8-4e03-b9a9-2c2432f48025"),
	// 				},
	// 				ProvisioningState: to.Ptr("Succeeded"),
	// 				ResourceState: to.Ptr(armmediaservices.LiveEventResourceStateStopped),
	// 				StreamOptions: []*armmediaservices.StreamOptionsFlag{
	// 				},
	// 				UseStaticHostname: to.Ptr(false),
	// 			},
	// 	}},
	// }
}
Output:

func (*LiveEventsClient) OperationLocation added in v3.1.0

func (client *LiveEventsClient) OperationLocation(ctx context.Context, resourceGroupName string, accountName string, liveEventName string, operationID string, options *LiveEventsClientOperationLocationOptions) (LiveEventsClientOperationLocationResponse, error)

OperationLocation - Get a live event operation status. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • liveEventName - The name of the live event, maximum length is 32.
  • operationID - The ID of an ongoing async operation.
  • options - LiveEventsClientOperationLocationOptions contains the optional parameters for the LiveEventsClient.OperationLocation method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-08-01/examples/liveevent-operation-location.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewLiveEventsClient().OperationLocation(ctx, "mediaresources", "slitestmedia10", "myLiveEvent1", "62e4d893-d233-4005-988e-a428d9f77076", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.LiveEvent = armmediaservices.LiveEvent{
// 	Name: to.Ptr("myLiveEvent1"),
// 	Type: to.Ptr("Microsoft.Media/mediaservices/liveevents"),
// 	ID: to.Ptr("/subscriptions/0a6ec948-5a62-437d-b9df-934dc7c1b722/resourceGroups/mediaresources/providers/Microsoft.Media/mediaservices/slitestmedia10/liveevents/myLiveEvent1"),
// 	Location: to.Ptr("West US"),
// 	Tags: map[string]*string{
// 	},
// 	Properties: &armmediaservices.LiveEventProperties{
// 		Description: to.Ptr(""),
// 		Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-03T02:25:08.347Z"); return t}()),
// 		CrossSiteAccessPolicies: &armmediaservices.CrossSiteAccessPolicies{
// 			ClientAccessPolicy: to.Ptr("<access-policy><cross-domain-access><policy><allow-from http-methods=\"*\"><domain uri=\"http://*\"/></allow-from><grant-to><resource path=\"/\" include-subpaths=\"true\"/></grant-to></policy></cross-domain-access></access-policy>"),
// 			CrossDomainPolicy: to.Ptr("<cross-domain-policy><allow-access-from domain=\"*\" secure=\"false\" /></cross-domain-policy>"),
// 		},
// 		Encoding: &armmediaservices.LiveEventEncoding{
// 			EncodingType: to.Ptr(armmediaservices.LiveEventEncodingTypeNone),
// 		},
// 		Input: &armmediaservices.LiveEventInput{
// 			Endpoints: []*armmediaservices.LiveEventEndpoint{
// 				{
// 					URL: to.Ptr("http://clouddeployment.media-test.net/ingest.isml"),
// 					Protocol: to.Ptr("FragmentedMP4"),
// 			}},
// 			KeyFrameIntervalDuration: to.Ptr("PT6S"),
// 			StreamingProtocol: to.Ptr(armmediaservices.LiveEventInputProtocolFragmentedMP4),
// 		},
// 		LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-03T02:25:08.347Z"); return t}()),
// 		Preview: &armmediaservices.LiveEventPreview{
// 			AccessControl: &armmediaservices.LiveEventPreviewAccessControl{
// 				IP: &armmediaservices.IPAccessControl{
// 					Allow: []*armmediaservices.IPRange{
// 						{
// 							Name: to.Ptr("AllowAll"),
// 							Address: to.Ptr("0.0.0.0"),
// 							SubnetPrefixLength: to.Ptr[int32](0),
// 					}},
// 				},
// 			},
// 			Endpoints: []*armmediaservices.LiveEventEndpoint{
// 				{
// 					URL: to.Ptr("https://testeventopito4idh2r-weibzmedia05.preview-ts051.channel.media-test.windows-int.net/763f3ea4-d94f-441c-a634-c833f61a4e04/preview.ism/manifest"),
// 					Protocol: to.Ptr("FragmentedMP4"),
// 			}},
// 			PreviewLocator: to.Ptr("763f3ea4-d94f-441c-a634-c833f61a4e04"),
// 		},
// 		ProvisioningState: to.Ptr("Succeeded"),
// 		ResourceState: to.Ptr(armmediaservices.LiveEventResourceStateStopped),
// 		StreamOptions: []*armmediaservices.StreamOptionsFlag{
// 			to.Ptr(armmediaservices.StreamOptionsFlagDefault)},
// 			UseStaticHostname: to.Ptr(false),
// 		},
// 		SystemData: &armmediaservices.SystemData{
// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-03T02:25:08.347Z"); return t}()),
// 			CreatedBy: to.Ptr("example@microsoft.com"),
// 			CreatedByType: to.Ptr(armmediaservices.CreatedByTypeUser),
// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-03T02:25:08.347Z"); return t}()),
// 			LastModifiedBy: to.Ptr("example@microsoft.com"),
// 			LastModifiedByType: to.Ptr(armmediaservices.CreatedByTypeUser),
// 		},
// 	}
Output:

type LiveEventsClientAllocateResponse

type LiveEventsClientAllocateResponse struct {
}

LiveEventsClientAllocateResponse contains the response from method LiveEventsClient.BeginAllocate.

type LiveEventsClientAsyncOperationOptions added in v3.1.0

type LiveEventsClientAsyncOperationOptions struct {
}

LiveEventsClientAsyncOperationOptions contains the optional parameters for the LiveEventsClient.AsyncOperation method.

type LiveEventsClientAsyncOperationResponse added in v3.1.0

type LiveEventsClientAsyncOperationResponse struct {
	// The status of an async operation.
	AsyncOperationResult
}

LiveEventsClientAsyncOperationResponse contains the response from method LiveEventsClient.AsyncOperation.

type LiveEventsClientBeginAllocateOptions

type LiveEventsClientBeginAllocateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

LiveEventsClientBeginAllocateOptions contains the optional parameters for the LiveEventsClient.BeginAllocate method.

type LiveEventsClientBeginCreateOptions

type LiveEventsClientBeginCreateOptions struct {
	// The flag indicates if the resource should be automatically started on creation.
	AutoStart *bool

	// Resumes the LRO from the provided token.
	ResumeToken string
}

LiveEventsClientBeginCreateOptions contains the optional parameters for the LiveEventsClient.BeginCreate method.

type LiveEventsClientBeginDeleteOptions

type LiveEventsClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

LiveEventsClientBeginDeleteOptions contains the optional parameters for the LiveEventsClient.BeginDelete method.

type LiveEventsClientBeginResetOptions

type LiveEventsClientBeginResetOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

LiveEventsClientBeginResetOptions contains the optional parameters for the LiveEventsClient.BeginReset method.

type LiveEventsClientBeginStartOptions

type LiveEventsClientBeginStartOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

LiveEventsClientBeginStartOptions contains the optional parameters for the LiveEventsClient.BeginStart method.

type LiveEventsClientBeginStopOptions

type LiveEventsClientBeginStopOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

LiveEventsClientBeginStopOptions contains the optional parameters for the LiveEventsClient.BeginStop method.

type LiveEventsClientBeginUpdateOptions

type LiveEventsClientBeginUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

LiveEventsClientBeginUpdateOptions contains the optional parameters for the LiveEventsClient.BeginUpdate method.

type LiveEventsClientCreateResponse

type LiveEventsClientCreateResponse struct {
	// The live event.
	LiveEvent
}

LiveEventsClientCreateResponse contains the response from method LiveEventsClient.BeginCreate.

type LiveEventsClientDeleteResponse

type LiveEventsClientDeleteResponse struct {
}

LiveEventsClientDeleteResponse contains the response from method LiveEventsClient.BeginDelete.

type LiveEventsClientGetOptions

type LiveEventsClientGetOptions struct {
}

LiveEventsClientGetOptions contains the optional parameters for the LiveEventsClient.Get method.

type LiveEventsClientGetResponse

type LiveEventsClientGetResponse struct {
	// The live event.
	LiveEvent
}

LiveEventsClientGetResponse contains the response from method LiveEventsClient.Get.

type LiveEventsClientListOptions

type LiveEventsClientListOptions struct {
}

LiveEventsClientListOptions contains the optional parameters for the LiveEventsClient.NewListPager method.

type LiveEventsClientListResponse

type LiveEventsClientListResponse struct {
	// The LiveEvent list result.
	LiveEventListResult
}

LiveEventsClientListResponse contains the response from method LiveEventsClient.NewListPager.

type LiveEventsClientOperationLocationOptions added in v3.1.0

type LiveEventsClientOperationLocationOptions struct {
}

LiveEventsClientOperationLocationOptions contains the optional parameters for the LiveEventsClient.OperationLocation method.

type LiveEventsClientOperationLocationResponse added in v3.1.0

type LiveEventsClientOperationLocationResponse struct {
	// The live event.
	LiveEvent
}

LiveEventsClientOperationLocationResponse contains the response from method LiveEventsClient.OperationLocation.

type LiveEventsClientResetResponse

type LiveEventsClientResetResponse struct {
}

LiveEventsClientResetResponse contains the response from method LiveEventsClient.BeginReset.

type LiveEventsClientStartResponse

type LiveEventsClientStartResponse struct {
}

LiveEventsClientStartResponse contains the response from method LiveEventsClient.BeginStart.

type LiveEventsClientStopResponse

type LiveEventsClientStopResponse struct {
}

LiveEventsClientStopResponse contains the response from method LiveEventsClient.BeginStop.

type LiveEventsClientUpdateResponse

type LiveEventsClientUpdateResponse struct {
	// The live event.
	LiveEvent
}

LiveEventsClientUpdateResponse contains the response from method LiveEventsClient.BeginUpdate.

type LiveOutput

type LiveOutput struct {
	// Live output properties.
	Properties *LiveOutputProperties

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; The system metadata relating to this resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

LiveOutput - The Live Output.

func (LiveOutput) MarshalJSON

func (l LiveOutput) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type LiveOutput.

func (*LiveOutput) UnmarshalJSON

func (l *LiveOutput) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type LiveOutput.

type LiveOutputListResult

type LiveOutputListResult struct {
	// The number of result.
	ODataCount *int32

	// The link to the next set of results. Not empty if value contains incomplete list of live outputs.
	ODataNextLink *string

	// The result of the List LiveOutput operation.
	Value []*LiveOutput
}

LiveOutputListResult - The LiveOutput list result.

func (LiveOutputListResult) MarshalJSON

func (l LiveOutputListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type LiveOutputListResult.

func (*LiveOutputListResult) UnmarshalJSON

func (l *LiveOutputListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type LiveOutputListResult.

type LiveOutputProperties

type LiveOutputProperties struct {
	// REQUIRED; ISO 8601 time between 1 minute to 25 hours to indicate the maximum content length that can be archived in the
	// asset for this live output. This also sets the maximum content length for the rewind
	// window. For example, use PT1H30M to indicate 1 hour and 30 minutes of archive window.
	ArchiveWindowLength *string

	// REQUIRED; The asset that the live output will write to.
	AssetName *string

	// The description of the live output.
	Description *string

	// HTTP Live Streaming (HLS) packing setting for the live output.
	Hls *Hls

	// The manifest file name. If not provided, the service will generate one automatically.
	ManifestName *string

	// The initial timestamp that the live output will start at, any content before this value will not be archived.
	OutputSnapTime *int64

	// ISO 8601 time between 1 minute to the duration of archiveWindowLength to control seek-able window length during Live. The
	// service won't use this property once LiveOutput stops. The archived VOD will
	// have full content with original ArchiveWindowLength. For example, use PT1H30M to indicate 1 hour and 30 minutes of rewind
	// window length. Service will use implicit default value 30m only if Live Event
	// enables LL.
	RewindWindowLength *string

	// READ-ONLY; The creation time the live output.
	Created *time.Time

	// READ-ONLY; The time the live output was last modified.
	LastModified *time.Time

	// READ-ONLY; The provisioning state of the live output.
	ProvisioningState *string

	// READ-ONLY; The resource state of the live output.
	ResourceState *LiveOutputResourceState
}

LiveOutputProperties - The JSON object that contains the properties required to create a live output.

func (LiveOutputProperties) MarshalJSON

func (l LiveOutputProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type LiveOutputProperties.

func (*LiveOutputProperties) UnmarshalJSON

func (l *LiveOutputProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type LiveOutputProperties.

type LiveOutputResourceState

type LiveOutputResourceState string

LiveOutputResourceState - The resource state of the live output.

const (
	// LiveOutputResourceStateCreating - Live output is being created. No content is archived in the asset until the live output
	// is in running state.
	LiveOutputResourceStateCreating LiveOutputResourceState = "Creating"
	// LiveOutputResourceStateDeleting - Live output is being deleted. The live asset is being converted from live to on-demand
	// asset. Any streaming URLs created on the live output asset continue to work.
	LiveOutputResourceStateDeleting LiveOutputResourceState = "Deleting"
	// LiveOutputResourceStateRunning - Live output is running and archiving live streaming content to the asset if there is valid
	// input from a contribution encoder.
	LiveOutputResourceStateRunning LiveOutputResourceState = "Running"
)

func PossibleLiveOutputResourceStateValues

func PossibleLiveOutputResourceStateValues() []LiveOutputResourceState

PossibleLiveOutputResourceStateValues returns the possible values for the LiveOutputResourceState const type.

type LiveOutputsClient

type LiveOutputsClient struct {
	// contains filtered or unexported fields
}

LiveOutputsClient contains the methods for the LiveOutputs group. Don't use this type directly, use NewLiveOutputsClient() instead.

func NewLiveOutputsClient

func NewLiveOutputsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LiveOutputsClient, error)

NewLiveOutputsClient creates a new instance of LiveOutputsClient with the specified values.

  • subscriptionID - The unique identifier for a Microsoft Azure subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*LiveOutputsClient) AsyncOperation added in v3.1.0

func (client *LiveOutputsClient) AsyncOperation(ctx context.Context, resourceGroupName string, accountName string, operationID string, options *LiveOutputsClientAsyncOperationOptions) (LiveOutputsClientAsyncOperationResponse, error)

AsyncOperation - Get a Live Output operation status. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • operationID - The ID of an ongoing async operation.
  • options - LiveOutputsClientAsyncOperationOptions contains the optional parameters for the LiveOutputsClient.AsyncOperation method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-08-01/examples/async-operation-result.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewLiveOutputsClient().AsyncOperation(ctx, "mediaresources", "slitestmedia10", "62e4d893-d233-4005-988e-a428d9f77076", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.AsyncOperationResult = armmediaservices.AsyncOperationResult{
// 	Name: to.Ptr("62e4d893-d233-4005-988e-a428d9f77076"),
// 	Error: &armmediaservices.ErrorDetail{
// 		Code: to.Ptr("None"),
// 		Target: to.Ptr("d7aea790-8acb-40b9-8f9f-21cc37c9e519"),
// 	},
// 	Status: to.Ptr(armmediaservices.AsyncOperationStatusInProgress),
// }
Output:

func (*LiveOutputsClient) BeginCreate

func (client *LiveOutputsClient) BeginCreate(ctx context.Context, resourceGroupName string, accountName string, liveEventName string, liveOutputName string, parameters LiveOutput, options *LiveOutputsClientBeginCreateOptions) (*runtime.Poller[LiveOutputsClientCreateResponse], error)

BeginCreate - Creates a new live output. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • liveEventName - The name of the live event, maximum length is 32.
  • liveOutputName - The name of the live output.
  • parameters - Live Output properties needed for creation.
  • options - LiveOutputsClientBeginCreateOptions contains the optional parameters for the LiveOutputsClient.BeginCreate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-08-01/examples/liveoutput-create.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewLiveOutputsClient().BeginCreate(ctx, "mediaresources", "slitestmedia10", "myLiveEvent1", "myLiveOutput1", armmediaservices.LiveOutput{
	Properties: &armmediaservices.LiveOutputProperties{
		Description:         to.Ptr("test live output 1"),
		ArchiveWindowLength: to.Ptr("PT5M"),
		AssetName:           to.Ptr("6f3264f5-a189-48b4-a29a-a40f22575212"),
		Hls: &armmediaservices.Hls{
			FragmentsPerTsSegment: to.Ptr[int32](5),
		},
		ManifestName:       to.Ptr("testmanifest"),
		RewindWindowLength: to.Ptr("PT4M"),
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.LiveOutput = armmediaservices.LiveOutput{
// 	Name: to.Ptr("myLiveOutput1"),
// 	Type: to.Ptr("Microsoft.Media/mediaservices/liveevents/liveoutputs"),
// 	ID: to.Ptr("/subscriptions/0a6ec948-5a62-437d-b9df-934dc7c1b722/resourceGroups/mediaresources/providers/Microsoft.Media/mediaservices/slitestmedia10/liveevents/myLiveEvent1/liveoutputs/myLiveOutput1"),
// 	Properties: &armmediaservices.LiveOutputProperties{
// 		Description: to.Ptr("test live output 1"),
// 		ArchiveWindowLength: to.Ptr("PT5M"),
// 		AssetName: to.Ptr("6f3264f5-a189-48b4-a29a-a40f22575212"),
// 		Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-03T02:25:09.943Z"); return t}()),
// 		Hls: &armmediaservices.Hls{
// 			FragmentsPerTsSegment: to.Ptr[int32](5),
// 		},
// 		LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-03T02:25:09.943Z"); return t}()),
// 		ManifestName: to.Ptr("testmanifest"),
// 		OutputSnapTime: to.Ptr[int64](0),
// 		ProvisioningState: to.Ptr("Succeeded"),
// 		ResourceState: to.Ptr(armmediaservices.LiveOutputResourceState("Stopped")),
// 		RewindWindowLength: to.Ptr("PT4M"),
// 	},
// 	SystemData: &armmediaservices.SystemData{
// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-03T02:25:09.943Z"); return t}()),
// 		CreatedBy: to.Ptr("example@microsoft.com"),
// 		CreatedByType: to.Ptr(armmediaservices.CreatedByTypeUser),
// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-03T02:25:09.943Z"); return t}()),
// 		LastModifiedBy: to.Ptr("example@microsoft.com"),
// 		LastModifiedByType: to.Ptr(armmediaservices.CreatedByTypeUser),
// 	},
// }
Output:

func (*LiveOutputsClient) BeginDelete

func (client *LiveOutputsClient) BeginDelete(ctx context.Context, resourceGroupName string, accountName string, liveEventName string, liveOutputName string, options *LiveOutputsClientBeginDeleteOptions) (*runtime.Poller[LiveOutputsClientDeleteResponse], error)

BeginDelete - Deletes a live output. Deleting a live output does not delete the asset the live output is writing to. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • liveEventName - The name of the live event, maximum length is 32.
  • liveOutputName - The name of the live output.
  • options - LiveOutputsClientBeginDeleteOptions contains the optional parameters for the LiveOutputsClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-08-01/examples/liveoutput-delete.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewLiveOutputsClient().BeginDelete(ctx, "mediaresources", "slitestmedia10", "myLiveEvent1", "myLiveOutput1", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
_, err = poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
Output:

func (*LiveOutputsClient) Get

func (client *LiveOutputsClient) Get(ctx context.Context, resourceGroupName string, accountName string, liveEventName string, liveOutputName string, options *LiveOutputsClientGetOptions) (LiveOutputsClientGetResponse, error)

Get - Gets a live output. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • liveEventName - The name of the live event, maximum length is 32.
  • liveOutputName - The name of the live output.
  • options - LiveOutputsClientGetOptions contains the optional parameters for the LiveOutputsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-08-01/examples/liveoutput-list-by-name.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewLiveOutputsClient().Get(ctx, "mediaresources", "slitestmedia10", "myLiveEvent1", "myLiveOutput1", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.LiveOutput = armmediaservices.LiveOutput{
// 	Name: to.Ptr("myLiveOutput1"),
// 	Type: to.Ptr("Microsoft.Media/mediaservices/liveevents/liveoutputs"),
// 	ID: to.Ptr("/subscriptions/0a6ec948-5a62-437d-b9df-934dc7c1b722/resourceGroups/mediaresources/providers/Microsoft.Media/mediaservices/slitestmedia10/liveevents/myLiveEvent1/liveoutputs/myLiveOutput1"),
// 	Properties: &armmediaservices.LiveOutputProperties{
// 		ArchiveWindowLength: to.Ptr("PT5M"),
// 		AssetName: to.Ptr("cb2ae0bc-677a-4830-9c8e-06ce4c4cb607"),
// 		Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "1-01-01T08:00:00.000Z"); return t}()),
// 		Hls: &armmediaservices.Hls{
// 			FragmentsPerTsSegment: to.Ptr[int32](5),
// 		},
// 		LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "1-01-01T08:00:00.000Z"); return t}()),
// 		ManifestName: to.Ptr("fc7096f5-c488-4b86-8302-f3bfde53fc27"),
// 		OutputSnapTime: to.Ptr[int64](0),
// 		ProvisioningState: to.Ptr("Succeeded"),
// 		ResourceState: to.Ptr(armmediaservices.LiveOutputResourceStateRunning),
// 		RewindWindowLength: to.Ptr("PT4M"),
// 	},
// 	SystemData: &armmediaservices.SystemData{
// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "1-01-01T08:00:00.000Z"); return t}()),
// 		CreatedBy: to.Ptr("example@microsoft.com"),
// 		CreatedByType: to.Ptr(armmediaservices.CreatedByTypeUser),
// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "1-01-01T08:00:00.000Z"); return t}()),
// 		LastModifiedBy: to.Ptr("example@microsoft.com"),
// 		LastModifiedByType: to.Ptr(armmediaservices.CreatedByTypeUser),
// 	},
// }
Output:

func (*LiveOutputsClient) NewListPager

func (client *LiveOutputsClient) NewListPager(resourceGroupName string, accountName string, liveEventName string, options *LiveOutputsClientListOptions) *runtime.Pager[LiveOutputsClientListResponse]

NewListPager - Lists the live outputs of a live event.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • liveEventName - The name of the live event, maximum length is 32.
  • options - LiveOutputsClientListOptions contains the optional parameters for the LiveOutputsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-08-01/examples/liveoutput-list-all.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewLiveOutputsClient().NewListPager("mediaresources", "slitestmedia10", "myLiveEvent1", nil)
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.LiveOutputListResult = armmediaservices.LiveOutputListResult{
	// 	Value: []*armmediaservices.LiveOutput{
	// 		{
	// 			Name: to.Ptr("liveoutput1"),
	// 			Type: to.Ptr("Microsoft.Media/mediaservices/liveevents/liveoutputs"),
	// 			ID: to.Ptr("/subscriptions/0a6ec948-5a62-437d-b9df-934dc7c1b722/resourceGroups/mediaresources/providers/Microsoft.Media/mediaservices/slitestmedia10/liveevents/myLiveEvent1/liveoutputs/"),
	// 			Properties: &armmediaservices.LiveOutputProperties{
	// 				ArchiveWindowLength: to.Ptr("PT5M"),
	// 				AssetName: to.Ptr("95dafce4-5320-464c-8597-909373854119"),
	// 				Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "1-01-01T08:00:00.000Z"); return t}()),
	// 				Hls: &armmediaservices.Hls{
	// 					FragmentsPerTsSegment: to.Ptr[int32](5),
	// 				},
	// 				LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "1-01-01T08:00:00.000Z"); return t}()),
	// 				ManifestName: to.Ptr("c3a23d4b-02a6-4937-a1ad-6416f463fdca"),
	// 				OutputSnapTime: to.Ptr[int64](0),
	// 				ProvisioningState: to.Ptr("Succeeded"),
	// 				ResourceState: to.Ptr(armmediaservices.LiveOutputResourceStateRunning),
	// 				RewindWindowLength: to.Ptr("PT4M"),
	// 			},
	// 			SystemData: &armmediaservices.SystemData{
	// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "1-01-01T08:00:00.000Z"); return t}()),
	// 				CreatedBy: to.Ptr("example@microsoft.com"),
	// 				CreatedByType: to.Ptr(armmediaservices.CreatedByTypeUser),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "1-01-01T08:00:00.000Z"); return t}()),
	// 				LastModifiedBy: to.Ptr("example@microsoft.com"),
	// 				LastModifiedByType: to.Ptr(armmediaservices.CreatedByTypeUser),
	// 			},
	// 	}},
	// }
}
Output:

func (*LiveOutputsClient) OperationLocation added in v3.1.0

func (client *LiveOutputsClient) OperationLocation(ctx context.Context, resourceGroupName string, accountName string, liveEventName string, liveOutputName string, operationID string, options *LiveOutputsClientOperationLocationOptions) (LiveOutputsClientOperationLocationResponse, error)

OperationLocation - Get a Live Output operation status. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • liveEventName - The name of the live event, maximum length is 32.
  • liveOutputName - The name of the live output.
  • operationID - The ID of an ongoing async operation.
  • options - LiveOutputsClientOperationLocationOptions contains the optional parameters for the LiveOutputsClient.OperationLocation method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-08-01/examples/liveoutput-operation-location.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewLiveOutputsClient().OperationLocation(ctx, "mediaresources", "slitestmedia10", "myLiveEvent1", "myLiveOutput1", "62e4d893-d233-4005-988e-a428d9f77076", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.LiveOutput = armmediaservices.LiveOutput{
// 	Name: to.Ptr("myLiveOutput1"),
// 	Type: to.Ptr("Microsoft.Media/mediaservices/liveevents/liveoutputs"),
// 	ID: to.Ptr("/subscriptions/0a6ec948-5a62-437d-b9df-934dc7c1b722/resourceGroups/mediaresources/providers/Microsoft.Media/mediaservices/slitestmedia10/liveevents/myLiveEvent1/liveoutputs/myLiveOutput1"),
// 	Properties: &armmediaservices.LiveOutputProperties{
// 		ArchiveWindowLength: to.Ptr("PT5M"),
// 		AssetName: to.Ptr("cb2ae0bc-677a-4830-9c8e-06ce4c4cb607"),
// 		Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "1-01-01T08:00:00.000Z"); return t}()),
// 		Hls: &armmediaservices.Hls{
// 			FragmentsPerTsSegment: to.Ptr[int32](5),
// 		},
// 		LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "1-01-01T08:00:00.000Z"); return t}()),
// 		ManifestName: to.Ptr("fc7096f5-c488-4b86-8302-f3bfde53fc27"),
// 		OutputSnapTime: to.Ptr[int64](0),
// 		ProvisioningState: to.Ptr("Succeeded"),
// 		ResourceState: to.Ptr(armmediaservices.LiveOutputResourceStateRunning),
// 		RewindWindowLength: to.Ptr("PT5M"),
// 	},
// 	SystemData: &armmediaservices.SystemData{
// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "1-01-01T08:00:00.000Z"); return t}()),
// 		CreatedBy: to.Ptr("example@microsoft.com"),
// 		CreatedByType: to.Ptr(armmediaservices.CreatedByTypeUser),
// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "1-01-01T08:00:00.000Z"); return t}()),
// 		LastModifiedBy: to.Ptr("example@microsoft.com"),
// 		LastModifiedByType: to.Ptr(armmediaservices.CreatedByTypeUser),
// 	},
// }
Output:

type LiveOutputsClientAsyncOperationOptions added in v3.1.0

type LiveOutputsClientAsyncOperationOptions struct {
}

LiveOutputsClientAsyncOperationOptions contains the optional parameters for the LiveOutputsClient.AsyncOperation method.

type LiveOutputsClientAsyncOperationResponse added in v3.1.0

type LiveOutputsClientAsyncOperationResponse struct {
	// The status of an async operation.
	AsyncOperationResult
}

LiveOutputsClientAsyncOperationResponse contains the response from method LiveOutputsClient.AsyncOperation.

type LiveOutputsClientBeginCreateOptions

type LiveOutputsClientBeginCreateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

LiveOutputsClientBeginCreateOptions contains the optional parameters for the LiveOutputsClient.BeginCreate method.

type LiveOutputsClientBeginDeleteOptions

type LiveOutputsClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

LiveOutputsClientBeginDeleteOptions contains the optional parameters for the LiveOutputsClient.BeginDelete method.

type LiveOutputsClientCreateResponse

type LiveOutputsClientCreateResponse struct {
	// The Live Output.
	LiveOutput
}

LiveOutputsClientCreateResponse contains the response from method LiveOutputsClient.BeginCreate.

type LiveOutputsClientDeleteResponse

type LiveOutputsClientDeleteResponse struct {
}

LiveOutputsClientDeleteResponse contains the response from method LiveOutputsClient.BeginDelete.

type LiveOutputsClientGetOptions

type LiveOutputsClientGetOptions struct {
}

LiveOutputsClientGetOptions contains the optional parameters for the LiveOutputsClient.Get method.

type LiveOutputsClientGetResponse

type LiveOutputsClientGetResponse struct {
	// The Live Output.
	LiveOutput
}

LiveOutputsClientGetResponse contains the response from method LiveOutputsClient.Get.

type LiveOutputsClientListOptions

type LiveOutputsClientListOptions struct {
}

LiveOutputsClientListOptions contains the optional parameters for the LiveOutputsClient.NewListPager method.

type LiveOutputsClientListResponse

type LiveOutputsClientListResponse struct {
	// The LiveOutput list result.
	LiveOutputListResult
}

LiveOutputsClientListResponse contains the response from method LiveOutputsClient.NewListPager.

type LiveOutputsClientOperationLocationOptions added in v3.1.0

type LiveOutputsClientOperationLocationOptions struct {
}

LiveOutputsClientOperationLocationOptions contains the optional parameters for the LiveOutputsClient.OperationLocation method.

type LiveOutputsClientOperationLocationResponse added in v3.1.0

type LiveOutputsClientOperationLocationResponse struct {
	// The Live Output.
	LiveOutput
}

LiveOutputsClientOperationLocationResponse contains the response from method LiveOutputsClient.OperationLocation.

type LocationsClient

type LocationsClient struct {
	// contains filtered or unexported fields
}

LocationsClient contains the methods for the Locations group. Don't use this type directly, use NewLocationsClient() instead.

func NewLocationsClient

func NewLocationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LocationsClient, error)

NewLocationsClient creates a new instance of LocationsClient with the specified values.

  • subscriptionID - The unique identifier for a Microsoft Azure subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*LocationsClient) CheckNameAvailability

CheckNameAvailability - Checks whether the Media Service resource name is available. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • locationName - Location name.
  • parameters - The request parameters
  • options - LocationsClientCheckNameAvailabilityOptions contains the optional parameters for the LocationsClient.CheckNameAvailability method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Accounts/stable/2021-11-01/examples/accounts-check-name-availability.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewLocationsClient().CheckNameAvailability(ctx, "japanwest", armmediaservices.CheckNameAvailabilityInput{
	Name: to.Ptr("contosotv"),
	Type: to.Ptr("videoAnalyzers"),
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.EntityNameAvailabilityCheckOutput = armmediaservices.EntityNameAvailabilityCheckOutput{
// 	Message: to.Ptr(""),
// 	NameAvailable: to.Ptr(true),
// 	Reason: to.Ptr("None"),
// }
Output:

type LocationsClientCheckNameAvailabilityOptions

type LocationsClientCheckNameAvailabilityOptions struct {
}

LocationsClientCheckNameAvailabilityOptions contains the optional parameters for the LocationsClient.CheckNameAvailability method.

type LocationsClientCheckNameAvailabilityResponse

type LocationsClientCheckNameAvailabilityResponse struct {
	// The response from the check name availability request.
	EntityNameAvailabilityCheckOutput
}

LocationsClientCheckNameAvailabilityResponse contains the response from method LocationsClient.CheckNameAvailability.

type LogSpecification

type LogSpecification struct {
	// READ-ONLY; The time range for requests in each blob.
	BlobDuration *string

	// READ-ONLY; The diagnostic log category display name.
	DisplayName *string

	// READ-ONLY; The diagnostic log category name.
	Name *string
}

LogSpecification - A diagnostic log emitted by service.

func (LogSpecification) MarshalJSON

func (l LogSpecification) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type LogSpecification.

func (*LogSpecification) UnmarshalJSON

func (l *LogSpecification) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type LogSpecification.

type MediaFilterProperties

type MediaFilterProperties struct {
	// The first quality.
	FirstQuality *FirstQuality

	// The presentation time range.
	PresentationTimeRange *PresentationTimeRange

	// The tracks selection conditions.
	Tracks []*FilterTrackSelection
}

MediaFilterProperties - The Media Filter properties.

func (MediaFilterProperties) MarshalJSON

func (m MediaFilterProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MediaFilterProperties.

func (*MediaFilterProperties) UnmarshalJSON

func (m *MediaFilterProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MediaFilterProperties.

type MediaService

type MediaService struct {
	// REQUIRED; The geo-location where the resource lives
	Location *string

	// The Managed Identity for the Media Services account.
	Identity *MediaServiceIdentity

	// The resource properties.
	Properties *MediaServiceProperties

	// Resource tags.
	Tags map[string]*string

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; The system metadata relating to this resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

MediaService - A Media Services account.

func (MediaService) MarshalJSON

func (m MediaService) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MediaService.

func (*MediaService) UnmarshalJSON

func (m *MediaService) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MediaService.

type MediaServiceCollection

type MediaServiceCollection struct {
	// A link to the next page of the collection (when the collection contains too many results to return in one response).
	ODataNextLink *string

	// A collection of MediaService items.
	Value []*MediaService
}

MediaServiceCollection - A collection of MediaService items.

func (MediaServiceCollection) MarshalJSON

func (m MediaServiceCollection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MediaServiceCollection.

func (*MediaServiceCollection) UnmarshalJSON

func (m *MediaServiceCollection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MediaServiceCollection.

type MediaServiceIdentity

type MediaServiceIdentity struct {
	// REQUIRED; The identity type.
	Type *string

	// The user assigned managed identities.
	UserAssignedIdentities map[string]*UserAssignedManagedIdentity

	// READ-ONLY; The Principal ID of the identity.
	PrincipalID *string

	// READ-ONLY; The Tenant ID of the identity.
	TenantID *string
}

func (MediaServiceIdentity) MarshalJSON

func (m MediaServiceIdentity) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MediaServiceIdentity.

func (*MediaServiceIdentity) UnmarshalJSON

func (m *MediaServiceIdentity) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MediaServiceIdentity.

type MediaServiceOperationStatus

type MediaServiceOperationStatus struct {
	// REQUIRED; Operation identifier.
	Name *string

	// REQUIRED; Operation status.
	Status *string

	// Operation end time.
	EndTime *time.Time

	// The error detail.
	Error *ErrorDetail

	// Operation resource ID.
	ID *string

	// Operation start time.
	StartTime *time.Time
}

MediaServiceOperationStatus - Status of media service operation.

func (MediaServiceOperationStatus) MarshalJSON

func (m MediaServiceOperationStatus) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MediaServiceOperationStatus.

func (*MediaServiceOperationStatus) UnmarshalJSON

func (m *MediaServiceOperationStatus) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MediaServiceOperationStatus.

type MediaServiceProperties

type MediaServiceProperties struct {
	// The account encryption properties.
	Encryption *AccountEncryption

	// The Key Delivery properties for Media Services account.
	KeyDelivery *KeyDelivery

	// Whether or not public network access is allowed for resources under the Media Services account.
	PublicNetworkAccess *PublicNetworkAccess

	// The storage accounts for this resource.
	StorageAccounts       []*StorageAccount
	StorageAuthentication *StorageAuthentication

	// READ-ONLY; The Media Services account ID.
	MediaServiceID *string

	// READ-ONLY; The Private Endpoint Connections created for the Media Service account.
	PrivateEndpointConnections []*PrivateEndpointConnection

	// READ-ONLY; Provisioning state of the Media Services account.
	ProvisioningState *ProvisioningState
}

MediaServiceProperties - Properties of the Media Services account.

func (MediaServiceProperties) MarshalJSON

func (m MediaServiceProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MediaServiceProperties.

func (*MediaServiceProperties) UnmarshalJSON

func (m *MediaServiceProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MediaServiceProperties.

type MediaServiceUpdate

type MediaServiceUpdate struct {
	// The Managed Identity for the Media Services account.
	Identity *MediaServiceIdentity

	// The resource properties.
	Properties *MediaServiceProperties

	// Resource tags.
	Tags map[string]*string
}

MediaServiceUpdate - A Media Services account update.

func (MediaServiceUpdate) MarshalJSON

func (m MediaServiceUpdate) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MediaServiceUpdate.

func (*MediaServiceUpdate) UnmarshalJSON

func (m *MediaServiceUpdate) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MediaServiceUpdate.

type MetricAggregationType

type MetricAggregationType string

MetricAggregationType - The metric aggregation type

const (
	// MetricAggregationTypeAverage - The average.
	MetricAggregationTypeAverage MetricAggregationType = "Average"
	// MetricAggregationTypeCount - The count of a number of items, usually requests.
	MetricAggregationTypeCount MetricAggregationType = "Count"
	// MetricAggregationTypeTotal - The sum.
	MetricAggregationTypeTotal MetricAggregationType = "Total"
)

func PossibleMetricAggregationTypeValues

func PossibleMetricAggregationTypeValues() []MetricAggregationType

PossibleMetricAggregationTypeValues returns the possible values for the MetricAggregationType const type.

type MetricDimension

type MetricDimension struct {
	// READ-ONLY; The display name for the dimension.
	DisplayName *string

	// READ-ONLY; The metric dimension name.
	Name *string

	// READ-ONLY; Whether to export metric to shoebox.
	ToBeExportedForShoebox *bool
}

MetricDimension - A metric dimension.

func (MetricDimension) MarshalJSON

func (m MetricDimension) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MetricDimension.

func (*MetricDimension) UnmarshalJSON

func (m *MetricDimension) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MetricDimension.

type MetricSpecification

type MetricSpecification struct {
	// Supported aggregation types.
	SupportedAggregationTypes []*string

	// READ-ONLY; The metric aggregation type
	AggregationType *MetricAggregationType

	// READ-ONLY; The metric dimensions.
	Dimensions []*MetricDimension

	// READ-ONLY; The metric display description.
	DisplayDescription *string

	// READ-ONLY; The metric display name.
	DisplayName *string

	// READ-ONLY; Indicates whether regional MDM account is enabled.
	EnableRegionalMdmAccount *bool

	// READ-ONLY; The metric lock aggregation type
	LockAggregationType *MetricAggregationType

	// READ-ONLY; The metric name.
	Name *string

	// READ-ONLY; The source MDM account.
	SourceMdmAccount *string

	// READ-ONLY; The source MDM namespace.
	SourceMdmNamespace *string

	// READ-ONLY; The supported time grain types.
	SupportedTimeGrainTypes []*string

	// READ-ONLY; The metric unit
	Unit *MetricUnit
}

MetricSpecification - A metric emitted by service.

func (MetricSpecification) MarshalJSON

func (m MetricSpecification) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MetricSpecification.

func (*MetricSpecification) UnmarshalJSON

func (m *MetricSpecification) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MetricSpecification.

type MetricUnit

type MetricUnit string

MetricUnit - The metric unit

const (
	// MetricUnitBytes - The number of bytes.
	MetricUnitBytes MetricUnit = "Bytes"
	// MetricUnitCount - The count.
	MetricUnitCount MetricUnit = "Count"
	// MetricUnitMilliseconds - The number of milliseconds.
	MetricUnitMilliseconds MetricUnit = "Milliseconds"
)

func PossibleMetricUnitValues

func PossibleMetricUnitValues() []MetricUnit

PossibleMetricUnitValues returns the possible values for the MetricUnit const type.

type Mp4Format

type Mp4Format struct {
	// REQUIRED; The file naming pattern used for the creation of output files. The following macros are supported in the file
	// name: {Basename} - An expansion macro that will use the name of the input video file. If
	// the base name(the file suffix is not included) of the input video file is less than 32 characters long, the base name of
	// input video files will be used. If the length of base name of the input video
	// file exceeds 32 characters, the base name is truncated to the first 32 characters in total length. {Extension} - The appropriate
	// extension for this format. {Label} - The label assigned to the
	// codec/layer. {Index} - A unique index for thumbnails. Only applicable to thumbnails. {AudioStream} - string "Audio" plus
	// audio stream number(start from 1). {Bitrate} - The audio/video bitrate in kbps.
	// Not applicable to thumbnails. {Codec} - The type of the audio/video codec. {Resolution} - The video resolution. Any unsubstituted
	// macros will be collapsed and removed from the filename.
	FilenamePattern *string

	// REQUIRED; The discriminator for derived types.
	ODataType *string

	// The list of output files to produce. Each entry in the list is a set of audio and video layer labels to be muxed together
	// .
	OutputFiles []*OutputFile
}

Mp4Format - Describes the properties for an output ISO MP4 file.

func (*Mp4Format) GetFormat

func (m *Mp4Format) GetFormat() *Format

GetFormat implements the FormatClassification interface for type Mp4Format.

func (*Mp4Format) GetMultiBitrateFormat

func (m *Mp4Format) GetMultiBitrateFormat() *MultiBitrateFormat

GetMultiBitrateFormat implements the MultiBitrateFormatClassification interface for type Mp4Format.

func (Mp4Format) MarshalJSON

func (m Mp4Format) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Mp4Format.

func (*Mp4Format) UnmarshalJSON

func (m *Mp4Format) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Mp4Format.

type MultiBitrateFormat

type MultiBitrateFormat struct {
	// REQUIRED; The file naming pattern used for the creation of output files. The following macros are supported in the file
	// name: {Basename} - An expansion macro that will use the name of the input video file. If
	// the base name(the file suffix is not included) of the input video file is less than 32 characters long, the base name of
	// input video files will be used. If the length of base name of the input video
	// file exceeds 32 characters, the base name is truncated to the first 32 characters in total length. {Extension} - The appropriate
	// extension for this format. {Label} - The label assigned to the
	// codec/layer. {Index} - A unique index for thumbnails. Only applicable to thumbnails. {AudioStream} - string "Audio" plus
	// audio stream number(start from 1). {Bitrate} - The audio/video bitrate in kbps.
	// Not applicable to thumbnails. {Codec} - The type of the audio/video codec. {Resolution} - The video resolution. Any unsubstituted
	// macros will be collapsed and removed from the filename.
	FilenamePattern *string

	// REQUIRED; The discriminator for derived types.
	ODataType *string

	// The list of output files to produce. Each entry in the list is a set of audio and video layer labels to be muxed together
	// .
	OutputFiles []*OutputFile
}

MultiBitrateFormat - Describes the properties for producing a collection of GOP aligned multi-bitrate files. The default behavior is to produce one output file for each video layer which is muxed together with all the audios. The exact output files produced can be controlled by specifying the outputFiles collection.

func (*MultiBitrateFormat) GetFormat

func (m *MultiBitrateFormat) GetFormat() *Format

GetFormat implements the FormatClassification interface for type MultiBitrateFormat.

func (*MultiBitrateFormat) GetMultiBitrateFormat

func (m *MultiBitrateFormat) GetMultiBitrateFormat() *MultiBitrateFormat

GetMultiBitrateFormat implements the MultiBitrateFormatClassification interface for type MultiBitrateFormat.

func (MultiBitrateFormat) MarshalJSON

func (m MultiBitrateFormat) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MultiBitrateFormat.

func (*MultiBitrateFormat) UnmarshalJSON

func (m *MultiBitrateFormat) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MultiBitrateFormat.

type MultiBitrateFormatClassification

type MultiBitrateFormatClassification interface {
	FormatClassification
	// GetMultiBitrateFormat returns the MultiBitrateFormat content of the underlying type.
	GetMultiBitrateFormat() *MultiBitrateFormat
}

MultiBitrateFormatClassification provides polymorphic access to related types. Call the interface's GetMultiBitrateFormat() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *Mp4Format, *MultiBitrateFormat, *TransportStreamFormat

type NoEncryption

type NoEncryption struct {
	// Representing supported protocols
	EnabledProtocols *EnabledProtocols
}

NoEncryption - Class for NoEncryption scheme

func (NoEncryption) MarshalJSON

func (n NoEncryption) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type NoEncryption.

func (*NoEncryption) UnmarshalJSON

func (n *NoEncryption) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type NoEncryption.

type OnErrorType

type OnErrorType string

OnErrorType - A Transform can define more than one outputs. This property defines what the service should do when one output fails - either continue to produce other outputs, or, stop the other outputs. The overall Job state will not reflect failures of outputs that are specified with 'ContinueJob'. The default is 'StopProcessingJob'.

const (
	// OnErrorTypeContinueJob - Tells the service that if this TransformOutput fails, then allow any other TransformOutput to
	// continue.
	OnErrorTypeContinueJob OnErrorType = "ContinueJob"
	// OnErrorTypeStopProcessingJob - Tells the service that if this TransformOutput fails, then any other incomplete TransformOutputs
	// can be stopped.
	OnErrorTypeStopProcessingJob OnErrorType = "StopProcessingJob"
)

func PossibleOnErrorTypeValues

func PossibleOnErrorTypeValues() []OnErrorType

PossibleOnErrorTypeValues returns the possible values for the OnErrorType const type.

type Operation

type Operation struct {
	// REQUIRED; The operation name.
	Name *string

	// Indicates the action type.
	ActionType *ActionType

	// The operation display name.
	Display *OperationDisplay

	// Whether the operation applies to data-plane.
	IsDataAction *bool

	// Origin of the operation.
	Origin *string

	// Operation properties format.
	Properties *Properties
}

Operation - An operation.

func (Operation) MarshalJSON

func (o Operation) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Operation.

func (*Operation) UnmarshalJSON

func (o *Operation) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Operation.

type OperationCollection

type OperationCollection struct {
	// A collection of Operation items.
	Value []*Operation
}

OperationCollection - A collection of Operation items.

func (OperationCollection) MarshalJSON

func (o OperationCollection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OperationCollection.

func (*OperationCollection) UnmarshalJSON

func (o *OperationCollection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationCollection.

type OperationDisplay

type OperationDisplay struct {
	// The operation description.
	Description *string

	// The operation type.
	Operation *string

	// The service provider.
	Provider *string

	// Resource on which the operation is performed.
	Resource *string
}

OperationDisplay - Operation details.

func (OperationDisplay) MarshalJSON

func (o OperationDisplay) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OperationDisplay.

func (*OperationDisplay) UnmarshalJSON

func (o *OperationDisplay) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay.

type OperationResultsClient

type OperationResultsClient struct {
	// contains filtered or unexported fields
}

OperationResultsClient contains the methods for the MediaServicesOperationResults group. Don't use this type directly, use NewOperationResultsClient() instead.

func NewOperationResultsClient

func NewOperationResultsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationResultsClient, error)

NewOperationResultsClient creates a new instance of OperationResultsClient with the specified values.

  • subscriptionID - The unique identifier for a Microsoft Azure subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*OperationResultsClient) Get

Get - Get media service operation result. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • locationName - Location name.
  • operationID - Operation Id.
  • options - OperationResultsClientGetOptions contains the optional parameters for the OperationResultsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Accounts/stable/2021-11-01/examples/media-service-operation-result-by-id.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewOperationResultsClient().Get(ctx, "westus", "6FBA62C4-99B5-4FF8-9826-FC4744A8864F", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.MediaService = armmediaservices.MediaService{
// 	Name: to.Ptr("contosomovies"),
// 	Type: to.Ptr("Microsoft.Media/mediaServices"),
// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaServices/contosomovies"),
// 	Location: to.Ptr("South Central US"),
// 	Tags: map[string]*string{
// 		"key1": to.Ptr("value1"),
// 		"key2": to.Ptr("value2"),
// 	},
// 	Identity: &armmediaservices.MediaServiceIdentity{
// 		Type: to.Ptr("UserAssigned"),
// 		UserAssignedIdentities: map[string]*armmediaservices.UserAssignedManagedIdentity{
// 			"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": &armmediaservices.UserAssignedManagedIdentity{
// 				ClientID: to.Ptr("00000000-0000-0000-0000-000000000000"),
// 				PrincipalID: to.Ptr("00000000-0000-0000-0000-000000000000"),
// 			},
// 			"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2": &armmediaservices.UserAssignedManagedIdentity{
// 				ClientID: to.Ptr("00000000-0000-0000-0000-000000000000"),
// 				PrincipalID: to.Ptr("00000000-0000-0000-0000-000000000000"),
// 			},
// 		},
// 	},
// 	Properties: &armmediaservices.MediaServiceProperties{
// 		Encryption: &armmediaservices.AccountEncryption{
// 			Type: to.Ptr(armmediaservices.AccountEncryptionKeyTypeCustomerKey),
// 			Identity: &armmediaservices.ResourceIdentity{
// 				UseSystemAssignedIdentity: to.Ptr(false),
// 				UserAssignedIdentity: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1"),
// 			},
// 			KeyVaultProperties: &armmediaservices.KeyVaultProperties{
// 				CurrentKeyIdentifier: to.Ptr("https://keyvault.vault.azure.net/keys/key1/ver1"),
// 				KeyIdentifier: to.Ptr("https://keyvault.vault.azure.net/keys/key1"),
// 			},
// 		},
// 		KeyDelivery: &armmediaservices.KeyDelivery{
// 			AccessControl: &armmediaservices.AccessControl{
// 				DefaultAction: to.Ptr(armmediaservices.DefaultActionAllow),
// 			},
// 		},
// 		PrivateEndpointConnections: []*armmediaservices.PrivateEndpointConnection{
// 			{
// 				Name: to.Ptr("00000000-0000-0000-0000-000000000001"),
// 				Type: to.Ptr("Microsoft.Media/mediaservices/privateEndpointConnections"),
// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosotv/privateEndpointConnections/00000000-0000-0000-0000-000000000001"),
// 				Properties: &armmediaservices.PrivateEndpointConnectionProperties{
// 					PrivateEndpoint: &armmediaservices.PrivateEndpoint{
// 						ID: to.Ptr("/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/reosuceGroup1/providers/Microsoft.Network/privateEndpoints/pe1"),
// 					},
// 					PrivateLinkServiceConnectionState: &armmediaservices.PrivateLinkServiceConnectionState{
// 						Description: to.Ptr("test description"),
// 						Status: to.Ptr(armmediaservices.PrivateEndpointServiceConnectionStatusApproved),
// 					},
// 					ProvisioningState: to.Ptr(armmediaservices.PrivateEndpointConnectionProvisioningStateSucceeded),
// 				},
// 			},
// 			{
// 				Name: to.Ptr("00000000-0000-0000-0000-000000000002"),
// 				Type: to.Ptr("Microsoft.Media/mediaservices/privateEndpointConnections"),
// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosotv/privateEndpointConnections/00000000-0000-0000-0000-000000000002"),
// 				Properties: &armmediaservices.PrivateEndpointConnectionProperties{
// 					PrivateEndpoint: &armmediaservices.PrivateEndpoint{
// 						ID: to.Ptr("/subscriptions/22222222-2222-2222-2222-222222222222/resourceGroups/reosuceGroup2/providers/Microsoft.Network/privateEndpoints/pe2"),
// 					},
// 					PrivateLinkServiceConnectionState: &armmediaservices.PrivateLinkServiceConnectionState{
// 						Description: to.Ptr("test description"),
// 						Status: to.Ptr(armmediaservices.PrivateEndpointServiceConnectionStatusPending),
// 					},
// 					ProvisioningState: to.Ptr(armmediaservices.PrivateEndpointConnectionProvisioningStateSucceeded),
// 				},
// 		}},
// 		ProvisioningState: to.Ptr(armmediaservices.ProvisioningStateSucceeded),
// 		PublicNetworkAccess: to.Ptr(armmediaservices.PublicNetworkAccessEnabled),
// 		StorageAccounts: []*armmediaservices.StorageAccount{
// 			{
// 				Type: to.Ptr(armmediaservices.StorageAccountTypePrimary),
// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Storage/storageAccounts/contososportsstore"),
// 				Identity: &armmediaservices.ResourceIdentity{
// 					UseSystemAssignedIdentity: to.Ptr(false),
// 					UserAssignedIdentity: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1"),
// 				},
// 		}},
// 		StorageAuthentication: to.Ptr(armmediaservices.StorageAuthenticationManagedIdentity),
// 	},
// }
Output:

type OperationResultsClientGetOptions

type OperationResultsClientGetOptions struct {
}

OperationResultsClientGetOptions contains the optional parameters for the OperationResultsClient.Get method.

type OperationResultsClientGetResponse

type OperationResultsClientGetResponse struct {
	// A Media Services account.
	MediaService

	// AzureAsyncOperation contains the information returned from the Azure-AsyncOperation header response.
	AzureAsyncOperation *string

	// Location contains the information returned from the Location header response.
	Location *string

	// RetryAfter contains the information returned from the Retry-After header response.
	RetryAfter *int32
}

OperationResultsClientGetResponse contains the response from method OperationResultsClient.Get.

type OperationStatusesClient

type OperationStatusesClient struct {
	// contains filtered or unexported fields
}

OperationStatusesClient contains the methods for the MediaServicesOperationStatuses group. Don't use this type directly, use NewOperationStatusesClient() instead.

func NewOperationStatusesClient

func NewOperationStatusesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationStatusesClient, error)

NewOperationStatusesClient creates a new instance of OperationStatusesClient with the specified values.

  • subscriptionID - The unique identifier for a Microsoft Azure subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*OperationStatusesClient) Get

Get - Get media service operation status. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • locationName - Location name.
  • operationID - Operation ID.
  • options - OperationStatusesClientGetOptions contains the optional parameters for the OperationStatusesClient.Get method.
Example (GetStatusOfAsynchronousOperationWhenItIsCompleted)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Accounts/stable/2021-11-01/examples/media-service-operation-status-by-id-terminal-state.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewOperationStatusesClient().Get(ctx, "westus", "D612C429-2526-49D5-961B-885AE11406FD", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.MediaServiceOperationStatus = armmediaservices.MediaServiceOperationStatus{
// 	Name: to.Ptr("D612C429-2526-49D5-961B-885AE11406FD"),
// 	EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-01T20:56:36.002Z"); return t}()),
// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/locations/westus/MediaServicesOperationStatuses/D612C429-2526-49D5-961B-885AE11406FD"),
// 	StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-01T20:56:36.002Z"); return t}()),
// 	Status: to.Ptr("Succeeded"),
// }
Output:

Example (GetStatusOfAsynchronousOperationWhenItIsCompletedWithError)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Accounts/stable/2021-11-01/examples/media-service-operation-status-by-id-non-terminal-state-failed.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewOperationStatusesClient().Get(ctx, "westus", "D612C429-2526-49D5-961B-885AE11406FD", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.MediaServiceOperationStatus = armmediaservices.MediaServiceOperationStatus{
// 	Name: to.Ptr("D612C429-2526-49D5-961B-885AE11406FD"),
// 	EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-01T20:56:36.002Z"); return t}()),
// 	Error: &armmediaservices.ErrorDetail{
// 		Code: to.Ptr("BadRequest"),
// 		Message: to.Ptr("Storage account cannot be accessed."),
// 	},
// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/locations/westus/MediaServicesOperationStatuses/D612C429-2526-49D5-961B-885AE11406FD"),
// 	StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-01T20:56:36.002Z"); return t}()),
// 	Status: to.Ptr("Failed"),
// }
Output:

Example (GetStatusOfAsynchronousOperationWhenItIsOngoing)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Accounts/stable/2021-11-01/examples/media-service-operation-status-by-id-non-terminal-state.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewOperationStatusesClient().Get(ctx, "westus", "D612C429-2526-49D5-961B-885AE11406FD", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.MediaServiceOperationStatus = armmediaservices.MediaServiceOperationStatus{
// 	Name: to.Ptr("D612C429-2526-49D5-961B-885AE11406FD"),
// 	EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-01T20:56:36.002Z"); return t}()),
// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/locations/westus/MediaServicesOperationStatuses/D612C429-2526-49D5-961B-885AE11406FD"),
// 	StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-01T20:56:36.002Z"); return t}()),
// 	Status: to.Ptr("InProgress"),
// }
Output:

type OperationStatusesClientGetOptions

type OperationStatusesClientGetOptions struct {
}

OperationStatusesClientGetOptions contains the optional parameters for the OperationStatusesClient.Get method.

type OperationStatusesClientGetResponse

type OperationStatusesClientGetResponse struct {
	// Status of media service operation.
	MediaServiceOperationStatus
}

OperationStatusesClientGetResponse contains the response from method OperationStatusesClient.Get.

type OperationsClient

type OperationsClient struct {
	// contains filtered or unexported fields
}

OperationsClient contains the methods for the Operations group. Don't use this type directly, use NewOperationsClient() instead.

func NewOperationsClient

func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error)

NewOperationsClient creates a new instance of OperationsClient with the specified values.

  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*OperationsClient) List

List - Lists all the Media Services operations. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • options - OperationsClientListOptions contains the optional parameters for the OperationsClient.List method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Accounts/stable/2021-11-01/examples/operations-list-all.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewOperationsClient().List(ctx, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.OperationCollection = armmediaservices.OperationCollection{
// 	Value: []*armmediaservices.Operation{
// 		{
// 			Name: to.Ptr("Microsoft.Media/register/action"),
// 			Display: &armmediaservices.OperationDisplay{
// 				Description: to.Ptr("Registers the subscription for the Media Services resource provider and enables the creation of Media Services accounts"),
// 				Operation: to.Ptr("Registers the Media Services Resource Provider"),
// 				Provider: to.Ptr("Microsoft Media Services"),
// 				Resource: to.Ptr("Microsoft Media Services"),
// 			},
// 		},
// 		{
// 			Name: to.Ptr("Microsoft.Media/unregister/action"),
// 			Display: &armmediaservices.OperationDisplay{
// 				Description: to.Ptr("Unregisters the subscription for the Media Services resource provider"),
// 				Operation: to.Ptr("Unregisters the Media Services Resource Provider"),
// 				Provider: to.Ptr("Microsoft Media Services"),
// 				Resource: to.Ptr("Microsoft Media Services"),
// 			},
// 		},
// 		{
// 			Name: to.Ptr("Microsoft.Media/checknameavailability/action"),
// 			Display: &armmediaservices.OperationDisplay{
// 				Description: to.Ptr("Checks if a Media Services account name is available"),
// 				Operation: to.Ptr("Check Name Availability"),
// 				Provider: to.Ptr("Microsoft Media Services"),
// 				Resource: to.Ptr("Microsoft Media Services"),
// 			},
// 		},
// 		{
// 			Name: to.Ptr("Microsoft.Media/operations/read"),
// 			Display: &armmediaservices.OperationDisplay{
// 				Description: to.Ptr("Get Available Operations"),
// 				Operation: to.Ptr("Get Available Operations"),
// 				Provider: to.Ptr("Microsoft Media Services"),
// 				Resource: to.Ptr("Available Operations"),
// 			},
// 		},
// 		{
// 			Name: to.Ptr("Microsoft.Media/mediaservices/read"),
// 			Display: &armmediaservices.OperationDisplay{
// 				Description: to.Ptr("Read any Media Services Account"),
// 				Operation: to.Ptr("Read Media Services Account"),
// 				Provider: to.Ptr("Microsoft Media Services"),
// 				Resource: to.Ptr("Media Services Account"),
// 			},
// 		},
// 		{
// 			Name: to.Ptr("Microsoft.Media/mediaservices/write"),
// 			Display: &armmediaservices.OperationDisplay{
// 				Description: to.Ptr("Create or Update any Media Services Account"),
// 				Operation: to.Ptr("Create or Update Media Services Account"),
// 				Provider: to.Ptr("Microsoft Media Services"),
// 				Resource: to.Ptr("Media Services Account"),
// 			},
// 		},
// 		{
// 			Name: to.Ptr("Microsoft.Media/mediaservices/delete"),
// 			Display: &armmediaservices.OperationDisplay{
// 				Description: to.Ptr("Delete any Media Services Account"),
// 				Operation: to.Ptr("Delete Media Services Account"),
// 				Provider: to.Ptr("Microsoft Media Services"),
// 				Resource: to.Ptr("Media Services Account"),
// 			},
// 		},
// 		{
// 			Name: to.Ptr("Microsoft.Media/mediaservices/regenerateKey/action"),
// 			Display: &armmediaservices.OperationDisplay{
// 				Description: to.Ptr("Regenerate a Media Services ACS key"),
// 				Operation: to.Ptr("Regenerate Key"),
// 				Provider: to.Ptr("Microsoft Media Services"),
// 				Resource: to.Ptr("Media Services Account"),
// 			},
// 		},
// 		{
// 			Name: to.Ptr("Microsoft.Media/mediaservices/listKeys/action"),
// 			Display: &armmediaservices.OperationDisplay{
// 				Description: to.Ptr("List the ACS keys for the Media Services account"),
// 				Operation: to.Ptr("List Keys"),
// 				Provider: to.Ptr("Microsoft Media Services"),
// 				Resource: to.Ptr("Media Services Account"),
// 			},
// 		},
// 		{
// 			Name: to.Ptr("Microsoft.Media/mediaservices/syncStorageKeys/action"),
// 			Display: &armmediaservices.OperationDisplay{
// 				Description: to.Ptr("Synchronize the Storage Keys for an attached Azure Storage account"),
// 				Operation: to.Ptr("Synchronize Storage Keys"),
// 				Provider: to.Ptr("Microsoft Media Services"),
// 				Resource: to.Ptr("Media Services Account"),
// 			},
// 		},
// 		{
// 			Name: to.Ptr("Microsoft.Media/mediaservices/listEdgePolicies/action"),
// 			Display: &armmediaservices.OperationDisplay{
// 				Description: to.Ptr("List policies for an edge device."),
// 				Operation: to.Ptr("List policies for an edge device."),
// 				Provider: to.Ptr("Microsoft Media Services"),
// 				Resource: to.Ptr("Media Services Account"),
// 			},
// 		},
// 		{
// 			Name: to.Ptr("Microsoft.Media/mediaservices/PrivateEndpointConnectionsApproval/action"),
// 			Display: &armmediaservices.OperationDisplay{
// 				Description: to.Ptr("Approve Private Endpoint Connections"),
// 				Operation: to.Ptr("Approve Private Endpoint Connections"),
// 				Provider: to.Ptr("Microsoft Media Services"),
// 				Resource: to.Ptr("Media Services Account"),
// 			},
// 		},
// 		{
// 			Name: to.Ptr("Microsoft.Media/mediaservices/eventGridFilters/read"),
// 			Display: &armmediaservices.OperationDisplay{
// 				Description: to.Ptr("Read any Event Grid Filter"),
// 				Operation: to.Ptr("Read Event Grid Filter"),
// 				Provider: to.Ptr("Microsoft Media Services"),
// 				Resource: to.Ptr("Event Grid Filter"),
// 			},
// 		},
// 		{
// 			Name: to.Ptr("Microsoft.Media/mediaservices/eventGridFilters/write"),
// 			Display: &armmediaservices.OperationDisplay{
// 				Description: to.Ptr("Create or Update any Event Grid Filter"),
// 				Operation: to.Ptr("Create or Update Event Grid Filter"),
// 				Provider: to.Ptr("Microsoft Media Services"),
// 				Resource: to.Ptr("Event Grid Filter"),
// 			},
// 		},
// 		{
// 			Name: to.Ptr("Microsoft.Media/mediaservices/eventGridFilters/delete"),
// 			Display: &armmediaservices.OperationDisplay{
// 				Description: to.Ptr("Delete any Event Grid Filter"),
// 				Operation: to.Ptr("Delete Event Grid Filter"),
// 				Provider: to.Ptr("Microsoft Media Services"),
// 				Resource: to.Ptr("Event Grid Filter"),
// 			},
// 		},
// 		{
// 			Name: to.Ptr("Microsoft.Media/mediaservices/accountfilters/read"),
// 			Display: &armmediaservices.OperationDisplay{
// 				Description: to.Ptr("Read any Account Filter"),
// 				Operation: to.Ptr("Read Account Filter"),
// 				Provider: to.Ptr("Microsoft Media Services"),
// 				Resource: to.Ptr("Account Filter"),
// 			},
// 		},
// 		{
// 			Name: to.Ptr("Microsoft.Media/mediaservices/accountfilters/write"),
// 			Display: &armmediaservices.OperationDisplay{
// 				Description: to.Ptr("Create or Update any Account Filter"),
// 				Operation: to.Ptr("Create or Update Account Filter"),
// 				Provider: to.Ptr("Microsoft Media Services"),
// 				Resource: to.Ptr("Account Filter"),
// 			},
// 		},
// 		{
// 			Name: to.Ptr("Microsoft.Media/mediaservices/accountfilters/delete"),
// 			Display: &armmediaservices.OperationDisplay{
// 				Description: to.Ptr("Delete any Account Filter"),
// 				Operation: to.Ptr("Delete Account Filter"),
// 				Provider: to.Ptr("Microsoft Media Services"),
// 				Resource: to.Ptr("Account Filter"),
// 			},
// 		},
// 		{
// 			Name: to.Ptr("Microsoft.Media/mediaservices/assets/read"),
// 			Display: &armmediaservices.OperationDisplay{
// 				Description: to.Ptr("Read any Asset"),
// 				Operation: to.Ptr("Read Asset"),
// 				Provider: to.Ptr("Microsoft Media Services"),
// 				Resource: to.Ptr("Asset"),
// 			},
// 		},
// 		{
// 			Name: to.Ptr("Microsoft.Media/mediaservices/assets/write"),
// 			Display: &armmediaservices.OperationDisplay{
// 				Description: to.Ptr("Create or Update any Asset"),
// 				Operation: to.Ptr("Create or Update Asset"),
// 				Provider: to.Ptr("Microsoft Media Services"),
// 				Resource: to.Ptr("Asset"),
// 			},
// 		},
// 		{
// 			Name: to.Ptr("Microsoft.Media/mediaservices/assets/delete"),
// 			Display: &armmediaservices.OperationDisplay{
// 				Description: to.Ptr("Delete any Asset"),
// 				Operation: to.Ptr("Delete Asset"),
// 				Provider: to.Ptr("Microsoft Media Services"),
// 				Resource: to.Ptr("Asset"),
// 			},
// 		},
// 		{
// 			Name: to.Ptr("Microsoft.Media/mediaservices/assets/listContainerSas/action"),
// 			Display: &armmediaservices.OperationDisplay{
// 				Description: to.Ptr("List Asset Container SAS URLs"),
// 				Operation: to.Ptr("List Asset Container SAS URLs"),
// 				Provider: to.Ptr("Microsoft Media Services"),
// 				Resource: to.Ptr("Asset"),
// 			},
// 		},
// 		{
// 			Name: to.Ptr("Microsoft.Media/mediaservices/assets/getEncryptionKey/action"),
// 			Display: &armmediaservices.OperationDisplay{
// 				Description: to.Ptr("Get Asset Encryption Key"),
// 				Operation: to.Ptr("Get Asset Encryption Key"),
// 				Provider: to.Ptr("Microsoft Media Services"),
// 				Resource: to.Ptr("Asset"),
// 			},
// 		},
// 		{
// 			Name: to.Ptr("Microsoft.Media/mediaservices/assets/listStreamingLocators/action"),
// 			Display: &armmediaservices.OperationDisplay{
// 				Description: to.Ptr("List Streaming Locators for Asset"),
// 				Operation: to.Ptr("List Streaming Locators for Asset"),
// 				Provider: to.Ptr("Microsoft Media Services"),
// 				Resource: to.Ptr("Asset"),
// 			},
// 		},
// 		{
// 			Name: to.Ptr("Microsoft.Media/mediaservices/assets/assetfilters/read"),
// 			Display: &armmediaservices.OperationDisplay{
// 				Description: to.Ptr("Read any Asset Filter"),
// 				Operation: to.Ptr("Read Asset Filter"),
// 				Provider: to.Ptr("Microsoft Media Services"),
// 				Resource: to.Ptr("Asset Filter"),
// 			},
// 		},
// 		{
// 			Name: to.Ptr("Microsoft.Media/mediaservices/assets/assetfilters/write"),
// 			Display: &armmediaservices.OperationDisplay{
// 				Description: to.Ptr("Create or Update any Asset Filter"),
// 				Operation: to.Ptr("Create or Update Asset Filter"),
// 				Provider: to.Ptr("Microsoft Media Services"),
// 				Resource: to.Ptr("Asset Filter"),
// 			},
// 		},
// 		{
// 			Name: to.Ptr("Microsoft.Media/mediaservices/assets/assetfilters/delete"),
// 			Display: &armmediaservices.OperationDisplay{
// 				Description: to.Ptr("Delete any Asset Filter"),
// 				Operation: to.Ptr("Delete Asset Filter"),
// 				Provider: to.Ptr("Microsoft Media Services"),
// 				Resource: to.Ptr("Asset Filter"),
// 			},
// 		},
// 		{
// 			Name: to.Ptr("Microsoft.Media/mediaservices/streamingPolicies/read"),
// 			Display: &armmediaservices.OperationDisplay{
// 				Description: to.Ptr("Read any Streaming Policy"),
// 				Operation: to.Ptr("Read Streaming Policy"),
// 				Provider: to.Ptr("Microsoft Media Services"),
// 				Resource: to.Ptr("Streaming Policy"),
// 			},
// 		},
// 		{
// 			Name: to.Ptr("Microsoft.Media/mediaservices/streamingPolicies/write"),
// 			Display: &armmediaservices.OperationDisplay{
// 				Description: to.Ptr("Create or Update any Streaming Policy"),
// 				Operation: to.Ptr("Create or Update Streaming Policy"),
// 				Provider: to.Ptr("Microsoft Media Services"),
// 				Resource: to.Ptr("Streaming Policy"),
// 			},
// 		},
// 		{
// 			Name: to.Ptr("Microsoft.Media/mediaservices/streamingPolicies/delete"),
// 			Display: &armmediaservices.OperationDisplay{
// 				Description: to.Ptr("Delete any Streaming Policy"),
// 				Operation: to.Ptr("Delete Streaming Policy"),
// 				Provider: to.Ptr("Microsoft Media Services"),
// 				Resource: to.Ptr("Streaming Policy"),
// 			},
// 		},
// 		{
// 			Name: to.Ptr("Microsoft.Media/mediaservices/streamingLocators/read"),
// 			Display: &armmediaservices.OperationDisplay{
// 				Description: to.Ptr("Read any Streaming Locator"),
// 				Operation: to.Ptr("Read Streaming Locator"),
// 				Provider: to.Ptr("Microsoft Media Services"),
// 				Resource: to.Ptr("Streaming Locator"),
// 			},
// 		},
// 		{
// 			Name: to.Ptr("Microsoft.Media/mediaservices/streamingLocators/write"),
// 			Display: &armmediaservices.OperationDisplay{
// 				Description: to.Ptr("Create or Update any Streaming Locator"),
// 				Operation: to.Ptr("Create or Update Streaming Locator"),
// 				Provider: to.Ptr("Microsoft Media Services"),
// 				Resource: to.Ptr("Streaming Locator"),
// 			},
// 		},
// 		{
// 			Name: to.Ptr("Microsoft.Media/mediaservices/streamingLocators/delete"),
// 			Display: &armmediaservices.OperationDisplay{
// 				Description: to.Ptr("Delete any Streaming Locator"),
// 				Operation: to.Ptr("Delete Streaming Locator"),
// 				Provider: to.Ptr("Microsoft Media Services"),
// 				Resource: to.Ptr("Streaming Locator"),
// 			},
// 		},
// 		{
// 			Name: to.Ptr("Microsoft.Media/mediaservices/streamingLocators/listContentKeys/action"),
// 			Display: &armmediaservices.OperationDisplay{
// 				Description: to.Ptr("List Content Keys"),
// 				Operation: to.Ptr("List Content Keys"),
// 				Provider: to.Ptr("Microsoft Media Services"),
// 				Resource: to.Ptr("Streaming Locator"),
// 			},
// 		},
// 		{
// 			Name: to.Ptr("Microsoft.Media/mediaservices/streamingLocators/listPaths/action"),
// 			Display: &armmediaservices.OperationDisplay{
// 				Description: to.Ptr("List Paths"),
// 				Operation: to.Ptr("List Paths"),
// 				Provider: to.Ptr("Microsoft Media Services"),
// 				Resource: to.Ptr("Streaming Locator"),
// 			},
// 		},
// 		{
// 			Name: to.Ptr("Microsoft.Media/mediaservices/contentKeyPolicies/read"),
// 			Display: &armmediaservices.OperationDisplay{
// 				Description: to.Ptr("Read any Content Key Policy"),
// 				Operation: to.Ptr("Read Content Key Policy"),
// 				Provider: to.Ptr("Microsoft Media Services"),
// 				Resource: to.Ptr("Content Key Policy"),
// 			},
// 		},
// 		{
// 			Name: to.Ptr("Microsoft.Media/mediaservices/contentKeyPolicies/write"),
// 			Display: &armmediaservices.OperationDisplay{
// 				Description: to.Ptr("Create or Update any Content Key Policy"),
// 				Operation: to.Ptr("Create or Update Content Key Policy"),
// 				Provider: to.Ptr("Microsoft Media Services"),
// 				Resource: to.Ptr("Content Key Policy"),
// 			},
// 		},
// 		{
// 			Name: to.Ptr("Microsoft.Media/mediaservices/contentKeyPolicies/delete"),
// 			Display: &armmediaservices.OperationDisplay{
// 				Description: to.Ptr("Delete any Content Key Policy"),
// 				Operation: to.Ptr("Delete Content Key Policy"),
// 				Provider: to.Ptr("Microsoft Media Services"),
// 				Resource: to.Ptr("Content Key Policy"),
// 			},
// 		},
// 		{
// 			Name: to.Ptr("Microsoft.Media/mediaservices/contentKeyPolicies/getPolicyPropertiesWithSecrets/action"),
// 			Display: &armmediaservices.OperationDisplay{
// 				Description: to.Ptr("Get Policy Properties With Secrets"),
// 				Operation: to.Ptr("Get Policy Properties With Secrets"),
// 				Provider: to.Ptr("Microsoft Media Services"),
// 				Resource: to.Ptr("Content Key Policy"),
// 			},
// 		},
// 		{
// 			Name: to.Ptr("Microsoft.Media/mediaservices/transforms/read"),
// 			Display: &armmediaservices.OperationDisplay{
// 				Description: to.Ptr("Read any Transform"),
// 				Operation: to.Ptr("Read Transform"),
// 				Provider: to.Ptr("Microsoft Media Services"),
// 				Resource: to.Ptr("Transform"),
// 			},
// 		},
// 		{
// 			Name: to.Ptr("Microsoft.Media/mediaservices/transforms/write"),
// 			Display: &armmediaservices.OperationDisplay{
// 				Description: to.Ptr("Create or Update any Transform"),
// 				Operation: to.Ptr("Create or Update Transform"),
// 				Provider: to.Ptr("Microsoft Media Services"),
// 				Resource: to.Ptr("Transform"),
// 			},
// 		},
// 		{
// 			Name: to.Ptr("Microsoft.Media/mediaservices/transforms/delete"),
// 			Display: &armmediaservices.OperationDisplay{
// 				Description: to.Ptr("Delete any Transform"),
// 				Operation: to.Ptr("Delete Transform"),
// 				Provider: to.Ptr("Microsoft Media Services"),
// 				Resource: to.Ptr("Transform"),
// 			},
// 		},
// 		{
// 			Name: to.Ptr("Microsoft.Media/mediaservices/transforms/jobs/read"),
// 			Display: &armmediaservices.OperationDisplay{
// 				Description: to.Ptr("Read any Job"),
// 				Operation: to.Ptr("Read Job"),
// 				Provider: to.Ptr("Microsoft Media Services"),
// 				Resource: to.Ptr("Job"),
// 			},
// 		},
// 		{
// 			Name: to.Ptr("Microsoft.Media/mediaservices/transforms/jobs/write"),
// 			Display: &armmediaservices.OperationDisplay{
// 				Description: to.Ptr("Create or Update any Job"),
// 				Operation: to.Ptr("Create or Update Job"),
// 				Provider: to.Ptr("Microsoft Media Services"),
// 				Resource: to.Ptr("Job"),
// 			},
// 		},
// 		{
// 			Name: to.Ptr("Microsoft.Media/mediaservices/transforms/jobs/delete"),
// 			Display: &armmediaservices.OperationDisplay{
// 				Description: to.Ptr("Delete any Job"),
// 				Operation: to.Ptr("Delete Job"),
// 				Provider: to.Ptr("Microsoft Media Services"),
// 				Resource: to.Ptr("Job"),
// 			},
// 		},
// 		{
// 			Name: to.Ptr("Microsoft.Media/mediaservices/transforms/jobs/cancelJob/action"),
// 			Display: &armmediaservices.OperationDisplay{
// 				Description: to.Ptr("Cancel Job"),
// 				Operation: to.Ptr("Cancel Job"),
// 				Provider: to.Ptr("Microsoft Media Services"),
// 				Resource: to.Ptr("Job"),
// 			},
// 		},
// 		{
// 			Name: to.Ptr("Microsoft.Media/mediaservices/privateLinkResources/read"),
// 			Display: &armmediaservices.OperationDisplay{
// 				Description: to.Ptr("Read any Private Link Resource"),
// 				Operation: to.Ptr("Read Private Link Resource"),
// 				Provider: to.Ptr("Microsoft Media Services"),
// 				Resource: to.Ptr("PrivateLinkResource"),
// 			},
// 		},
// 		{
// 			Name: to.Ptr("Microsoft.Media/mediaservices/privateEndpointConnectionProxies/read"),
// 			Display: &armmediaservices.OperationDisplay{
// 				Description: to.Ptr("Read any Private Endpoint Connection Proxy"),
// 				Operation: to.Ptr("Read Private Endpoint Connection Proxy"),
// 				Provider: to.Ptr("Microsoft Media Services"),
// 				Resource: to.Ptr("PrivateEndpointConnectionProxy"),
// 			},
// 		},
// 		{
// 			Name: to.Ptr("Microsoft.Media/mediaservices/privateEndpointConnectionProxies/write"),
// 			Display: &armmediaservices.OperationDisplay{
// 				Description: to.Ptr("Create Private Endpoint Connection Proxy"),
// 				Operation: to.Ptr("Create Private Endpoint Connection Proxy"),
// 				Provider: to.Ptr("Microsoft Media Services"),
// 				Resource: to.Ptr("PrivateEndpointConnectionProxy"),
// 			},
// 		},
// 		{
// 			Name: to.Ptr("Microsoft.Media/mediaservices/privateEndpointConnectionProxies/delete"),
// 			Display: &armmediaservices.OperationDisplay{
// 				Description: to.Ptr("Delete Private Endpoint Connection Proxy"),
// 				Operation: to.Ptr("Delete Private Endpoint Connection Proxy"),
// 				Provider: to.Ptr("Microsoft Media Services"),
// 				Resource: to.Ptr("PrivateEndpointConnectionProxy"),
// 			},
// 		},
// 		{
// 			Name: to.Ptr("Microsoft.Media/mediaservices/privateEndpointConnectionProxies/validate/action"),
// 			Display: &armmediaservices.OperationDisplay{
// 				Description: to.Ptr("Validate Private Endpoint Connection Proxy"),
// 				Operation: to.Ptr("Validate Private Endpoint Connection Proxy"),
// 				Provider: to.Ptr("Microsoft Media Services"),
// 				Resource: to.Ptr("PrivateEndpointConnectionProxy"),
// 			},
// 		},
// 		{
// 			Name: to.Ptr("Microsoft.Media/mediaservices/privateEndpointConnections/read"),
// 			Display: &armmediaservices.OperationDisplay{
// 				Description: to.Ptr("Read any Private Endpoint Connection"),
// 				Operation: to.Ptr("Read Private Endpoint Connection"),
// 				Provider: to.Ptr("Microsoft Media Services"),
// 				Resource: to.Ptr("PrivateEndpointConnection"),
// 			},
// 		},
// 		{
// 			Name: to.Ptr("Microsoft.Media/mediaservices/privateEndpointConnections/write"),
// 			Display: &armmediaservices.OperationDisplay{
// 				Description: to.Ptr("Create Private Endpoint Connection"),
// 				Operation: to.Ptr("Create Private Endpoint Connection"),
// 				Provider: to.Ptr("Microsoft Media Services"),
// 				Resource: to.Ptr("PrivateEndpointConnection"),
// 			},
// 		},
// 		{
// 			Name: to.Ptr("Microsoft.Media/mediaservices/privateEndpointConnections/delete"),
// 			Display: &armmediaservices.OperationDisplay{
// 				Description: to.Ptr("Delete Private Endpoint Connection"),
// 				Operation: to.Ptr("Delete Private Endpoint Connection"),
// 				Provider: to.Ptr("Microsoft Media Services"),
// 				Resource: to.Ptr("PrivateEndpointConnection"),
// 			},
// 		},
// 		{
// 			Name: to.Ptr("Microsoft.Media/mediaservices/privateEndpointConnectionOperations/read"),
// 			Display: &armmediaservices.OperationDisplay{
// 				Description: to.Ptr("Read any Private Endpoint Connection Operation"),
// 				Operation: to.Ptr("Read Private Endpoint Connection Operation"),
// 				Provider: to.Ptr("Microsoft Media Services"),
// 				Resource: to.Ptr("Private Endpoint Connection Operation"),
// 			},
// 		},
// 		{
// 			Name: to.Ptr("Microsoft.Media/mediaservices/streamingEndpoints/read"),
// 			Display: &armmediaservices.OperationDisplay{
// 				Description: to.Ptr("Read any Streaming Endpoint"),
// 				Operation: to.Ptr("Read Streaming Endpoint"),
// 				Provider: to.Ptr("Microsoft Media Services"),
// 				Resource: to.Ptr("Streaming Endpoint"),
// 			},
// 		},
// 		{
// 			Name: to.Ptr("Microsoft.Media/mediaservices/streamingEndpoints/write"),
// 			Display: &armmediaservices.OperationDisplay{
// 				Description: to.Ptr("Create or Update any Streaming Endpoint"),
// 				Operation: to.Ptr("Create or Update Streaming Endpoint"),
// 				Provider: to.Ptr("Microsoft Media Services"),
// 				Resource: to.Ptr("Streaming Endpoint"),
// 			},
// 		},
// 		{
// 			Name: to.Ptr("Microsoft.Media/mediaservices/streamingEndpoints/delete"),
// 			Display: &armmediaservices.OperationDisplay{
// 				Description: to.Ptr("Delete any Streaming Endpoint"),
// 				Operation: to.Ptr("Delete Streaming Endpoint"),
// 				Provider: to.Ptr("Microsoft Media Services"),
// 				Resource: to.Ptr("Streaming Endpoint"),
// 			},
// 		},
// 		{
// 			Name: to.Ptr("Microsoft.Media/mediaservices/streamingEndpoints/start/action"),
// 			Display: &armmediaservices.OperationDisplay{
// 				Description: to.Ptr("Start any Streaming Endpoint Operation"),
// 				Operation: to.Ptr("Start Streaming Endpoint Operation"),
// 				Provider: to.Ptr("Microsoft Media Services"),
// 				Resource: to.Ptr("Streaming Endpoint"),
// 			},
// 		},
// 		{
// 			Name: to.Ptr("Microsoft.Media/mediaservices/streamingEndpoints/stop/action"),
// 			Display: &armmediaservices.OperationDisplay{
// 				Description: to.Ptr("Stop any Streaming Endpoint Operation"),
// 				Operation: to.Ptr("Stop Streaming Endpoint Operation"),
// 				Provider: to.Ptr("Microsoft Media Services"),
// 				Resource: to.Ptr("Streaming Endpoint"),
// 			},
// 		},
// 		{
// 			Name: to.Ptr("Microsoft.Media/mediaservices/streamingEndpoints/scale/action"),
// 			Display: &armmediaservices.OperationDisplay{
// 				Description: to.Ptr("Scale any Streaming Endpoint Operation"),
// 				Operation: to.Ptr("Scale Streaming Endpoint Operation"),
// 				Provider: to.Ptr("Microsoft Media Services"),
// 				Resource: to.Ptr("Streaming Endpoint"),
// 			},
// 		},
// 		{
// 			Name: to.Ptr("Microsoft.Media/mediaservices/streamingEndpoints/providers/Microsoft.Insights/diagnosticSettings/read"),
// 			Display: &armmediaservices.OperationDisplay{
// 				Description: to.Ptr("Gets the diagnostic setting for the resource."),
// 				Operation: to.Ptr("Read diagnostic setting"),
// 				Provider: to.Ptr("Microsoft Media Services"),
// 				Resource: to.Ptr("Streaming Endpoints"),
// 			},
// 			Origin: to.Ptr("system"),
// 		},
// 		{
// 			Name: to.Ptr("Microsoft.Media/mediaservices/streamingEndpoints/providers/Microsoft.Insights/diagnosticSettings/write"),
// 			Display: &armmediaservices.OperationDisplay{
// 				Description: to.Ptr("Creates or updates the diagnostic setting for the resource."),
// 				Operation: to.Ptr("Write diagnostic setting"),
// 				Provider: to.Ptr("Microsoft Media Services"),
// 				Resource: to.Ptr("Streaming Endpoints"),
// 			},
// 			Origin: to.Ptr("system"),
// 		},
// 		{
// 			Name: to.Ptr("Microsoft.Media/mediaservices/streamingEndpoints/providers/Microsoft.Insights/metricDefinitions/read"),
// 			Display: &armmediaservices.OperationDisplay{
// 				Description: to.Ptr("Get list of Media Services Streaming Endpoint Metrics definitions."),
// 				Operation: to.Ptr("Get list of Media Services Streaming Endpoint Metrics definitions."),
// 				Provider: to.Ptr("Microsoft Media Services"),
// 				Resource: to.Ptr("Streaming Endpoints"),
// 			},
// 			Origin: to.Ptr("system"),
// 			Properties: &armmediaservices.Properties{
// 				ServiceSpecification: &armmediaservices.ServiceSpecification{
// 					MetricSpecifications: []*armmediaservices.MetricSpecification{
// 						{
// 							Name: to.Ptr("Egress"),
// 							AggregationType: to.Ptr(armmediaservices.MetricAggregationTypeTotal),
// 							Dimensions: []*armmediaservices.MetricDimension{
// 								{
// 									Name: to.Ptr("OutputFormat"),
// 									DisplayName: to.Ptr("Output Format"),
// 									ToBeExportedForShoebox: to.Ptr(true),
// 							}},
// 							DisplayDescription: to.Ptr("The amount of Egress data, in bytes."),
// 							DisplayName: to.Ptr("Egress"),
// 							SupportedAggregationTypes: []*string{
// 								to.Ptr("Total")},
// 								Unit: to.Ptr(armmediaservices.MetricUnitBytes),
// 							},
// 							{
// 								Name: to.Ptr("SuccessE2ELatency"),
// 								AggregationType: to.Ptr(armmediaservices.MetricAggregationTypeAverage),
// 								Dimensions: []*armmediaservices.MetricDimension{
// 									{
// 										Name: to.Ptr("OutputFormat"),
// 										DisplayName: to.Ptr("Output Format"),
// 										ToBeExportedForShoebox: to.Ptr(true),
// 								}},
// 								DisplayDescription: to.Ptr("The average latency for successful requests in milliseconds."),
// 								DisplayName: to.Ptr("Success end to end Latency"),
// 								SupportedAggregationTypes: []*string{
// 									to.Ptr("Average"),
// 									to.Ptr("Minimum"),
// 									to.Ptr("Maximum")},
// 									Unit: to.Ptr(armmediaservices.MetricUnitMilliseconds),
// 								},
// 								{
// 									Name: to.Ptr("Requests"),
// 									AggregationType: to.Ptr(armmediaservices.MetricAggregationTypeTotal),
// 									Dimensions: []*armmediaservices.MetricDimension{
// 										{
// 											Name: to.Ptr("OutputFormat"),
// 											DisplayName: to.Ptr("Output Format"),
// 											ToBeExportedForShoebox: to.Ptr(true),
// 										},
// 										{
// 											Name: to.Ptr("HttpStatusCode"),
// 											DisplayName: to.Ptr("HTTP Status Code"),
// 											ToBeExportedForShoebox: to.Ptr(true),
// 										},
// 										{
// 											Name: to.Ptr("ErrorCode"),
// 											DisplayName: to.Ptr("Error Code"),
// 											ToBeExportedForShoebox: to.Ptr(false),
// 									}},
// 									DisplayDescription: to.Ptr("Requests to a Streaming Endpoint."),
// 									DisplayName: to.Ptr("Requests"),
// 									SupportedAggregationTypes: []*string{
// 										to.Ptr("Total")},
// 										Unit: to.Ptr(armmediaservices.MetricUnitCount),
// 									},
// 									{
// 										Name: to.Ptr("EgressBandwidth"),
// 										AggregationType: to.Ptr(armmediaservices.MetricAggregationTypeAverage),
// 										Dimensions: []*armmediaservices.MetricDimension{
// 										},
// 										DisplayDescription: to.Ptr("Egress bandwidth in bits per second."),
// 										DisplayName: to.Ptr("Egress bandwidth"),
// 										LockAggregationType: to.Ptr(armmediaservices.MetricAggregationTypeTotal),
// 										SupportedAggregationTypes: []*string{
// 											to.Ptr("Average"),
// 											to.Ptr("Minimum"),
// 											to.Ptr("Maximum")},
// 											Unit: to.Ptr(armmediaservices.MetricUnit("BitsPerSecond")),
// 										},
// 										{
// 											Name: to.Ptr("CPU"),
// 											AggregationType: to.Ptr(armmediaservices.MetricAggregationTypeAverage),
// 											Dimensions: []*armmediaservices.MetricDimension{
// 											},
// 											DisplayDescription: to.Ptr("CPU usage for premium streaming endpoints. This data is not available for standard streaming endpoints."),
// 											DisplayName: to.Ptr("CPU usage"),
// 											SupportedAggregationTypes: []*string{
// 												to.Ptr("Average"),
// 												to.Ptr("Minimum"),
// 												to.Ptr("Maximum")},
// 												Unit: to.Ptr(armmediaservices.MetricUnit("Percent")),
// 										}},
// 									},
// 								},
// 							},
// 							{
// 								Name: to.Ptr("Microsoft.Media/mediaservices/liveEvents/read"),
// 								Display: &armmediaservices.OperationDisplay{
// 									Description: to.Ptr("Read any Live Event"),
// 									Operation: to.Ptr("Read Live Event"),
// 									Provider: to.Ptr("Microsoft Media Services"),
// 									Resource: to.Ptr("Live Event"),
// 								},
// 							},
// 							{
// 								Name: to.Ptr("Microsoft.Media/mediaservices/liveEvents/write"),
// 								Display: &armmediaservices.OperationDisplay{
// 									Description: to.Ptr("Create or Update any Live Event"),
// 									Operation: to.Ptr("Create or Update Live Event"),
// 									Provider: to.Ptr("Microsoft Media Services"),
// 									Resource: to.Ptr("Live Event"),
// 								},
// 							},
// 							{
// 								Name: to.Ptr("Microsoft.Media/mediaservices/liveEvents/delete"),
// 								Display: &armmediaservices.OperationDisplay{
// 									Description: to.Ptr("Delete any Live Event"),
// 									Operation: to.Ptr("Delete Live Event"),
// 									Provider: to.Ptr("Microsoft Media Services"),
// 									Resource: to.Ptr("Live Event"),
// 								},
// 							},
// 							{
// 								Name: to.Ptr("Microsoft.Media/mediaservices/liveEvents/start/action"),
// 								Display: &armmediaservices.OperationDisplay{
// 									Description: to.Ptr("Start any Live Event Operation"),
// 									Operation: to.Ptr("Start Live Event Operation"),
// 									Provider: to.Ptr("Microsoft Media Services"),
// 									Resource: to.Ptr("Live Event"),
// 								},
// 							},
// 							{
// 								Name: to.Ptr("Microsoft.Media/mediaservices/liveEvents/stop/action"),
// 								Display: &armmediaservices.OperationDisplay{
// 									Description: to.Ptr("Stop any Live Event Operation"),
// 									Operation: to.Ptr("Stop Live Event Operation"),
// 									Provider: to.Ptr("Microsoft Media Services"),
// 									Resource: to.Ptr("Live Event"),
// 								},
// 							},
// 							{
// 								Name: to.Ptr("Microsoft.Media/mediaservices/liveEvents/reset/action"),
// 								Display: &armmediaservices.OperationDisplay{
// 									Description: to.Ptr("Reset any Live Event Operation"),
// 									Operation: to.Ptr("Reset Live Event Operation"),
// 									Provider: to.Ptr("Microsoft Media Services"),
// 									Resource: to.Ptr("Live Event"),
// 								},
// 							},
// 							{
// 								Name: to.Ptr("Microsoft.Media/mediaservices/liveEvents/providers/Microsoft.Insights/diagnosticSettings/read"),
// 								Display: &armmediaservices.OperationDisplay{
// 									Description: to.Ptr("Gets the diagnostic setting for the resource."),
// 									Operation: to.Ptr("Read diagnostic setting"),
// 									Provider: to.Ptr("Microsoft Media Services"),
// 									Resource: to.Ptr("Live Event"),
// 								},
// 								Origin: to.Ptr("system"),
// 							},
// 							{
// 								Name: to.Ptr("Microsoft.Media/mediaservices/liveEvents/providers/Microsoft.Insights/diagnosticSettings/write"),
// 								Display: &armmediaservices.OperationDisplay{
// 									Description: to.Ptr("Creates or updates the diagnostic setting for the resource."),
// 									Operation: to.Ptr("Write diagnostic setting"),
// 									Provider: to.Ptr("Microsoft Media Services"),
// 									Resource: to.Ptr("Live Event"),
// 								},
// 								Origin: to.Ptr("system"),
// 							},
// 							{
// 								Name: to.Ptr("Microsoft.Media/mediaservices/liveEvents/providers/Microsoft.Insights/metricDefinitions/read"),
// 								Display: &armmediaservices.OperationDisplay{
// 									Description: to.Ptr("Get a list of Media Services Live Event Metrics definitions."),
// 									Operation: to.Ptr("Get a list of Media Services Live Event Metrics definitions."),
// 									Provider: to.Ptr("Microsoft Media Services"),
// 									Resource: to.Ptr("Live Event"),
// 								},
// 								Origin: to.Ptr("system"),
// 								Properties: &armmediaservices.Properties{
// 									ServiceSpecification: &armmediaservices.ServiceSpecification{
// 										MetricSpecifications: []*armmediaservices.MetricSpecification{
// 											{
// 												Name: to.Ptr("IngestBitrate"),
// 												AggregationType: to.Ptr(armmediaservices.MetricAggregationTypeAverage),
// 												Dimensions: []*armmediaservices.MetricDimension{
// 													{
// 														Name: to.Ptr("TrackName"),
// 														DisplayName: to.Ptr("Track name"),
// 														ToBeExportedForShoebox: to.Ptr(true),
// 												}},
// 												DisplayDescription: to.Ptr("The incoming bitrate ingested for a live event, in bits per second."),
// 												DisplayName: to.Ptr("Live Event ingest bitrate"),
// 												EnableRegionalMdmAccount: to.Ptr(true),
// 												SourceMdmNamespace: to.Ptr("MicrosoftMediaLiveEvent"),
// 												SupportedAggregationTypes: []*string{
// 													to.Ptr("Average"),
// 													to.Ptr("Minimum"),
// 													to.Ptr("Maximum")},
// 													Unit: to.Ptr(armmediaservices.MetricUnit("BitsPerSecond")),
// 												},
// 												{
// 													Name: to.Ptr("IngestLastTimestamp"),
// 													AggregationType: to.Ptr(armmediaservices.MetricAggregationType("Maximum")),
// 													Dimensions: []*armmediaservices.MetricDimension{
// 														{
// 															Name: to.Ptr("TrackName"),
// 															DisplayName: to.Ptr("Track name"),
// 															ToBeExportedForShoebox: to.Ptr(true),
// 													}},
// 													DisplayDescription: to.Ptr("Last timestamp ingested for a live event."),
// 													DisplayName: to.Ptr("Live Event ingest last timestamp"),
// 													EnableRegionalMdmAccount: to.Ptr(true),
// 													SourceMdmNamespace: to.Ptr("MicrosoftMediaLiveEvent"),
// 													SupportedAggregationTypes: []*string{
// 														to.Ptr("Maximum")},
// 														Unit: to.Ptr(armmediaservices.MetricUnitMilliseconds),
// 													},
// 													{
// 														Name: to.Ptr("IngestDriftValue"),
// 														AggregationType: to.Ptr(armmediaservices.MetricAggregationType("Maximum")),
// 														Dimensions: []*armmediaservices.MetricDimension{
// 															{
// 																Name: to.Ptr("TrackName"),
// 																DisplayName: to.Ptr("Track name"),
// 																ToBeExportedForShoebox: to.Ptr(true),
// 														}},
// 														DisplayDescription: to.Ptr("Drift between the timestamp of the ingested content and the system clock, measured in seconds per minute. A non zero value indicates that the ingested content is arriving slower than system clock time."),
// 														DisplayName: to.Ptr("Live Event ingest drift value"),
// 														EnableRegionalMdmAccount: to.Ptr(true),
// 														SourceMdmNamespace: to.Ptr("MicrosoftMediaLiveEvent"),
// 														SupportedAggregationTypes: []*string{
// 															to.Ptr("Maximum")},
// 															Unit: to.Ptr(armmediaservices.MetricUnit("Seconds")),
// 														},
// 														{
// 															Name: to.Ptr("LiveOutputLastTimestamp"),
// 															AggregationType: to.Ptr(armmediaservices.MetricAggregationType("Maximum")),
// 															Dimensions: []*armmediaservices.MetricDimension{
// 																{
// 																	Name: to.Ptr("TrackName"),
// 																	DisplayName: to.Ptr("Track name"),
// 																	ToBeExportedForShoebox: to.Ptr(true),
// 															}},
// 															DisplayDescription: to.Ptr("Timestamp of the last fragment uploaded to storage for a live event output."),
// 															DisplayName: to.Ptr("Last output timestamp"),
// 															EnableRegionalMdmAccount: to.Ptr(true),
// 															SourceMdmNamespace: to.Ptr("MicrosoftMediaLiveEvent"),
// 															SupportedAggregationTypes: []*string{
// 																to.Ptr("Maximum")},
// 																Unit: to.Ptr(armmediaservices.MetricUnitMilliseconds),
// 														}},
// 													},
// 												},
// 											},
// 											{
// 												Name: to.Ptr("Microsoft.Media/mediaservices/liveEvents/liveOutputs/read"),
// 												Display: &armmediaservices.OperationDisplay{
// 													Description: to.Ptr("Read any Live Output"),
// 													Operation: to.Ptr("Read Live Output"),
// 													Provider: to.Ptr("Microsoft Media Services"),
// 													Resource: to.Ptr("Live Output"),
// 												},
// 											},
// 											{
// 												Name: to.Ptr("Microsoft.Media/mediaservices/liveEvents/liveOutputs/write"),
// 												Display: &armmediaservices.OperationDisplay{
// 													Description: to.Ptr("Create or Update any Live Output"),
// 													Operation: to.Ptr("Create or Update Live Output"),
// 													Provider: to.Ptr("Microsoft Media Services"),
// 													Resource: to.Ptr("Live Output"),
// 												},
// 											},
// 											{
// 												Name: to.Ptr("Microsoft.Media/mediaservices/liveEvents/liveOutputs/delete"),
// 												Display: &armmediaservices.OperationDisplay{
// 													Description: to.Ptr("Delete any Live Output"),
// 													Operation: to.Ptr("Delete Live Output"),
// 													Provider: to.Ptr("Microsoft Media Services"),
// 													Resource: to.Ptr("Live Output"),
// 												},
// 											},
// 											{
// 												Name: to.Ptr("Microsoft.Media/mediaservices/streamingEndpointOperations/read"),
// 												Display: &armmediaservices.OperationDisplay{
// 													Description: to.Ptr("Read any Streaming Endpoint Operation"),
// 													Operation: to.Ptr("Read Streaming Endpoint Operation"),
// 													Provider: to.Ptr("Microsoft Media Services"),
// 													Resource: to.Ptr("Streaming Endpoint Operation"),
// 												},
// 											},
// 											{
// 												Name: to.Ptr("Microsoft.Media/mediaservices/liveEventOperations/read"),
// 												Display: &armmediaservices.OperationDisplay{
// 													Description: to.Ptr("Read any Live Event Operation"),
// 													Operation: to.Ptr("Read Live Event Operation"),
// 													Provider: to.Ptr("Microsoft Media Services"),
// 													Resource: to.Ptr("Live Event Operation"),
// 												},
// 											},
// 											{
// 												Name: to.Ptr("Microsoft.Media/mediaservices/liveOutputOperations/read"),
// 												Display: &armmediaservices.OperationDisplay{
// 													Description: to.Ptr("Read any Live Output Operation"),
// 													Operation: to.Ptr("Read Live Output Operation"),
// 													Provider: to.Ptr("Microsoft Media Services"),
// 													Resource: to.Ptr("Live Output Operation"),
// 												},
// 											},
// 											{
// 												Name: to.Ptr("Microsoft.Media/mediaservices/providers/Microsoft.Insights/diagnosticSettings/read"),
// 												Display: &armmediaservices.OperationDisplay{
// 													Description: to.Ptr("Gets the diagnostic setting for the resource."),
// 													Operation: to.Ptr("Read diagnostic setting"),
// 													Provider: to.Ptr("Microsoft Media Services"),
// 													Resource: to.Ptr("Media Services Account"),
// 												},
// 												Origin: to.Ptr("system"),
// 											},
// 											{
// 												Name: to.Ptr("Microsoft.Media/mediaservices/providers/Microsoft.Insights/diagnosticSettings/write"),
// 												Display: &armmediaservices.OperationDisplay{
// 													Description: to.Ptr("Creates or updates the diagnostic setting for the resource."),
// 													Operation: to.Ptr("Write diagnostic setting"),
// 													Provider: to.Ptr("Microsoft Media Services"),
// 													Resource: to.Ptr("Media Services Account"),
// 												},
// 												Origin: to.Ptr("system"),
// 											},
// 											{
// 												Name: to.Ptr("Microsoft.Media/mediaservices/providers/Microsoft.Insights/logDefinitions/read"),
// 												Display: &armmediaservices.OperationDisplay{
// 													Description: to.Ptr("Gets the available logs for a Media Services Account"),
// 													Operation: to.Ptr("Read mediaservices log definitions"),
// 													Provider: to.Ptr("Microsoft Media Services"),
// 													Resource: to.Ptr("The log definition of mediaservices"),
// 												},
// 												Origin: to.Ptr("system"),
// 												Properties: &armmediaservices.Properties{
// 													ServiceSpecification: &armmediaservices.ServiceSpecification{
// 														LogSpecifications: []*armmediaservices.LogSpecification{
// 															{
// 																Name: to.Ptr("KeyDeliveryRequests"),
// 																BlobDuration: to.Ptr("PT1H"),
// 																DisplayName: to.Ptr("Key Delivery Requests"),
// 														}},
// 													},
// 												},
// 											},
// 											{
// 												Name: to.Ptr("Microsoft.Media/mediaservices/providers/Microsoft.Insights/metricDefinitions/read"),
// 												Display: &armmediaservices.OperationDisplay{
// 													Description: to.Ptr("Get list of Media Services Metric definitions."),
// 													Operation: to.Ptr("Get list of Media Services Metric definitions."),
// 													Provider: to.Ptr("Microsoft Media Services"),
// 													Resource: to.Ptr("Media Service"),
// 												},
// 												Origin: to.Ptr("system"),
// 												Properties: &armmediaservices.Properties{
// 													ServiceSpecification: &armmediaservices.ServiceSpecification{
// 														MetricSpecifications: []*armmediaservices.MetricSpecification{
// 															{
// 																Name: to.Ptr("AssetQuota"),
// 																AggregationType: to.Ptr(armmediaservices.MetricAggregationTypeAverage),
// 																DisplayDescription: to.Ptr("How many assets are allowed for current media service account"),
// 																DisplayName: to.Ptr("Asset quota"),
// 																EnableRegionalMdmAccount: to.Ptr(true),
// 																SourceMdmNamespace: to.Ptr("MediaServiceQuotaAndUsage"),
// 																SupportedAggregationTypes: []*string{
// 																	to.Ptr("Average")},
// 																	SupportedTimeGrainTypes: []*string{
// 																		to.Ptr("PT1H"),
// 																		to.Ptr("PT6H"),
// 																		to.Ptr("PT12H"),
// 																		to.Ptr("P1D")},
// 																		Unit: to.Ptr(armmediaservices.MetricUnitCount),
// 																	},
// 																	{
// 																		Name: to.Ptr("AssetCount"),
// 																		AggregationType: to.Ptr(armmediaservices.MetricAggregationTypeAverage),
// 																		DisplayDescription: to.Ptr("How many assets are already created in current media service account"),
// 																		DisplayName: to.Ptr("Asset count"),
// 																		EnableRegionalMdmAccount: to.Ptr(true),
// 																		SourceMdmNamespace: to.Ptr("MediaServiceQuotaAndUsage"),
// 																		SupportedAggregationTypes: []*string{
// 																			to.Ptr("Average")},
// 																			SupportedTimeGrainTypes: []*string{
// 																				to.Ptr("PT1H"),
// 																				to.Ptr("PT6H"),
// 																				to.Ptr("PT12H"),
// 																				to.Ptr("P1D")},
// 																				Unit: to.Ptr(armmediaservices.MetricUnitCount),
// 																			},
// 																			{
// 																				Name: to.Ptr("AssetQuotaUsedPercentage"),
// 																				AggregationType: to.Ptr(armmediaservices.MetricAggregationTypeAverage),
// 																				DisplayDescription: to.Ptr("Asset used percentage in current media service account"),
// 																				DisplayName: to.Ptr("Asset quota used percentage"),
// 																				EnableRegionalMdmAccount: to.Ptr(true),
// 																				SourceMdmNamespace: to.Ptr("MediaServiceQuotaAndUsage"),
// 																				SupportedAggregationTypes: []*string{
// 																					to.Ptr("Average")},
// 																					SupportedTimeGrainTypes: []*string{
// 																						to.Ptr("PT1H"),
// 																						to.Ptr("PT6H"),
// 																						to.Ptr("PT12H"),
// 																						to.Ptr("P1D")},
// 																						Unit: to.Ptr(armmediaservices.MetricUnit("Percent")),
// 																					},
// 																					{
// 																						Name: to.Ptr("ContentKeyPolicyQuota"),
// 																						AggregationType: to.Ptr(armmediaservices.MetricAggregationTypeAverage),
// 																						DisplayDescription: to.Ptr("How many content key polices are allowed for current media service account"),
// 																						DisplayName: to.Ptr("Content Key Policy quota"),
// 																						EnableRegionalMdmAccount: to.Ptr(true),
// 																						SourceMdmNamespace: to.Ptr("MediaServiceQuotaAndUsage"),
// 																						SupportedAggregationTypes: []*string{
// 																							to.Ptr("Average")},
// 																							SupportedTimeGrainTypes: []*string{
// 																								to.Ptr("PT1H"),
// 																								to.Ptr("PT6H"),
// 																								to.Ptr("PT12H"),
// 																								to.Ptr("P1D")},
// 																								Unit: to.Ptr(armmediaservices.MetricUnitCount),
// 																							},
// 																							{
// 																								Name: to.Ptr("ContentKeyPolicyCount"),
// 																								AggregationType: to.Ptr(armmediaservices.MetricAggregationTypeAverage),
// 																								DisplayDescription: to.Ptr("How many content key policies are already created in current media service account"),
// 																								DisplayName: to.Ptr("Content Key Policy count"),
// 																								EnableRegionalMdmAccount: to.Ptr(true),
// 																								SourceMdmNamespace: to.Ptr("MediaServiceQuotaAndUsage"),
// 																								SupportedAggregationTypes: []*string{
// 																									to.Ptr("Average")},
// 																									SupportedTimeGrainTypes: []*string{
// 																										to.Ptr("PT1H"),
// 																										to.Ptr("PT6H"),
// 																										to.Ptr("PT12H"),
// 																										to.Ptr("P1D")},
// 																										Unit: to.Ptr(armmediaservices.MetricUnitCount),
// 																									},
// 																									{
// 																										Name: to.Ptr("ContentKeyPolicyQuotaUsedPercentage"),
// 																										AggregationType: to.Ptr(armmediaservices.MetricAggregationTypeAverage),
// 																										DisplayDescription: to.Ptr("Content Key Policy used percentage in current media service account"),
// 																										DisplayName: to.Ptr("Content Key Policy quota used percentage"),
// 																										EnableRegionalMdmAccount: to.Ptr(true),
// 																										SourceMdmNamespace: to.Ptr("MediaServiceQuotaAndUsage"),
// 																										SupportedAggregationTypes: []*string{
// 																											to.Ptr("Average")},
// 																											SupportedTimeGrainTypes: []*string{
// 																												to.Ptr("PT1H"),
// 																												to.Ptr("PT6H"),
// 																												to.Ptr("PT12H"),
// 																												to.Ptr("P1D")},
// 																												Unit: to.Ptr(armmediaservices.MetricUnit("Percent")),
// 																											},
// 																											{
// 																												Name: to.Ptr("StreamingPolicyQuota"),
// 																												AggregationType: to.Ptr(armmediaservices.MetricAggregationTypeAverage),
// 																												DisplayDescription: to.Ptr("How many streaming policies are allowed for current media service account"),
// 																												DisplayName: to.Ptr("Streaming Policy quota"),
// 																												EnableRegionalMdmAccount: to.Ptr(true),
// 																												SourceMdmNamespace: to.Ptr("MediaServiceQuotaAndUsage"),
// 																												SupportedAggregationTypes: []*string{
// 																													to.Ptr("Average")},
// 																													SupportedTimeGrainTypes: []*string{
// 																														to.Ptr("PT1H"),
// 																														to.Ptr("PT6H"),
// 																														to.Ptr("PT12H"),
// 																														to.Ptr("P1D")},
// 																														Unit: to.Ptr(armmediaservices.MetricUnitCount),
// 																													},
// 																													{
// 																														Name: to.Ptr("StreamingPolicyCount"),
// 																														AggregationType: to.Ptr(armmediaservices.MetricAggregationTypeAverage),
// 																														DisplayDescription: to.Ptr("How many streaming policies are already created in current media service account"),
// 																														DisplayName: to.Ptr("Streaming Policy count"),
// 																														EnableRegionalMdmAccount: to.Ptr(true),
// 																														SourceMdmNamespace: to.Ptr("MediaServiceQuotaAndUsage"),
// 																														SupportedAggregationTypes: []*string{
// 																															to.Ptr("Average")},
// 																															SupportedTimeGrainTypes: []*string{
// 																																to.Ptr("PT1H"),
// 																																to.Ptr("PT6H"),
// 																																to.Ptr("PT12H"),
// 																																to.Ptr("P1D")},
// 																																Unit: to.Ptr(armmediaservices.MetricUnitCount),
// 																															},
// 																															{
// 																																Name: to.Ptr("StreamingPolicyQuotaUsedPercentage"),
// 																																AggregationType: to.Ptr(armmediaservices.MetricAggregationTypeAverage),
// 																																DisplayDescription: to.Ptr("Streaming Policy used percentage in current media service account"),
// 																																DisplayName: to.Ptr("Streaming Policy quota used percentage"),
// 																																EnableRegionalMdmAccount: to.Ptr(true),
// 																																SourceMdmNamespace: to.Ptr("MediaServiceQuotaAndUsage"),
// 																																SupportedAggregationTypes: []*string{
// 																																	to.Ptr("Average")},
// 																																	SupportedTimeGrainTypes: []*string{
// 																																		to.Ptr("PT1H"),
// 																																		to.Ptr("PT6H"),
// 																																		to.Ptr("PT12H"),
// 																																		to.Ptr("P1D")},
// 																																		Unit: to.Ptr(armmediaservices.MetricUnit("Percent")),
// 																																	},
// 																																	{
// 																																		Name: to.Ptr("ChannelsAndLiveEventsCount"),
// 																																		AggregationType: to.Ptr(armmediaservices.MetricAggregationTypeAverage),
// 																																		DisplayDescription: to.Ptr("The total number of live events in the current media services account"),
// 																																		DisplayName: to.Ptr("Live event count"),
// 																																		EnableRegionalMdmAccount: to.Ptr(true),
// 																																		SourceMdmNamespace: to.Ptr("ClusterResource_ChannelsAndLiveEvents"),
// 																																		SupportedAggregationTypes: []*string{
// 																																			to.Ptr("Average")},
// 																																			Unit: to.Ptr(armmediaservices.MetricUnitCount),
// 																																		},
// 																																		{
// 																																			Name: to.Ptr("RunningChannelsAndLiveEventsCount"),
// 																																			AggregationType: to.Ptr(armmediaservices.MetricAggregationTypeAverage),
// 																																			DisplayDescription: to.Ptr("The total number of running live events in the current media services account"),
// 																																			DisplayName: to.Ptr("Running live event count"),
// 																																			EnableRegionalMdmAccount: to.Ptr(true),
// 																																			SourceMdmNamespace: to.Ptr("ClusterResource_ChannelsAndLiveEvents"),
// 																																			SupportedAggregationTypes: []*string{
// 																																				to.Ptr("Average")},
// 																																				Unit: to.Ptr(armmediaservices.MetricUnitCount),
// 																																			},
// 																																			{
// 																																				Name: to.Ptr("MaxChannelsAndLiveEventsCount"),
// 																																				AggregationType: to.Ptr(armmediaservices.MetricAggregationTypeAverage),
// 																																				DisplayDescription: to.Ptr("The maximum number of live events allowed in the current media services account"),
// 																																				DisplayName: to.Ptr("Max live event quota"),
// 																																				EnableRegionalMdmAccount: to.Ptr(true),
// 																																				SourceMdmNamespace: to.Ptr("ClusterResource_ChannelsAndLiveEvents"),
// 																																				SupportedAggregationTypes: []*string{
// 																																					to.Ptr("Average")},
// 																																					Unit: to.Ptr(armmediaservices.MetricUnitCount),
// 																																				},
// 																																				{
// 																																					Name: to.Ptr("MaxRunningChannelsAndLiveEventsCount"),
// 																																					AggregationType: to.Ptr(armmediaservices.MetricAggregationTypeAverage),
// 																																					DisplayDescription: to.Ptr("The maximum number of running live events allowed in the current media services account"),
// 																																					DisplayName: to.Ptr("Max running live event quota"),
// 																																					EnableRegionalMdmAccount: to.Ptr(true),
// 																																					SourceMdmNamespace: to.Ptr("ClusterResource_ChannelsAndLiveEvents"),
// 																																					SupportedAggregationTypes: []*string{
// 																																						to.Ptr("Average")},
// 																																						Unit: to.Ptr(armmediaservices.MetricUnitCount),
// 																																				}},
// 																																			},
// 																																		},
// 																																	},
// 																																	{
// 																																		Name: to.Ptr("Microsoft.Media/videoAnalyzers/read"),
// 																																		Display: &armmediaservices.OperationDisplay{
// 																																			Description: to.Ptr("Read a Video Analyzer Account"),
// 																																			Operation: to.Ptr("Read a Video Analyzer Account"),
// 																																			Provider: to.Ptr("Microsoft Media Services"),
// 																																			Resource: to.Ptr("Video Analyzer Account"),
// 																																		},
// 																																	},
// 																																	{
// 																																		Name: to.Ptr("Microsoft.Media/videoAnalyzers/write"),
// 																																		Display: &armmediaservices.OperationDisplay{
// 																																			Description: to.Ptr("Create or Update a Video Analyzer Account"),
// 																																			Operation: to.Ptr("Create or Update a Video Analyzer Account"),
// 																																			Provider: to.Ptr("Microsoft Media Services"),
// 																																			Resource: to.Ptr("Video Analyzer Account"),
// 																																		},
// 																																	},
// 																																	{
// 																																		Name: to.Ptr("Microsoft.Media/videoAnalyzers/delete"),
// 																																		Display: &armmediaservices.OperationDisplay{
// 																																			Description: to.Ptr("Delete a Video Analyzer Account"),
// 																																			Operation: to.Ptr("Delete a Video Analyzer Account"),
// 																																			Provider: to.Ptr("Microsoft Media Services"),
// 																																			Resource: to.Ptr("Video Analyzer Account"),
// 																																		},
// 																																	},
// 																																	{
// 																																		Name: to.Ptr("Microsoft.Media/videoAnalyzers/PrivateEndpointConnectionsApproval/action"),
// 																																		Display: &armmediaservices.OperationDisplay{
// 																																			Description: to.Ptr("Approve Private Endpoint Connections"),
// 																																			Operation: to.Ptr("Approve Private Endpoint Connections"),
// 																																			Provider: to.Ptr("Microsoft Media Services"),
// 																																			Resource: to.Ptr("Video Analyzer Account"),
// 																																		},
// 																																	},
// 																																	{
// 																																		Name: to.Ptr("Microsoft.Media/videoAnalyzers/videos/read"),
// 																																		Display: &armmediaservices.OperationDisplay{
// 																																			Description: to.Ptr("Read any Video"),
// 																																			Operation: to.Ptr("Read Video"),
// 																																			Provider: to.Ptr("Microsoft Media Services"),
// 																																			Resource: to.Ptr("Video Resource"),
// 																																		},
// 																																	},
// 																																	{
// 																																		Name: to.Ptr("Microsoft.Media/videoAnalyzers/videos/write"),
// 																																		Display: &armmediaservices.OperationDisplay{
// 																																			Description: to.Ptr("Create or Update any Video"),
// 																																			Operation: to.Ptr("Create or Update Video"),
// 																																			Provider: to.Ptr("Microsoft Media Services"),
// 																																			Resource: to.Ptr("Video Resource"),
// 																																		},
// 																																	},
// 																																	{
// 																																		Name: to.Ptr("Microsoft.Media/videoAnalyzers/videos/delete"),
// 																																		Display: &armmediaservices.OperationDisplay{
// 																																			Description: to.Ptr("Delete any Video"),
// 																																			Operation: to.Ptr("Delete Video"),
// 																																			Provider: to.Ptr("Microsoft Media Services"),
// 																																			Resource: to.Ptr("Video Resource"),
// 																																		},
// 																																	},
// 																																	{
// 																																		Name: to.Ptr("Microsoft.Media/videoAnalyzers/videos/listStreamingToken/action"),
// 																																		Display: &armmediaservices.OperationDisplay{
// 																																			Description: to.Ptr("Generates a streaming token which can be used for video playback"),
// 																																			Operation: to.Ptr("Generates a streaming token which can be used for video playback"),
// 																																			Provider: to.Ptr("Microsoft Media Services"),
// 																																			Resource: to.Ptr("Video Resource"),
// 																																		},
// 																																	},
// 																																	{
// 																																		Name: to.Ptr("Microsoft.Media/videoAnalyzers/videos/listContentToken/action"),
// 																																		Display: &armmediaservices.OperationDisplay{
// 																																			Description: to.Ptr("Generates a content token which can be used for video playback"),
// 																																			Operation: to.Ptr("Generates a content token which can be used for video playback"),
// 																																			Provider: to.Ptr("Microsoft Media Services"),
// 																																			Resource: to.Ptr("Video Resource"),
// 																																		},
// 																																	},
// 																																	{
// 																																		Name: to.Ptr("Microsoft.Media/videoAnalyzers/accessPolicies/read"),
// 																																		Display: &armmediaservices.OperationDisplay{
// 																																			Description: to.Ptr("Read any Access Policy"),
// 																																			Operation: to.Ptr("Read Access Policy"),
// 																																			Provider: to.Ptr("Microsoft Media Services"),
// 																																			Resource: to.Ptr("Access Policy Resource"),
// 																																		},
// 																																	},
// 																																	{
// 																																		Name: to.Ptr("Microsoft.Media/videoAnalyzers/accessPolicies/write"),
// 																																		Display: &armmediaservices.OperationDisplay{
// 																																			Description: to.Ptr("Create or Update any Access Policy"),
// 																																			Operation: to.Ptr("Create or Update Access Policy"),
// 																																			Provider: to.Ptr("Microsoft Media Services"),
// 																																			Resource: to.Ptr("Access Policy Resource"),
// 																																		},
// 																																	},
// 																																	{
// 																																		Name: to.Ptr("Microsoft.Media/videoAnalyzers/accessPolicies/delete"),
// 																																		Display: &armmediaservices.OperationDisplay{
// 																																			Description: to.Ptr("Delete any Access Policy"),
// 																																			Operation: to.Ptr("Delete Access Policy"),
// 																																			Provider: to.Ptr("Microsoft Media Services"),
// 																																			Resource: to.Ptr("Access Policy Resource"),
// 																																		},
// 																																	},
// 																																	{
// 																																		Name: to.Ptr("Microsoft.Media/videoAnalyzers/edgeModules/read"),
// 																																		Display: &armmediaservices.OperationDisplay{
// 																																			Description: to.Ptr("Read any Edge Module"),
// 																																			Operation: to.Ptr("Read Edge Module"),
// 																																			Provider: to.Ptr("Microsoft Media Services"),
// 																																			Resource: to.Ptr("Edge Module Resource"),
// 																																		},
// 																																	},
// 																																	{
// 																																		Name: to.Ptr("Microsoft.Media/videoAnalyzers/edgeModules/write"),
// 																																		Display: &armmediaservices.OperationDisplay{
// 																																			Description: to.Ptr("Create or Update any Edge Module"),
// 																																			Operation: to.Ptr("Create or Update Edge Module"),
// 																																			Provider: to.Ptr("Microsoft Media Services"),
// 																																			Resource: to.Ptr("Edge Module Resource"),
// 																																		},
// 																																	},
// 																																	{
// 																																		Name: to.Ptr("Microsoft.Media/videoAnalyzers/edgeModules/delete"),
// 																																		Display: &armmediaservices.OperationDisplay{
// 																																			Description: to.Ptr("Delete any Edge Module"),
// 																																			Operation: to.Ptr("Delete Edge Module"),
// 																																			Provider: to.Ptr("Microsoft Media Services"),
// 																																			Resource: to.Ptr("Edge Module Resource"),
// 																																		},
// 																																	},
// 																																	{
// 																																		Name: to.Ptr("Microsoft.Media/videoAnalyzers/edgeModules/listProvisioningToken/action"),
// 																																		Display: &armmediaservices.OperationDisplay{
// 																																			Description: to.Ptr("Creates a new provisioning token. A provisioning token allows for a single instance of Azure Video analyzer IoT edge module to be initialized and authorized to the cloud account. The provisioning token itself is short lived and it is only used for the initial handshake between IoT edge module and the cloud. After the initial handshake, the IoT edge module will agree on a set of authentication keys which will be auto-rotated as long as the module is able to periodically connect to the cloud. A new provisioning token can be generated for the same IoT edge module in case the module state lost or reset"),
// 																																			Operation: to.Ptr("Creates a new provisioning token"),
// 																																			Provider: to.Ptr("Microsoft Media Services"),
// 																																			Resource: to.Ptr("Edge Module Resource"),
// 																																		},
// 																																	},
// 																																	{
// 																																		Name: to.Ptr("Microsoft.Media/videoAnalyzers/pipelineTopologies/read"),
// 																																		Display: &armmediaservices.OperationDisplay{
// 																																			Description: to.Ptr("Read any Pipeline Topology"),
// 																																			Operation: to.Ptr("Read Pipeline Topology"),
// 																																			Provider: to.Ptr("Microsoft Media Services"),
// 																																			Resource: to.Ptr("Pipeline Topology Resource"),
// 																																		},
// 																																	},
// 																																	{
// 																																		Name: to.Ptr("Microsoft.Media/videoAnalyzers/pipelineTopologies/write"),
// 																																		Display: &armmediaservices.OperationDisplay{
// 																																			Description: to.Ptr("Create or Update any Pipeline Topology"),
// 																																			Operation: to.Ptr("Create or Update Pipeline Topology"),
// 																																			Provider: to.Ptr("Microsoft Media Services"),
// 																																			Resource: to.Ptr("Pipeline Topology Resource"),
// 																																		},
// 																																	},
// 																																	{
// 																																		Name: to.Ptr("Microsoft.Media/videoAnalyzers/pipelineTopologies/delete"),
// 																																		Display: &armmediaservices.OperationDisplay{
// 																																			Description: to.Ptr("Delete any Pipeline Topology"),
// 																																			Operation: to.Ptr("Delete Pipeline Topology"),
// 																																			Provider: to.Ptr("Microsoft Media Services"),
// 																																			Resource: to.Ptr("Pipeline Topology Resource"),
// 																																		},
// 																																	},
// 																																	{
// 																																		Name: to.Ptr("Microsoft.Media/videoAnalyzers/livePipelines/read"),
// 																																		Display: &armmediaservices.OperationDisplay{
// 																																			Description: to.Ptr("Read any Live Pipeline"),
// 																																			Operation: to.Ptr("Read Live Pipeline"),
// 																																			Provider: to.Ptr("Microsoft Media Services"),
// 																																			Resource: to.Ptr("Live Pipeline Resource"),
// 																																		},
// 																																	},
// 																																	{
// 																																		Name: to.Ptr("Microsoft.Media/videoAnalyzers/livePipelines/write"),
// 																																		Display: &armmediaservices.OperationDisplay{
// 																																			Description: to.Ptr("Create or Update any Live Pipeline"),
// 																																			Operation: to.Ptr("Create or Update Live Pipeline"),
// 																																			Provider: to.Ptr("Microsoft Media Services"),
// 																																			Resource: to.Ptr("Live Pipeline Resource"),
// 																																		},
// 																																	},
// 																																	{
// 																																		Name: to.Ptr("Microsoft.Media/videoAnalyzers/livePipelines/delete"),
// 																																		Display: &armmediaservices.OperationDisplay{
// 																																			Description: to.Ptr("Delete any Live Pipeline"),
// 																																			Operation: to.Ptr("Delete Live Pipeline"),
// 																																			Provider: to.Ptr("Microsoft Media Services"),
// 																																			Resource: to.Ptr("Live Pipeline Resource"),
// 																																		},
// 																																	},
// 																																	{
// 																																		Name: to.Ptr("Microsoft.Media/videoAnalyzers/livePipelines/activate/action"),
// 																																		Display: &armmediaservices.OperationDisplay{
// 																																			Description: to.Ptr("Activate any Live Pipeline"),
// 																																			Operation: to.Ptr("Activate Live Pipeline"),
// 																																			Provider: to.Ptr("Microsoft Media Services"),
// 																																			Resource: to.Ptr("Live Pipeline Resource"),
// 																																		},
// 																																	},
// 																																	{
// 																																		Name: to.Ptr("Microsoft.Media/videoAnalyzers/livePipelines/deactivate/action"),
// 																																		Display: &armmediaservices.OperationDisplay{
// 																																			Description: to.Ptr("Deactivate any Live Pipeline"),
// 																																			Operation: to.Ptr("Deactivate Live Pipeline"),
// 																																			Provider: to.Ptr("Microsoft Media Services"),
// 																																			Resource: to.Ptr("Live Pipeline Resource"),
// 																																		},
// 																																	},
// 																																	{
// 																																		Name: to.Ptr("Microsoft.Media/videoAnalyzers/livePipelines/operationsStatus/read"),
// 																																		Display: &armmediaservices.OperationDisplay{
// 																																			Description: to.Ptr("Read any Live Pipeline operation status"),
// 																																			Operation: to.Ptr("Read Live Pipeline operation status"),
// 																																			Provider: to.Ptr("Microsoft Media Services"),
// 																																			Resource: to.Ptr("Live Pipeline operation status Resource"),
// 																																		},
// 																																	},
// 																																	{
// 																																		Name: to.Ptr("Microsoft.Media/videoAnalyzers/pipelineJobs/read"),
// 																																		Display: &armmediaservices.OperationDisplay{
// 																																			Description: to.Ptr("Read any Pipeline Job"),
// 																																			Operation: to.Ptr("Read Pipeline Job"),
// 																																			Provider: to.Ptr("Microsoft Media Services"),
// 																																			Resource: to.Ptr("Pipeline Job Resource"),
// 																																		},
// 																																	},
// 																																	{
// 																																		Name: to.Ptr("Microsoft.Media/videoAnalyzers/pipelineJobs/write"),
// 																																		Display: &armmediaservices.OperationDisplay{
// 																																			Description: to.Ptr("Create or Update any Pipeline Job"),
// 																																			Operation: to.Ptr("Create or Update Pipeline Job"),
// 																																			Provider: to.Ptr("Microsoft Media Services"),
// 																																			Resource: to.Ptr("Pipeline Job Resource"),
// 																																		},
// 																																	},
// 																																	{
// 																																		Name: to.Ptr("Microsoft.Media/videoAnalyzers/pipelineJobs/delete"),
// 																																		Display: &armmediaservices.OperationDisplay{
// 																																			Description: to.Ptr("Delete any Pipeline Job"),
// 																																			Operation: to.Ptr("Delete Pipeline Job"),
// 																																			Provider: to.Ptr("Microsoft Media Services"),
// 																																			Resource: to.Ptr("Pipeline Job Resource"),
// 																																		},
// 																																	},
// 																																	{
// 																																		Name: to.Ptr("Microsoft.Media/videoAnalyzers/pipelineJobs/cancel/action"),
// 																																		Display: &armmediaservices.OperationDisplay{
// 																																			Description: to.Ptr("Cancel any Pipeline Job"),
// 																																			Operation: to.Ptr("Cancel Pipeline Job"),
// 																																			Provider: to.Ptr("Microsoft Media Services"),
// 																																			Resource: to.Ptr("Pipeline Job Resource"),
// 																																		},
// 																																	},
// 																																	{
// 																																		Name: to.Ptr("Microsoft.Media/videoAnalyzers/pipelineJobs/operationsStatus/read"),
// 																																		Display: &armmediaservices.OperationDisplay{
// 																																			Description: to.Ptr("Read any Pipeline Job operation status"),
// 																																			Operation: to.Ptr("Read Pipeline Job operation status"),
// 																																			Provider: to.Ptr("Microsoft Media Services"),
// 																																			Resource: to.Ptr("Pipeline Job operation status Resource"),
// 																																		},
// 																																	},
// 																																	{
// 																																		Name: to.Ptr("Microsoft.Media/videoAnalyzers/privateLinkResources/read"),
// 																																		Display: &armmediaservices.OperationDisplay{
// 																																			Description: to.Ptr("Read any Private Link Resource"),
// 																																			Operation: to.Ptr("Read Private Link Resource"),
// 																																			Provider: to.Ptr("Microsoft Media Services"),
// 																																			Resource: to.Ptr("PrivateLinkResource"),
// 																																		},
// 																																	},
// 																																	{
// 																																		Name: to.Ptr("Microsoft.Media/videoAnalyzers/privateEndpointConnectionProxies/read"),
// 																																		Display: &armmediaservices.OperationDisplay{
// 																																			Description: to.Ptr("Read any Private Endpoint Connection Proxy"),
// 																																			Operation: to.Ptr("Read Private Endpoint Connection Proxy"),
// 																																			Provider: to.Ptr("Microsoft Media Services"),
// 																																			Resource: to.Ptr("PrivateEndpointConnectionProxy"),
// 																																		},
// 																																	},
// 																																	{
// 																																		Name: to.Ptr("Microsoft.Media/videoAnalyzers/privateEndpointConnectionProxies/write"),
// 																																		Display: &armmediaservices.OperationDisplay{
// 																																			Description: to.Ptr("Create Private Endpoint Connection Proxy"),
// 																																			Operation: to.Ptr("Create Private Endpoint Connection Proxy"),
// 																																			Provider: to.Ptr("Microsoft Media Services"),
// 																																			Resource: to.Ptr("PrivateEndpointConnectionProxy"),
// 																																		},
// 																																	},
// 																																	{
// 																																		Name: to.Ptr("Microsoft.Media/videoAnalyzers/privateEndpointConnectionProxies/delete"),
// 																																		Display: &armmediaservices.OperationDisplay{
// 																																			Description: to.Ptr("Delete Private Endpoint Connection Proxy"),
// 																																			Operation: to.Ptr("Delete Private Endpoint Connection Proxy"),
// 																																			Provider: to.Ptr("Microsoft Media Services"),
// 																																			Resource: to.Ptr("PrivateEndpointConnectionProxy"),
// 																																		},
// 																																	},
// 																																	{
// 																																		Name: to.Ptr("Microsoft.Media/videoAnalyzers/privateEndpointConnectionProxies/validate/action"),
// 																																		Display: &armmediaservices.OperationDisplay{
// 																																			Description: to.Ptr("Validate Private Endpoint Connection Proxy"),
// 																																			Operation: to.Ptr("Validate Private Endpoint Connection Proxy"),
// 																																			Provider: to.Ptr("Microsoft Media Services"),
// 																																			Resource: to.Ptr("PrivateEndpointConnectionProxy"),
// 																																		},
// 																																	},
// 																																	{
// 																																		Name: to.Ptr("Microsoft.Media/videoAnalyzers/privateEndpointConnections/read"),
// 																																		Display: &armmediaservices.OperationDisplay{
// 																																			Description: to.Ptr("Read any Private Endpoint Connection"),
// 																																			Operation: to.Ptr("Read Private Endpoint Connection"),
// 																																			Provider: to.Ptr("Microsoft Media Services"),
// 																																			Resource: to.Ptr("PrivateEndpointConnection"),
// 																																		},
// 																																	},
// 																																	{
// 																																		Name: to.Ptr("Microsoft.Media/videoAnalyzers/privateEndpointConnections/write"),
// 																																		Display: &armmediaservices.OperationDisplay{
// 																																			Description: to.Ptr("Create Private Endpoint Connection"),
// 																																			Operation: to.Ptr("Create Private Endpoint Connection"),
// 																																			Provider: to.Ptr("Microsoft Media Services"),
// 																																			Resource: to.Ptr("PrivateEndpointConnection"),
// 																																		},
// 																																	},
// 																																	{
// 																																		Name: to.Ptr("Microsoft.Media/videoAnalyzers/privateEndpointConnections/delete"),
// 																																		Display: &armmediaservices.OperationDisplay{
// 																																			Description: to.Ptr("Delete Private Endpoint Connection"),
// 																																			Operation: to.Ptr("Delete Private Endpoint Connection"),
// 																																			Provider: to.Ptr("Microsoft Media Services"),
// 																																			Resource: to.Ptr("PrivateEndpointConnection"),
// 																																		},
// 																																	},
// 																																	{
// 																																		Name: to.Ptr("Microsoft.Media/videoAnalyzers/privateEndpointConnectionOperations/read"),
// 																																		Display: &armmediaservices.OperationDisplay{
// 																																			Description: to.Ptr("Read any Private Endpoint Connection Operation"),
// 																																			Operation: to.Ptr("Read Private Endpoint Connection Operation"),
// 																																			Provider: to.Ptr("Microsoft Media Services"),
// 																																			Resource: to.Ptr("Private Endpoint Connection Operation"),
// 																																		},
// 																																	},
// 																																	{
// 																																		Name: to.Ptr("Microsoft.Media/locations/checkNameAvailability/action"),
// 																																		Display: &armmediaservices.OperationDisplay{
// 																																			Description: to.Ptr("Checks if a Media Services account name is available"),
// 																																			Operation: to.Ptr("Check Name Availability"),
// 																																			Provider: to.Ptr("Microsoft Media Services"),
// 																																			Resource: to.Ptr("Microsoft Media Services"),
// 																																		},
// 																																}},
// 																															}
Output:

type OperationsClientListOptions

type OperationsClientListOptions struct {
}

OperationsClientListOptions contains the optional parameters for the OperationsClient.List method.

type OperationsClientListResponse

type OperationsClientListResponse struct {
	// A collection of Operation items.
	OperationCollection
}

OperationsClientListResponse contains the response from method OperationsClient.List.

type OutputFile

type OutputFile struct {
	// REQUIRED; The list of labels that describe how the encoder should multiplex video and audio into an output file. For example,
	// if the encoder is producing two video layers with labels v1 and v2, and one audio
	// layer with label a1, then an array like '[v1, a1]' tells the encoder to produce an output file with the video track represented
	// by v1 and the audio track represented by a1.
	Labels []*string
}

OutputFile - Represents an output file produced.

func (OutputFile) MarshalJSON

func (o OutputFile) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OutputFile.

func (*OutputFile) UnmarshalJSON

func (o *OutputFile) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OutputFile.

type Overlay

type Overlay struct {
	// REQUIRED; The label of the job input which is to be used as an overlay. The Input must specify exactly one file. You can
	// specify an image file in JPG, PNG, GIF or BMP format, or an audio file (such as a WAV,
	// MP3, WMA or M4A file), or a video file. See https://aka.ms/mesformats for the complete list of supported audio and video
	// file formats.
	InputLabel *string

	// REQUIRED; The discriminator for derived types.
	ODataType *string

	// The gain level of audio in the overlay. The value should be in the range [0, 1.0]. The default is 1.0.
	AudioGainLevel *float64

	// The end position, with reference to the input video, at which the overlay ends. The value should be in ISO 8601 format.
	// For example, PT30S to end the overlay at 30 seconds into the input video. If not
	// specified or the value is greater than the input video duration, the overlay will be applied until the end of the input
	// video if the overlay media duration is greater than the input video duration,
	// else the overlay will last as long as the overlay media duration.
	End *string

	// The duration over which the overlay fades in onto the input video. The value should be in ISO 8601 duration format. If
	// not specified the default behavior is to have no fade in (same as PT0S).
	FadeInDuration *string

	// The duration over which the overlay fades out of the input video. The value should be in ISO 8601 duration format. If not
	// specified the default behavior is to have no fade out (same as PT0S).
	FadeOutDuration *string

	// The start position, with reference to the input video, at which the overlay starts. The value should be in ISO 8601 format.
	// For example, PT05S to start the overlay at 5 seconds into the input video.
	// If not specified the overlay starts from the beginning of the input video.
	Start *string
}

Overlay - Base type for all overlays - image, audio or video.

func (*Overlay) GetOverlay

func (o *Overlay) GetOverlay() *Overlay

GetOverlay implements the OverlayClassification interface for type Overlay.

func (Overlay) MarshalJSON

func (o Overlay) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Overlay.

func (*Overlay) UnmarshalJSON

func (o *Overlay) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Overlay.

type OverlayClassification

type OverlayClassification interface {
	// GetOverlay returns the Overlay content of the underlying type.
	GetOverlay() *Overlay
}

OverlayClassification provides polymorphic access to related types. Call the interface's GetOverlay() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *AudioOverlay, *Overlay, *VideoOverlay

type PNGFormat

type PNGFormat struct {
	// REQUIRED; The file naming pattern used for the creation of output files. The following macros are supported in the file
	// name: {Basename} - An expansion macro that will use the name of the input video file. If
	// the base name(the file suffix is not included) of the input video file is less than 32 characters long, the base name of
	// input video files will be used. If the length of base name of the input video
	// file exceeds 32 characters, the base name is truncated to the first 32 characters in total length. {Extension} - The appropriate
	// extension for this format. {Label} - The label assigned to the
	// codec/layer. {Index} - A unique index for thumbnails. Only applicable to thumbnails. {AudioStream} - string "Audio" plus
	// audio stream number(start from 1). {Bitrate} - The audio/video bitrate in kbps.
	// Not applicable to thumbnails. {Codec} - The type of the audio/video codec. {Resolution} - The video resolution. Any unsubstituted
	// macros will be collapsed and removed from the filename.
	FilenamePattern *string

	// REQUIRED; The discriminator for derived types.
	ODataType *string
}

PNGFormat - Describes the settings for producing PNG thumbnails.

func (*PNGFormat) GetFormat

func (p *PNGFormat) GetFormat() *Format

GetFormat implements the FormatClassification interface for type PNGFormat.

func (*PNGFormat) GetImageFormat

func (p *PNGFormat) GetImageFormat() *ImageFormat

GetImageFormat implements the ImageFormatClassification interface for type PNGFormat.

func (PNGFormat) MarshalJSON

func (p PNGFormat) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PNGFormat.

func (*PNGFormat) UnmarshalJSON

func (p *PNGFormat) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PNGFormat.

type PNGImage

type PNGImage struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string

	// REQUIRED; The position in the input video from where to start generating thumbnails. The value can be in ISO 8601 format
	// (For example, PT05S to start at 5 seconds), or a frame count (For example, 10 to start at
	// the 10th frame), or a relative value to stream duration (For example, 10% to start at 10% of stream duration). Also supports
	// a macro {Best}, which tells the encoder to select the best thumbnail from
	// the first few seconds of the video and will only produce one thumbnail, no matter what other settings are for Step and
	// Range. The default value is macro {Best}.
	Start *string

	// The distance between two key frames. The value should be non-zero in the range [0.5, 20] seconds, specified in ISO 8601
	// format. The default is 2 seconds(PT2S). Note that this setting is ignored if
	// VideoSyncMode.Passthrough is set, where the KeyFrameInterval value will follow the input source setting.
	KeyFrameInterval *string

	// An optional label for the codec. The label can be used to control muxing behavior.
	Label *string

	// A collection of output PNG image layers to be produced by the encoder.
	Layers []*PNGLayer

	// The position relative to transform preset start time in the input video at which to stop generating thumbnails. The value
	// can be in ISO 8601 format (For example, PT5M30S to stop at 5 minutes and 30
	// seconds from start time), or a frame count (For example, 300 to stop at the 300th frame from the frame at start time. If
	// this value is 1, it means only producing one thumbnail at start time), or a
	// relative value to the stream duration (For example, 50% to stop at half of stream duration from start time). The default
	// value is 100%, which means to stop at the end of the stream.
	Range *string

	// The intervals at which thumbnails are generated. The value can be in ISO 8601 format (For example, PT05S for one image
	// every 5 seconds), or a frame count (For example, 30 for one image every 30
	// frames), or a relative value to stream duration (For example, 10% for one image every 10% of stream duration). Note: Step
	// value will affect the first generated thumbnail, which may not be exactly the
	// one specified at transform preset start time. This is due to the encoder, which tries to select the best thumbnail between
	// start time and Step position from start time as the first output. As the
	// default value is 10%, it means if stream has long duration, the first generated thumbnail might be far away from the one
	// specified at start time. Try to select reasonable value for Step if the first
	// thumbnail is expected close to start time, or set Range value at 1 if only one thumbnail is needed at start time.
	Step *string

	// The resizing mode - how the input video will be resized to fit the desired output resolution(s). Default is AutoSize
	StretchMode *StretchMode

	// The Video Sync Mode
	SyncMode *VideoSyncMode
}

PNGImage - Describes the properties for producing a series of PNG images from the input video.

func (*PNGImage) GetCodec

func (p *PNGImage) GetCodec() *Codec

GetCodec implements the CodecClassification interface for type PNGImage.

func (*PNGImage) GetImage

func (p *PNGImage) GetImage() *Image

GetImage implements the ImageClassification interface for type PNGImage.

func (*PNGImage) GetVideo

func (p *PNGImage) GetVideo() *Video

GetVideo implements the VideoClassification interface for type PNGImage.

func (PNGImage) MarshalJSON

func (p PNGImage) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PNGImage.

func (*PNGImage) UnmarshalJSON

func (p *PNGImage) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PNGImage.

type PNGLayer

type PNGLayer struct {
	// The height of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example
	// 50% means the output video has half as many pixels in height as the input.
	Height *string

	// The alphanumeric label for this layer, which can be used in multiplexing different video and audio layers, or in naming
	// the output file.
	Label *string

	// The width of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example
	// 50% means the output video has half as many pixels in width as the input.
	Width *string
}

PNGLayer - Describes the settings to produce a PNG image from the input video.

func (PNGLayer) MarshalJSON

func (p PNGLayer) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PNGLayer.

func (*PNGLayer) UnmarshalJSON

func (p *PNGLayer) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PNGLayer.

type PresentationTimeRange

type PresentationTimeRange struct {
	// The absolute end time boundary.
	EndTimestamp *int64

	// The indicator of forcing existing of end time stamp.
	ForceEndTimestamp *bool

	// The relative to end right edge.
	LiveBackoffDuration *int64

	// The relative to end sliding window.
	PresentationWindowDuration *int64

	// The absolute start time boundary.
	StartTimestamp *int64

	// The time scale of time stamps.
	Timescale *int64
}

PresentationTimeRange - The presentation time range, this is asset related and not recommended for Account Filter.

func (PresentationTimeRange) MarshalJSON

func (p PresentationTimeRange) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PresentationTimeRange.

func (*PresentationTimeRange) UnmarshalJSON

func (p *PresentationTimeRange) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PresentationTimeRange.

type Preset

type Preset struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string
}

Preset - Base type for all Presets, which define the recipe or instructions on how the input media files should be processed.

func (*Preset) GetPreset

func (p *Preset) GetPreset() *Preset

GetPreset implements the PresetClassification interface for type Preset.

func (Preset) MarshalJSON

func (p Preset) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Preset.

func (*Preset) UnmarshalJSON

func (p *Preset) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Preset.

type PresetClassification

type PresetClassification interface {
	// GetPreset returns the Preset content of the underlying type.
	GetPreset() *Preset
}

PresetClassification provides polymorphic access to related types. Call the interface's GetPreset() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *AudioAnalyzerPreset, *BuiltInStandardEncoderPreset, *FaceDetectorPreset, *Preset, *StandardEncoderPreset, *VideoAnalyzerPreset

type PresetConfigurations

type PresetConfigurations struct {
	// Allows you to configure the encoder settings to control the balance between speed and quality. Example: set Complexity
	// as Speed for faster encoding but less compression efficiency.
	Complexity *Complexity

	// Sets the interleave mode of the output to control how audio and video are stored in the container format. Example: set
	// InterleavedOutput as NonInterleavedOutput to produce audio-only and video-only
	// outputs in separate MP4 files.
	InterleaveOutput *InterleaveOutput

	// The key frame interval in seconds. Example: set KeyFrameIntervalInSeconds as 2 to reduce the playback buffering for some
	// players.
	KeyFrameIntervalInSeconds *float32

	// The maximum bitrate in bits per second (threshold for the top video layer). Example: set MaxBitrateBps as 6000000 to avoid
	// producing very high bitrate outputs for contents with high complexity.
	MaxBitrateBps *int32

	// The maximum height of output video layers. Example: set MaxHeight as 720 to produce output layers up to 720P even if the
	// input is 4K.
	MaxHeight *int32

	// The maximum number of output video layers. Example: set MaxLayers as 4 to make sure at most 4 output layers are produced
	// to control the overall cost of the encoding job.
	MaxLayers *int32

	// The minimum bitrate in bits per second (threshold for the bottom video layer). Example: set MinBitrateBps as 200000 to
	// have a bottom layer that covers users with low network bandwidth.
	MinBitrateBps *int32

	// The minimum height of output video layers. Example: set MinHeight as 360 to avoid output layers of smaller resolutions
	// like 180P.
	MinHeight *int32
}

PresetConfigurations - An object of optional configuration settings for encoder.

func (PresetConfigurations) MarshalJSON

func (p PresetConfigurations) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PresetConfigurations.

func (*PresetConfigurations) UnmarshalJSON

func (p *PresetConfigurations) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PresetConfigurations.

type Priority

type Priority string

Priority - Sets the relative priority of the TransformOutputs within a Transform. This sets the priority that the service uses for processing TransformOutputs. The default priority is Normal.

const (
	// PriorityHigh - Used for TransformOutputs that should take precedence over others.
	PriorityHigh Priority = "High"
	// PriorityLow - Used for TransformOutputs that can be generated after Normal and High priority TransformOutputs.
	PriorityLow Priority = "Low"
	// PriorityNormal - Used for TransformOutputs that can be generated at Normal priority.
	PriorityNormal Priority = "Normal"
)

func PossiblePriorityValues

func PossiblePriorityValues() []Priority

PossiblePriorityValues returns the possible values for the Priority const type.

type PrivateEndpoint

type PrivateEndpoint struct {
	// READ-ONLY; The ARM identifier for Private Endpoint
	ID *string
}

PrivateEndpoint - The Private Endpoint resource.

func (PrivateEndpoint) MarshalJSON

func (p PrivateEndpoint) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateEndpoint.

func (*PrivateEndpoint) UnmarshalJSON

func (p *PrivateEndpoint) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpoint.

type PrivateEndpointConnection

type PrivateEndpointConnection struct {
	// Resource properties.
	Properties *PrivateEndpointConnectionProperties

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

PrivateEndpointConnection - The Private Endpoint Connection resource.

func (PrivateEndpointConnection) MarshalJSON

func (p PrivateEndpointConnection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnection.

func (*PrivateEndpointConnection) UnmarshalJSON

func (p *PrivateEndpointConnection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnection.

type PrivateEndpointConnectionListResult

type PrivateEndpointConnectionListResult struct {
	// Array of private endpoint connections
	Value []*PrivateEndpointConnection
}

PrivateEndpointConnectionListResult - List of private endpoint connection associated with the specified storage account

func (PrivateEndpointConnectionListResult) MarshalJSON

func (p PrivateEndpointConnectionListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionListResult.

func (*PrivateEndpointConnectionListResult) UnmarshalJSON

func (p *PrivateEndpointConnectionListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionListResult.

type PrivateEndpointConnectionProperties

type PrivateEndpointConnectionProperties struct {
	// REQUIRED; A collection of information about the state of the connection between service consumer and provider.
	PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState

	// The resource of private end point.
	PrivateEndpoint *PrivateEndpoint

	// READ-ONLY; The provisioning state of the private endpoint connection resource.
	ProvisioningState *PrivateEndpointConnectionProvisioningState
}

PrivateEndpointConnectionProperties - Properties of the PrivateEndpointConnectProperties.

func (PrivateEndpointConnectionProperties) MarshalJSON

func (p PrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionProperties.

func (*PrivateEndpointConnectionProperties) UnmarshalJSON

func (p *PrivateEndpointConnectionProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionProperties.

type PrivateEndpointConnectionProvisioningState

type PrivateEndpointConnectionProvisioningState string

PrivateEndpointConnectionProvisioningState - The current provisioning state.

const (
	PrivateEndpointConnectionProvisioningStateCreating  PrivateEndpointConnectionProvisioningState = "Creating"
	PrivateEndpointConnectionProvisioningStateDeleting  PrivateEndpointConnectionProvisioningState = "Deleting"
	PrivateEndpointConnectionProvisioningStateFailed    PrivateEndpointConnectionProvisioningState = "Failed"
	PrivateEndpointConnectionProvisioningStateSucceeded PrivateEndpointConnectionProvisioningState = "Succeeded"
)

func PossiblePrivateEndpointConnectionProvisioningStateValues

func PossiblePrivateEndpointConnectionProvisioningStateValues() []PrivateEndpointConnectionProvisioningState

PossiblePrivateEndpointConnectionProvisioningStateValues returns the possible values for the PrivateEndpointConnectionProvisioningState const type.

type PrivateEndpointConnectionsClient

type PrivateEndpointConnectionsClient struct {
	// contains filtered or unexported fields
}

PrivateEndpointConnectionsClient contains the methods for the PrivateEndpointConnections group. Don't use this type directly, use NewPrivateEndpointConnectionsClient() instead.

func NewPrivateEndpointConnectionsClient

func NewPrivateEndpointConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateEndpointConnectionsClient, error)

NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient with the specified values.

  • subscriptionID - The unique identifier for a Microsoft Azure subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*PrivateEndpointConnectionsClient) CreateOrUpdate

CreateOrUpdate - Update an existing private endpoint connection. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • parameters - The request parameters
  • options - PrivateEndpointConnectionsClientCreateOrUpdateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Accounts/stable/2021-11-01/examples/private-endpoint-connection-put.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewPrivateEndpointConnectionsClient().CreateOrUpdate(ctx, "contoso", "contososports", "connectionName1", armmediaservices.PrivateEndpointConnection{
	Properties: &armmediaservices.PrivateEndpointConnectionProperties{
		PrivateLinkServiceConnectionState: &armmediaservices.PrivateLinkServiceConnectionState{
			Description: to.Ptr("Test description."),
			Status:      to.Ptr(armmediaservices.PrivateEndpointServiceConnectionStatusApproved),
		},
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.PrivateEndpointConnection = armmediaservices.PrivateEndpointConnection{
// 	Name: to.Ptr("connectionName1"),
// 	Type: to.Ptr("Microsoft.Media/mediaservices/privateEndpointConnections"),
// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/fabrikam/providers/Microsoft.Media/mediaservices/contososports/privateEndpointConnections/connectionName1"),
// 	Properties: &armmediaservices.PrivateEndpointConnectionProperties{
// 		PrivateEndpoint: &armmediaservices.PrivateEndpoint{
// 			ID: to.Ptr("/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/reosuceGroup1/providers/Microsoft.Network/privateEndpoints/privateEndpointName1"),
// 		},
// 		PrivateLinkServiceConnectionState: &armmediaservices.PrivateLinkServiceConnectionState{
// 			Description: to.Ptr("Test description."),
// 			Status: to.Ptr(armmediaservices.PrivateEndpointServiceConnectionStatusApproved),
// 		},
// 		ProvisioningState: to.Ptr(armmediaservices.PrivateEndpointConnectionProvisioningStateSucceeded),
// 	},
// }
Output:

func (*PrivateEndpointConnectionsClient) Delete

Delete - Deletes a private endpoint connection. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • options - PrivateEndpointConnectionsClientDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Accounts/stable/2021-11-01/examples/private-endpoint-connection-delete.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewPrivateEndpointConnectionsClient().Delete(ctx, "contoso", "contososports", "connectionName1", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*PrivateEndpointConnectionsClient) Get

Get - Get the details of a private endpoint connection. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • options - PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Accounts/stable/2021-11-01/examples/private-endpoint-connection-get-by-name.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewPrivateEndpointConnectionsClient().Get(ctx, "contoso", "contososports", "connectionName1", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.PrivateEndpointConnection = armmediaservices.PrivateEndpointConnection{
// 	Name: to.Ptr("connectionName1"),
// 	Type: to.Ptr("Microsoft.Media/mediaservices/privateEndpointConnections"),
// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/fabrikam/providers/Microsoft.Media/mediaservices/contososports/privateEndpointConnections/connectionName1"),
// 	Properties: &armmediaservices.PrivateEndpointConnectionProperties{
// 		PrivateEndpoint: &armmediaservices.PrivateEndpoint{
// 			ID: to.Ptr("/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/reosuceGroup1/providers/Microsoft.Network/privateEndpoints/privateEndpointName1"),
// 		},
// 		PrivateLinkServiceConnectionState: &armmediaservices.PrivateLinkServiceConnectionState{
// 			Description: to.Ptr("Test description."),
// 			Status: to.Ptr(armmediaservices.PrivateEndpointServiceConnectionStatusApproved),
// 		},
// 		ProvisioningState: to.Ptr(armmediaservices.PrivateEndpointConnectionProvisioningStateSucceeded),
// 	},
// }
Output:

func (*PrivateEndpointConnectionsClient) List

List - List all private endpoint connections. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • options - PrivateEndpointConnectionsClientListOptions contains the optional parameters for the PrivateEndpointConnectionsClient.List method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Accounts/stable/2021-11-01/examples/private-endpoint-connection-list.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewPrivateEndpointConnectionsClient().List(ctx, "contoso", "contososports", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.PrivateEndpointConnectionListResult = armmediaservices.PrivateEndpointConnectionListResult{
// 	Value: []*armmediaservices.PrivateEndpointConnection{
// 		{
// 			Name: to.Ptr("cn1"),
// 			Type: to.Ptr("Microsoft.Media/mediaservices/privateEndpointConnections"),
// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/fabrikam/providers/Microsoft.Media/mediaservices/contososports/privateEndpointConnections/cn1"),
// 			Properties: &armmediaservices.PrivateEndpointConnectionProperties{
// 				PrivateEndpoint: &armmediaservices.PrivateEndpoint{
// 					ID: to.Ptr("/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/reosuceGroup1/providers/Microsoft.Network/privateEndpoints/pe1"),
// 				},
// 				PrivateLinkServiceConnectionState: &armmediaservices.PrivateLinkServiceConnectionState{
// 					Description: to.Ptr("Test description"),
// 					Status: to.Ptr(armmediaservices.PrivateEndpointServiceConnectionStatusApproved),
// 				},
// 				ProvisioningState: to.Ptr(armmediaservices.PrivateEndpointConnectionProvisioningStateSucceeded),
// 			},
// 		},
// 		{
// 			Name: to.Ptr("cn2"),
// 			Type: to.Ptr("Microsoft.Media/mediaservices/privateEndpointConnections"),
// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/fabrikam/providers/Microsoft.Media/mediaservices/contososports/privateEndpointConnections/cn2"),
// 			Properties: &armmediaservices.PrivateEndpointConnectionProperties{
// 				PrivateEndpoint: &armmediaservices.PrivateEndpoint{
// 					ID: to.Ptr("/subscriptions/22222222-2222-2222-2222-222222222222/resourceGroups/reosuceGroup2/providers/Microsoft.Network/privateEndpoints/pe2"),
// 				},
// 				PrivateLinkServiceConnectionState: &armmediaservices.PrivateLinkServiceConnectionState{
// 					Description: to.Ptr("Test description"),
// 					Status: to.Ptr(armmediaservices.PrivateEndpointServiceConnectionStatusPending),
// 				},
// 				ProvisioningState: to.Ptr(armmediaservices.PrivateEndpointConnectionProvisioningStateSucceeded),
// 			},
// 	}},
// }
Output:

type PrivateEndpointConnectionsClientCreateOrUpdateOptions

type PrivateEndpointConnectionsClientCreateOrUpdateOptions struct {
}

PrivateEndpointConnectionsClientCreateOrUpdateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.CreateOrUpdate method.

type PrivateEndpointConnectionsClientCreateOrUpdateResponse

type PrivateEndpointConnectionsClientCreateOrUpdateResponse struct {
	// The Private Endpoint Connection resource.
	PrivateEndpointConnection
}

PrivateEndpointConnectionsClientCreateOrUpdateResponse contains the response from method PrivateEndpointConnectionsClient.CreateOrUpdate.

type PrivateEndpointConnectionsClientDeleteOptions

type PrivateEndpointConnectionsClientDeleteOptions struct {
}

PrivateEndpointConnectionsClientDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Delete method.

type PrivateEndpointConnectionsClientDeleteResponse

type PrivateEndpointConnectionsClientDeleteResponse struct {
}

PrivateEndpointConnectionsClientDeleteResponse contains the response from method PrivateEndpointConnectionsClient.Delete.

type PrivateEndpointConnectionsClientGetOptions

type PrivateEndpointConnectionsClientGetOptions struct {
}

PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get method.

type PrivateEndpointConnectionsClientGetResponse

type PrivateEndpointConnectionsClientGetResponse struct {
	// The Private Endpoint Connection resource.
	PrivateEndpointConnection
}

PrivateEndpointConnectionsClientGetResponse contains the response from method PrivateEndpointConnectionsClient.Get.

type PrivateEndpointConnectionsClientListOptions

type PrivateEndpointConnectionsClientListOptions struct {
}

PrivateEndpointConnectionsClientListOptions contains the optional parameters for the PrivateEndpointConnectionsClient.List method.

type PrivateEndpointConnectionsClientListResponse

type PrivateEndpointConnectionsClientListResponse struct {
	// List of private endpoint connection associated with the specified storage account
	PrivateEndpointConnectionListResult
}

PrivateEndpointConnectionsClientListResponse contains the response from method PrivateEndpointConnectionsClient.List.

type PrivateEndpointServiceConnectionStatus

type PrivateEndpointServiceConnectionStatus string

PrivateEndpointServiceConnectionStatus - The private endpoint connection status.

const (
	PrivateEndpointServiceConnectionStatusApproved PrivateEndpointServiceConnectionStatus = "Approved"
	PrivateEndpointServiceConnectionStatusPending  PrivateEndpointServiceConnectionStatus = "Pending"
	PrivateEndpointServiceConnectionStatusRejected PrivateEndpointServiceConnectionStatus = "Rejected"
)

func PossiblePrivateEndpointServiceConnectionStatusValues

func PossiblePrivateEndpointServiceConnectionStatusValues() []PrivateEndpointServiceConnectionStatus

PossiblePrivateEndpointServiceConnectionStatusValues returns the possible values for the PrivateEndpointServiceConnectionStatus const type.

type PrivateLinkResource

type PrivateLinkResource struct {
	// Resource properties.
	Properties *PrivateLinkResourceProperties

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

PrivateLinkResource - A private link resource

func (PrivateLinkResource) MarshalJSON

func (p PrivateLinkResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateLinkResource.

func (*PrivateLinkResource) UnmarshalJSON

func (p *PrivateLinkResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResource.

type PrivateLinkResourceListResult

type PrivateLinkResourceListResult struct {
	// Array of private link resources
	Value []*PrivateLinkResource
}

PrivateLinkResourceListResult - A list of private link resources

func (PrivateLinkResourceListResult) MarshalJSON

func (p PrivateLinkResourceListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceListResult.

func (*PrivateLinkResourceListResult) UnmarshalJSON

func (p *PrivateLinkResourceListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceListResult.

type PrivateLinkResourceProperties

type PrivateLinkResourceProperties struct {
	// The private link resource Private link DNS zone name.
	RequiredZoneNames []*string

	// READ-ONLY; The private link resource group id.
	GroupID *string

	// READ-ONLY; The private link resource required member names.
	RequiredMembers []*string
}

PrivateLinkResourceProperties - Properties of a private link resource.

func (PrivateLinkResourceProperties) MarshalJSON

func (p PrivateLinkResourceProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceProperties.

func (*PrivateLinkResourceProperties) UnmarshalJSON

func (p *PrivateLinkResourceProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceProperties.

type PrivateLinkResourcesClient

type PrivateLinkResourcesClient struct {
	// contains filtered or unexported fields
}

PrivateLinkResourcesClient contains the methods for the PrivateLinkResources group. Don't use this type directly, use NewPrivateLinkResourcesClient() instead.

func NewPrivateLinkResourcesClient

func NewPrivateLinkResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateLinkResourcesClient, error)

NewPrivateLinkResourcesClient creates a new instance of PrivateLinkResourcesClient with the specified values.

  • subscriptionID - The unique identifier for a Microsoft Azure subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*PrivateLinkResourcesClient) Get

Get - Get details of a group ID. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • options - PrivateLinkResourcesClientGetOptions contains the optional parameters for the PrivateLinkResourcesClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Accounts/stable/2021-11-01/examples/private-link-resources-get-by-name.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewPrivateLinkResourcesClient().Get(ctx, "contoso", "contososports", "keydelivery", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.PrivateLinkResource = armmediaservices.PrivateLinkResource{
// 	Name: to.Ptr("keydelivery"),
// 	Type: to.Ptr("Microsoft.Media/mediaservices/privateLinkResources"),
// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/fabrikam/providers/Microsoft.Media/mediaservices/contososports/privateLinkResources/keydelivery"),
// 	Properties: &armmediaservices.PrivateLinkResourceProperties{
// 		GroupID: to.Ptr("keydelivery"),
// 		RequiredMembers: []*string{
// 			to.Ptr("keydelivery")},
// 		},
// 	}
Output:

func (*PrivateLinkResourcesClient) List

List - List supported group IDs. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • options - PrivateLinkResourcesClientListOptions contains the optional parameters for the PrivateLinkResourcesClient.List method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Accounts/stable/2021-11-01/examples/private-link-resources-list.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewPrivateLinkResourcesClient().List(ctx, "contoso", "contososports", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.PrivateLinkResourceListResult = armmediaservices.PrivateLinkResourceListResult{
// 	Value: []*armmediaservices.PrivateLinkResource{
// 		{
// 			Name: to.Ptr("keydelivery"),
// 			Type: to.Ptr("Microsoft.Media/mediaservices/privateLinkResources"),
// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/fabrikam/providers/Microsoft.Media/mediaservices/contososports/privateLinkResources/keydelivery"),
// 			Properties: &armmediaservices.PrivateLinkResourceProperties{
// 				GroupID: to.Ptr("keydelivery"),
// 				RequiredMembers: []*string{
// 					to.Ptr("keydelivery")},
// 				},
// 		}},
// 	}
Output:

type PrivateLinkResourcesClientGetOptions

type PrivateLinkResourcesClientGetOptions struct {
}

PrivateLinkResourcesClientGetOptions contains the optional parameters for the PrivateLinkResourcesClient.Get method.

type PrivateLinkResourcesClientGetResponse

type PrivateLinkResourcesClientGetResponse struct {
	// A private link resource
	PrivateLinkResource
}

PrivateLinkResourcesClientGetResponse contains the response from method PrivateLinkResourcesClient.Get.

type PrivateLinkResourcesClientListOptions

type PrivateLinkResourcesClientListOptions struct {
}

PrivateLinkResourcesClientListOptions contains the optional parameters for the PrivateLinkResourcesClient.List method.

type PrivateLinkResourcesClientListResponse

type PrivateLinkResourcesClientListResponse struct {
	// A list of private link resources
	PrivateLinkResourceListResult
}

PrivateLinkResourcesClientListResponse contains the response from method PrivateLinkResourcesClient.List.

type PrivateLinkServiceConnectionState

type PrivateLinkServiceConnectionState struct {
	// A message indicating if changes on the service provider require any updates on the consumer.
	ActionsRequired *string

	// The reason for approval/rejection of the connection.
	Description *string

	// Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service.
	Status *PrivateEndpointServiceConnectionStatus
}

PrivateLinkServiceConnectionState - A collection of information about the state of the connection between service consumer and provider.

func (PrivateLinkServiceConnectionState) MarshalJSON

func (p PrivateLinkServiceConnectionState) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateLinkServiceConnectionState.

func (*PrivateLinkServiceConnectionState) UnmarshalJSON

func (p *PrivateLinkServiceConnectionState) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkServiceConnectionState.

type Properties

type Properties struct {
	// READ-ONLY; The service specifications.
	ServiceSpecification *ServiceSpecification
}

Properties - The service specification property.

func (Properties) MarshalJSON

func (p Properties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Properties.

func (*Properties) UnmarshalJSON

func (p *Properties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Properties.

type ProvisioningState

type ProvisioningState string

ProvisioningState - Provisioning state of the Media Services account.

const (
	// ProvisioningStateFailed - Provisioning state failed.
	ProvisioningStateFailed ProvisioningState = "Failed"
	// ProvisioningStateInProgress - Provisioning state in progress.
	ProvisioningStateInProgress ProvisioningState = "InProgress"
	// ProvisioningStateSucceeded - Provisioning state succeeded.
	ProvisioningStateSucceeded ProvisioningState = "Succeeded"
)

func PossibleProvisioningStateValues

func PossibleProvisioningStateValues() []ProvisioningState

PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type.

type ProxyResource

type ProxyResource struct {
	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

ProxyResource - The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location

func (ProxyResource) MarshalJSON

func (p ProxyResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ProxyResource.

func (*ProxyResource) UnmarshalJSON

func (p *ProxyResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ProxyResource.

type PublicNetworkAccess

type PublicNetworkAccess string

PublicNetworkAccess - Whether or not public network access is allowed for resources under the Media Services account.

const (
	// PublicNetworkAccessDisabled - Public network access is disabled.
	PublicNetworkAccessDisabled PublicNetworkAccess = "Disabled"
	// PublicNetworkAccessEnabled - Public network access is enabled.
	PublicNetworkAccessEnabled PublicNetworkAccess = "Enabled"
)

func PossiblePublicNetworkAccessValues

func PossiblePublicNetworkAccessValues() []PublicNetworkAccess

PossiblePublicNetworkAccessValues returns the possible values for the PublicNetworkAccess const type.

type Rectangle

type Rectangle struct {
	// The height of the rectangular region in pixels. This can be absolute pixel value (e.g 100), or relative to the size of
	// the video (For example, 50%).
	Height *string

	// The number of pixels from the left-margin. This can be absolute pixel value (e.g 100), or relative to the size of the video
	// (For example, 50%).
	Left *string

	// The number of pixels from the top-margin. This can be absolute pixel value (e.g 100), or relative to the size of the video
	// (For example, 50%).
	Top *string

	// The width of the rectangular region in pixels. This can be absolute pixel value (e.g 100), or relative to the size of the
	// video (For example, 50%).
	Width *string
}

Rectangle - Describes the properties of a rectangular window applied to the input media before processing it.

func (Rectangle) MarshalJSON

func (r Rectangle) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Rectangle.

func (*Rectangle) UnmarshalJSON

func (r *Rectangle) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Rectangle.

type Resource

type Resource struct {
	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

Resource - Common fields that are returned in the response for all Azure Resource Manager resources

func (Resource) MarshalJSON

func (r Resource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Resource.

func (*Resource) UnmarshalJSON

func (r *Resource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Resource.

type ResourceIdentity

type ResourceIdentity struct {
	// REQUIRED; Indicates whether to use System Assigned Managed Identity. Mutual exclusive with User Assigned Managed Identity.
	UseSystemAssignedIdentity *bool

	// The user assigned managed identity's ARM ID to use when accessing a resource.
	UserAssignedIdentity *string
}

func (ResourceIdentity) MarshalJSON

func (r ResourceIdentity) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ResourceIdentity.

func (*ResourceIdentity) UnmarshalJSON

func (r *ResourceIdentity) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceIdentity.

type Rotation

type Rotation string

Rotation - The rotation, if any, to be applied to the input video, before it is encoded. Default is Auto

const (
	// RotationAuto - Automatically detect and rotate as needed.
	RotationAuto Rotation = "Auto"
	// RotationNone - Do not rotate the video. If the output format supports it, any metadata about rotation is kept intact.
	RotationNone Rotation = "None"
	// RotationRotate0 - Do not rotate the video but remove any metadata about the rotation.
	RotationRotate0 Rotation = "Rotate0"
	// RotationRotate180 - Rotate 180 degrees clockwise.
	RotationRotate180 Rotation = "Rotate180"
	// RotationRotate270 - Rotate 270 degrees clockwise.
	RotationRotate270 Rotation = "Rotate270"
	// RotationRotate90 - Rotate 90 degrees clockwise.
	RotationRotate90 Rotation = "Rotate90"
)

func PossibleRotationValues

func PossibleRotationValues() []Rotation

PossibleRotationValues returns the possible values for the Rotation const type.

type SecurityLevel added in v3.1.0

type SecurityLevel string

SecurityLevel - The security level.

const (
	// SecurityLevelSL150 - For clients under development or test. No protection against unauthorized use.
	SecurityLevelSL150 SecurityLevel = "SL150"
	// SecurityLevelSL2000 - For hardened devices and applications consuming commercial content. Software or hardware protection.
	SecurityLevelSL2000 SecurityLevel = "SL2000"
	// SecurityLevelSL3000 - For hardened devices only. Hardware protection.
	SecurityLevelSL3000 SecurityLevel = "SL3000"
	// SecurityLevelUnknown - Represents a SecurityLevel that is unavailable in current API version.
	SecurityLevelUnknown SecurityLevel = "Unknown"
)

func PossibleSecurityLevelValues added in v3.1.0

func PossibleSecurityLevelValues() []SecurityLevel

PossibleSecurityLevelValues returns the possible values for the SecurityLevel const type.

type SelectAudioTrackByAttribute

type SelectAudioTrackByAttribute struct {
	// REQUIRED; The TrackAttribute to filter the tracks by.
	Attribute *TrackAttribute

	// REQUIRED; The type of AttributeFilter to apply to the TrackAttribute in order to select the tracks.
	Filter *AttributeFilter

	// REQUIRED; The discriminator for derived types.
	ODataType *string

	// Optional designation for single channel audio tracks. Can be used to combine the tracks into stereo or multi-channel audio
	// tracks.
	ChannelMapping *ChannelMapping

	// The value to filter the tracks by. Only used when AttributeFilter.ValueEquals is specified for the Filter property.
	FilterValue *string
}

SelectAudioTrackByAttribute - Select audio tracks from the input by specifying an attribute and an attribute filter.

func (*SelectAudioTrackByAttribute) GetAudioTrackDescriptor

func (s *SelectAudioTrackByAttribute) GetAudioTrackDescriptor() *AudioTrackDescriptor

GetAudioTrackDescriptor implements the AudioTrackDescriptorClassification interface for type SelectAudioTrackByAttribute.

func (*SelectAudioTrackByAttribute) GetTrackDescriptor

func (s *SelectAudioTrackByAttribute) GetTrackDescriptor() *TrackDescriptor

GetTrackDescriptor implements the TrackDescriptorClassification interface for type SelectAudioTrackByAttribute.

func (SelectAudioTrackByAttribute) MarshalJSON

func (s SelectAudioTrackByAttribute) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SelectAudioTrackByAttribute.

func (*SelectAudioTrackByAttribute) UnmarshalJSON

func (s *SelectAudioTrackByAttribute) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SelectAudioTrackByAttribute.

type SelectAudioTrackByID

type SelectAudioTrackByID struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string

	// REQUIRED; Track identifier to select
	TrackID *int64

	// Optional designation for single channel audio tracks. Can be used to combine the tracks into stereo or multi-channel audio
	// tracks.
	ChannelMapping *ChannelMapping
}

SelectAudioTrackByID - Select audio tracks from the input by specifying a track identifier.

func (*SelectAudioTrackByID) GetAudioTrackDescriptor

func (s *SelectAudioTrackByID) GetAudioTrackDescriptor() *AudioTrackDescriptor

GetAudioTrackDescriptor implements the AudioTrackDescriptorClassification interface for type SelectAudioTrackByID.

func (*SelectAudioTrackByID) GetTrackDescriptor

func (s *SelectAudioTrackByID) GetTrackDescriptor() *TrackDescriptor

GetTrackDescriptor implements the TrackDescriptorClassification interface for type SelectAudioTrackByID.

func (SelectAudioTrackByID) MarshalJSON

func (s SelectAudioTrackByID) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SelectAudioTrackByID.

func (*SelectAudioTrackByID) UnmarshalJSON

func (s *SelectAudioTrackByID) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SelectAudioTrackByID.

type SelectVideoTrackByAttribute

type SelectVideoTrackByAttribute struct {
	// REQUIRED; The TrackAttribute to filter the tracks by.
	Attribute *TrackAttribute

	// REQUIRED; The type of AttributeFilter to apply to the TrackAttribute in order to select the tracks.
	Filter *AttributeFilter

	// REQUIRED; The discriminator for derived types.
	ODataType *string

	// The value to filter the tracks by. Only used when AttributeFilter.ValueEquals is specified for the Filter property. For
	// TrackAttribute.Bitrate, this should be an integer value in bits per second (e.g:
	// '1500000'). The TrackAttribute.Language is not supported for video tracks.
	FilterValue *string
}

SelectVideoTrackByAttribute - Select video tracks from the input by specifying an attribute and an attribute filter.

func (*SelectVideoTrackByAttribute) GetTrackDescriptor

func (s *SelectVideoTrackByAttribute) GetTrackDescriptor() *TrackDescriptor

GetTrackDescriptor implements the TrackDescriptorClassification interface for type SelectVideoTrackByAttribute.

func (*SelectVideoTrackByAttribute) GetVideoTrackDescriptor

func (s *SelectVideoTrackByAttribute) GetVideoTrackDescriptor() *VideoTrackDescriptor

GetVideoTrackDescriptor implements the VideoTrackDescriptorClassification interface for type SelectVideoTrackByAttribute.

func (SelectVideoTrackByAttribute) MarshalJSON

func (s SelectVideoTrackByAttribute) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SelectVideoTrackByAttribute.

func (*SelectVideoTrackByAttribute) UnmarshalJSON

func (s *SelectVideoTrackByAttribute) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SelectVideoTrackByAttribute.

type SelectVideoTrackByID

type SelectVideoTrackByID struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string

	// REQUIRED; Track identifier to select
	TrackID *int64
}

SelectVideoTrackByID - Select video tracks from the input by specifying a track identifier.

func (*SelectVideoTrackByID) GetTrackDescriptor

func (s *SelectVideoTrackByID) GetTrackDescriptor() *TrackDescriptor

GetTrackDescriptor implements the TrackDescriptorClassification interface for type SelectVideoTrackByID.

func (*SelectVideoTrackByID) GetVideoTrackDescriptor

func (s *SelectVideoTrackByID) GetVideoTrackDescriptor() *VideoTrackDescriptor

GetVideoTrackDescriptor implements the VideoTrackDescriptorClassification interface for type SelectVideoTrackByID.

func (SelectVideoTrackByID) MarshalJSON

func (s SelectVideoTrackByID) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SelectVideoTrackByID.

func (*SelectVideoTrackByID) UnmarshalJSON

func (s *SelectVideoTrackByID) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SelectVideoTrackByID.

type ServiceSpecification

type ServiceSpecification struct {
	// READ-ONLY; List of log specifications.
	LogSpecifications []*LogSpecification

	// READ-ONLY; List of metric specifications.
	MetricSpecifications []*MetricSpecification
}

ServiceSpecification - The service metric specifications.

func (ServiceSpecification) MarshalJSON

func (s ServiceSpecification) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ServiceSpecification.

func (*ServiceSpecification) UnmarshalJSON

func (s *ServiceSpecification) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ServiceSpecification.

type StandardEncoderPreset

type StandardEncoderPreset struct {
	// REQUIRED; The list of codecs to be used when encoding the input video.
	Codecs []CodecClassification

	// REQUIRED; The list of outputs to be produced by the encoder.
	Formats []FormatClassification

	// REQUIRED; The discriminator for derived types.
	ODataType *string

	// Dictionary containing key value pairs for parameters not exposed in the preset itself
	ExperimentalOptions map[string]*string

	// One or more filtering operations that are applied to the input media before encoding.
	Filters *Filters
}

StandardEncoderPreset - Describes all the settings to be used when encoding the input video with the Standard Encoder.

func (*StandardEncoderPreset) GetPreset

func (s *StandardEncoderPreset) GetPreset() *Preset

GetPreset implements the PresetClassification interface for type StandardEncoderPreset.

func (StandardEncoderPreset) MarshalJSON

func (s StandardEncoderPreset) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type StandardEncoderPreset.

func (*StandardEncoderPreset) UnmarshalJSON

func (s *StandardEncoderPreset) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type StandardEncoderPreset.

type StorageAccount

type StorageAccount struct {
	// REQUIRED; The type of the storage account.
	Type *StorageAccountType

	// The ID of the storage account resource. Media Services relies on tables and queues as well as blobs, so the primary storage
	// account must be a Standard Storage account (either Microsoft.ClassicStorage
	// or Microsoft.Storage). Blob only storage accounts can be added as secondary storage accounts.
	ID *string

	// The storage account identity.
	Identity *ResourceIdentity

	// READ-ONLY; The current status of the storage account mapping.
	Status *string
}

StorageAccount - The storage account details.

func (StorageAccount) MarshalJSON

func (s StorageAccount) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type StorageAccount.

func (*StorageAccount) UnmarshalJSON

func (s *StorageAccount) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type StorageAccount.

type StorageAccountType

type StorageAccountType string

StorageAccountType - The type of the storage account.

const (
	// StorageAccountTypePrimary - The primary storage account for the Media Services account.
	StorageAccountTypePrimary StorageAccountType = "Primary"
	// StorageAccountTypeSecondary - A secondary storage account for the Media Services account.
	StorageAccountTypeSecondary StorageAccountType = "Secondary"
)

func PossibleStorageAccountTypeValues

func PossibleStorageAccountTypeValues() []StorageAccountType

PossibleStorageAccountTypeValues returns the possible values for the StorageAccountType const type.

type StorageAuthentication

type StorageAuthentication string
const (
	// StorageAuthenticationManagedIdentity - Managed Identity authentication.
	StorageAuthenticationManagedIdentity StorageAuthentication = "ManagedIdentity"
	// StorageAuthenticationSystem - System authentication.
	StorageAuthenticationSystem StorageAuthentication = "System"
)

func PossibleStorageAuthenticationValues

func PossibleStorageAuthenticationValues() []StorageAuthentication

PossibleStorageAuthenticationValues returns the possible values for the StorageAuthentication const type.

type StorageEncryptedAssetDecryptionData

type StorageEncryptedAssetDecryptionData struct {
	// Asset File encryption metadata.
	AssetFileEncryptionMetadata []*AssetFileEncryptionMetadata

	// The Asset File storage encryption key.
	Key []byte
}

StorageEncryptedAssetDecryptionData - Data needed to decrypt asset files encrypted with legacy storage encryption.

func (StorageEncryptedAssetDecryptionData) MarshalJSON

func (s StorageEncryptedAssetDecryptionData) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type StorageEncryptedAssetDecryptionData.

func (*StorageEncryptedAssetDecryptionData) UnmarshalJSON

func (s *StorageEncryptedAssetDecryptionData) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type StorageEncryptedAssetDecryptionData.

type StreamOptionsFlag

type StreamOptionsFlag string
const (
	// StreamOptionsFlagDefault - Live streaming with no special latency optimizations.
	StreamOptionsFlagDefault StreamOptionsFlag = "Default"
	// StreamOptionsFlagLowLatency - The live event provides lower end to end latency by reducing its internal buffers.
	StreamOptionsFlagLowLatency StreamOptionsFlag = "LowLatency"
	// StreamOptionsFlagLowLatencyV2 - The live event is optimized for end to end latency. This option is only available for encoding
	// live events with RTMP input. The outputs can be streamed using HLS or DASH formats. The outputs' archive or DVR rewind
	// length is limited to 6 hours. Use "LowLatency" stream option for all other scenarios.
	StreamOptionsFlagLowLatencyV2 StreamOptionsFlag = "LowLatencyV2"
)

func PossibleStreamOptionsFlagValues

func PossibleStreamOptionsFlagValues() []StreamOptionsFlag

PossibleStreamOptionsFlagValues returns the possible values for the StreamOptionsFlag const type.

type StreamingEndpoint

type StreamingEndpoint struct {
	// REQUIRED; The geo-location where the resource lives
	Location *string

	// The streaming endpoint properties.
	Properties *StreamingEndpointProperties

	// The streaming endpoint sku.
	SKU *ArmStreamingEndpointCurrentSKU

	// Resource tags.
	Tags map[string]*string

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; The system metadata relating to this resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

StreamingEndpoint - The streaming endpoint.

func (StreamingEndpoint) MarshalJSON

func (s StreamingEndpoint) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type StreamingEndpoint.

func (*StreamingEndpoint) UnmarshalJSON

func (s *StreamingEndpoint) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type StreamingEndpoint.

type StreamingEndpointAccessControl

type StreamingEndpointAccessControl struct {
	// The access control of Akamai
	Akamai *AkamaiAccessControl

	// The IP access control of the streaming endpoint.
	IP *IPAccessControl
}

StreamingEndpointAccessControl - Streaming endpoint access control definition.

func (StreamingEndpointAccessControl) MarshalJSON

func (s StreamingEndpointAccessControl) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type StreamingEndpointAccessControl.

func (*StreamingEndpointAccessControl) UnmarshalJSON

func (s *StreamingEndpointAccessControl) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type StreamingEndpointAccessControl.

type StreamingEndpointListResult

type StreamingEndpointListResult struct {
	// The number of result.
	ODataCount *int32

	// The link to the next set of results. Not empty if value contains incomplete list of streaming endpoints.
	ODataNextLink *string

	// The result of the List StreamingEndpoint operation.
	Value []*StreamingEndpoint
}

StreamingEndpointListResult - The streaming endpoint list result.

func (StreamingEndpointListResult) MarshalJSON

func (s StreamingEndpointListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type StreamingEndpointListResult.

func (*StreamingEndpointListResult) UnmarshalJSON

func (s *StreamingEndpointListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type StreamingEndpointListResult.

type StreamingEndpointProperties

type StreamingEndpointProperties struct {
	// REQUIRED; The number of scale units. Use the Scale operation to adjust this value.
	ScaleUnits *int32

	// The access control definition of the streaming endpoint.
	AccessControl *StreamingEndpointAccessControl

	// This feature is deprecated, do not set a value for this property.
	AvailabilitySetName *string

	// The CDN enabled flag.
	CdnEnabled *bool

	// The CDN profile name.
	CdnProfile *string

	// The CDN provider name.
	CdnProvider *string

	// The streaming endpoint access policies.
	CrossSiteAccessPolicies *CrossSiteAccessPolicies

	// The custom host names of the streaming endpoint
	CustomHostNames []*string

	// The streaming endpoint description.
	Description *string

	// Max cache age
	MaxCacheAge *int64

	// READ-ONLY; The exact time the streaming endpoint was created.
	Created *time.Time

	// READ-ONLY; The free trial expiration time.
	FreeTrialEndTime *time.Time

	// READ-ONLY; The streaming endpoint host name.
	HostName *string

	// READ-ONLY; The exact time the streaming endpoint was last modified.
	LastModified *time.Time

	// READ-ONLY; The provisioning state of the streaming endpoint.
	ProvisioningState *string

	// READ-ONLY; The resource state of the streaming endpoint.
	ResourceState *StreamingEndpointResourceState
}

StreamingEndpointProperties - The streaming endpoint properties.

func (StreamingEndpointProperties) MarshalJSON

func (s StreamingEndpointProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type StreamingEndpointProperties.

func (*StreamingEndpointProperties) UnmarshalJSON

func (s *StreamingEndpointProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type StreamingEndpointProperties.

type StreamingEndpointResourceState

type StreamingEndpointResourceState string

StreamingEndpointResourceState - The resource state of the streaming endpoint.

const (
	// StreamingEndpointResourceStateDeleting - The streaming endpoint is being deleted.
	StreamingEndpointResourceStateDeleting StreamingEndpointResourceState = "Deleting"
	// StreamingEndpointResourceStateRunning - The streaming endpoint is running. It is able to stream content to clients
	StreamingEndpointResourceStateRunning StreamingEndpointResourceState = "Running"
	// StreamingEndpointResourceStateScaling - The streaming endpoint is increasing or decreasing scale units.
	StreamingEndpointResourceStateScaling StreamingEndpointResourceState = "Scaling"
	// StreamingEndpointResourceStateStarting - The streaming endpoint is transitioning to the running state.
	StreamingEndpointResourceStateStarting StreamingEndpointResourceState = "Starting"
	// StreamingEndpointResourceStateStopped - The initial state of a streaming endpoint after creation. Content is not ready
	// to be streamed from this endpoint.
	StreamingEndpointResourceStateStopped StreamingEndpointResourceState = "Stopped"
	// StreamingEndpointResourceStateStopping - The streaming endpoint is transitioning to the stopped state.
	StreamingEndpointResourceStateStopping StreamingEndpointResourceState = "Stopping"
)

func PossibleStreamingEndpointResourceStateValues

func PossibleStreamingEndpointResourceStateValues() []StreamingEndpointResourceState

PossibleStreamingEndpointResourceStateValues returns the possible values for the StreamingEndpointResourceState const type.

type StreamingEndpointSKUInfoListResult

type StreamingEndpointSKUInfoListResult struct {
	// The result of the List StreamingEndpoint skus.
	Value []*ArmStreamingEndpointSKUInfo
}

func (StreamingEndpointSKUInfoListResult) MarshalJSON

func (s StreamingEndpointSKUInfoListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type StreamingEndpointSKUInfoListResult.

func (*StreamingEndpointSKUInfoListResult) UnmarshalJSON

func (s *StreamingEndpointSKUInfoListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type StreamingEndpointSKUInfoListResult.

type StreamingEndpointsClient

type StreamingEndpointsClient struct {
	// contains filtered or unexported fields
}

StreamingEndpointsClient contains the methods for the StreamingEndpoints group. Don't use this type directly, use NewStreamingEndpointsClient() instead.

func NewStreamingEndpointsClient

func NewStreamingEndpointsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*StreamingEndpointsClient, error)

NewStreamingEndpointsClient creates a new instance of StreamingEndpointsClient with the specified values.

  • subscriptionID - The unique identifier for a Microsoft Azure subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*StreamingEndpointsClient) AsyncOperation added in v3.1.0

func (client *StreamingEndpointsClient) AsyncOperation(ctx context.Context, resourceGroupName string, accountName string, operationID string, options *StreamingEndpointsClientAsyncOperationOptions) (StreamingEndpointsClientAsyncOperationResponse, error)

AsyncOperation - Get a streaming endpoint operation status. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • operationID - The ID of an ongoing async operation.
  • options - StreamingEndpointsClientAsyncOperationOptions contains the optional parameters for the StreamingEndpointsClient.AsyncOperation method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-08-01/examples/async-operation-result.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewStreamingEndpointsClient().AsyncOperation(ctx, "mediaresources", "slitestmedia10", "62e4d893-d233-4005-988e-a428d9f77076", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.AsyncOperationResult = armmediaservices.AsyncOperationResult{
// 	Name: to.Ptr("62e4d893-d233-4005-988e-a428d9f77076"),
// 	Error: &armmediaservices.ErrorDetail{
// 		Code: to.Ptr("None"),
// 		Target: to.Ptr("d7aea790-8acb-40b9-8f9f-21cc37c9e519"),
// 	},
// 	Status: to.Ptr(armmediaservices.AsyncOperationStatusInProgress),
// }
Output:

func (*StreamingEndpointsClient) BeginCreate

func (client *StreamingEndpointsClient) BeginCreate(ctx context.Context, resourceGroupName string, accountName string, streamingEndpointName string, parameters StreamingEndpoint, options *StreamingEndpointsClientBeginCreateOptions) (*runtime.Poller[StreamingEndpointsClientCreateResponse], error)

BeginCreate - Creates a streaming endpoint. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • streamingEndpointName - The name of the streaming endpoint, maximum length is 24.
  • parameters - Streaming endpoint properties needed for creation.
  • options - StreamingEndpointsClientBeginCreateOptions contains the optional parameters for the StreamingEndpointsClient.BeginCreate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-08-01/examples/streamingendpoint-create.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewStreamingEndpointsClient().BeginCreate(ctx, "mediaresources", "slitestmedia10", "myStreamingEndpoint1", armmediaservices.StreamingEndpoint{
	Location: to.Ptr("West US"),
	Tags: map[string]*string{
		"tag1": to.Ptr("value1"),
		"tag2": to.Ptr("value2"),
	},
	Properties: &armmediaservices.StreamingEndpointProperties{
		Description: to.Ptr("test event 1"),
		AccessControl: &armmediaservices.StreamingEndpointAccessControl{
			Akamai: &armmediaservices.AkamaiAccessControl{
				AkamaiSignatureHeaderAuthenticationKeyList: []*armmediaservices.AkamaiSignatureHeaderAuthenticationKey{
					{
						Base64Key:  to.Ptr("dGVzdGlkMQ=="),
						Expiration: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2030-01-01T00:00:00.000Z"); return t }()),
						Identifier: to.Ptr("id1"),
					},
					{
						Base64Key:  to.Ptr("dGVzdGlkMQ=="),
						Expiration: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2031-01-01T00:00:00.000Z"); return t }()),
						Identifier: to.Ptr("id2"),
					}},
			},
			IP: &armmediaservices.IPAccessControl{
				Allow: []*armmediaservices.IPRange{
					{
						Name:    to.Ptr("AllowedIp"),
						Address: to.Ptr("192.168.1.1"),
					}},
			},
		},
		AvailabilitySetName: to.Ptr("availableset"),
		CdnEnabled:          to.Ptr(false),
		ScaleUnits:          to.Ptr[int32](1),
	},
}, &armmediaservices.StreamingEndpointsClientBeginCreateOptions{AutoStart: nil})
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.StreamingEndpoint = armmediaservices.StreamingEndpoint{
// 	Name: to.Ptr("myStreamingEndpoint1"),
// 	Type: to.Ptr("Microsoft.Media/mediaservices/streamingEndpoints"),
// 	ID: to.Ptr("/subscriptions/0a6ec948-5a62-437d-b9df-934dc7c1b722/resourceGroups/mediaresources/providers/Microsoft.Media/mediaservices/slitestmedia10/streamingendpoints/myStreamingEndpoint1"),
// 	Location: to.Ptr("West US"),
// 	Tags: map[string]*string{
// 		"tag1": to.Ptr("value1"),
// 		"tag2": to.Ptr("value2"),
// 	},
// 	Properties: &armmediaservices.StreamingEndpointProperties{
// 		Description: to.Ptr("test event 1"),
// 		AccessControl: &armmediaservices.StreamingEndpointAccessControl{
// 			Akamai: &armmediaservices.AkamaiAccessControl{
// 				AkamaiSignatureHeaderAuthenticationKeyList: []*armmediaservices.AkamaiSignatureHeaderAuthenticationKey{
// 					{
// 						Base64Key: to.Ptr("dGVzdGlkMQ=="),
// 						Expiration: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2030-01-01T00:00:00.000Z"); return t}()),
// 						Identifier: to.Ptr("id1"),
// 					},
// 					{
// 						Base64Key: to.Ptr("dGVzdGlkMQ=="),
// 						Expiration: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2031-01-01T00:00:00.000Z"); return t}()),
// 						Identifier: to.Ptr("id2"),
// 				}},
// 			},
// 			IP: &armmediaservices.IPAccessControl{
// 				Allow: []*armmediaservices.IPRange{
// 					{
// 						Name: to.Ptr("AllowedIp"),
// 						Address: to.Ptr("192.168.1.1"),
// 				}},
// 			},
// 		},
// 		AvailabilitySetName: to.Ptr("availableset"),
// 		CdnEnabled: to.Ptr(false),
// 		CdnProfile: to.Ptr(""),
// 		Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-03T02:25:09.756Z"); return t}()),
// 		CustomHostNames: []*string{
// 		},
// 		FreeTrialEndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "1-01-01T08:00:00.000Z"); return t}()),
// 		HostName: to.Ptr("mystreamingendpoint1-slitestmedia10.streaming.mediaservices.windows.net"),
// 		LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-03T02:25:09.756Z"); return t}()),
// 		ProvisioningState: to.Ptr("Succeeded"),
// 		ResourceState: to.Ptr(armmediaservices.StreamingEndpointResourceStateStopped),
// 		ScaleUnits: to.Ptr[int32](1),
// 	},
// }
Output:

func (*StreamingEndpointsClient) BeginDelete

func (client *StreamingEndpointsClient) BeginDelete(ctx context.Context, resourceGroupName string, accountName string, streamingEndpointName string, options *StreamingEndpointsClientBeginDeleteOptions) (*runtime.Poller[StreamingEndpointsClientDeleteResponse], error)

BeginDelete - Deletes a streaming endpoint. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • streamingEndpointName - The name of the streaming endpoint, maximum length is 24.
  • options - StreamingEndpointsClientBeginDeleteOptions contains the optional parameters for the StreamingEndpointsClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-08-01/examples/streamingendpoint-delete.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewStreamingEndpointsClient().BeginDelete(ctx, "mediaresources", "slitestmedia10", "myStreamingEndpoint1", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
_, err = poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
Output:

func (*StreamingEndpointsClient) BeginScale

func (client *StreamingEndpointsClient) BeginScale(ctx context.Context, resourceGroupName string, accountName string, streamingEndpointName string, parameters StreamingEntityScaleUnit, options *StreamingEndpointsClientBeginScaleOptions) (*runtime.Poller[StreamingEndpointsClientScaleResponse], error)

BeginScale - Scales an existing streaming endpoint. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • streamingEndpointName - The name of the streaming endpoint, maximum length is 24.
  • parameters - Streaming endpoint scale parameters
  • options - StreamingEndpointsClientBeginScaleOptions contains the optional parameters for the StreamingEndpointsClient.BeginScale method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-08-01/examples/streamingendpoint-scale.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewStreamingEndpointsClient().BeginScale(ctx, "mediaresources", "slitestmedia10", "myStreamingEndpoint1", armmediaservices.StreamingEntityScaleUnit{
	ScaleUnit: to.Ptr[int32](5),
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
_, err = poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
Output:

func (*StreamingEndpointsClient) BeginStart

func (client *StreamingEndpointsClient) BeginStart(ctx context.Context, resourceGroupName string, accountName string, streamingEndpointName string, options *StreamingEndpointsClientBeginStartOptions) (*runtime.Poller[StreamingEndpointsClientStartResponse], error)

BeginStart - Starts an existing streaming endpoint. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • streamingEndpointName - The name of the streaming endpoint, maximum length is 24.
  • options - StreamingEndpointsClientBeginStartOptions contains the optional parameters for the StreamingEndpointsClient.BeginStart method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-08-01/examples/streamingendpoint-start.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewStreamingEndpointsClient().BeginStart(ctx, "mediaresources", "slitestmedia10", "myStreamingEndpoint1", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
_, err = poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
Output:

func (*StreamingEndpointsClient) BeginStop

func (client *StreamingEndpointsClient) BeginStop(ctx context.Context, resourceGroupName string, accountName string, streamingEndpointName string, options *StreamingEndpointsClientBeginStopOptions) (*runtime.Poller[StreamingEndpointsClientStopResponse], error)

BeginStop - Stops an existing streaming endpoint. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • streamingEndpointName - The name of the streaming endpoint, maximum length is 24.
  • options - StreamingEndpointsClientBeginStopOptions contains the optional parameters for the StreamingEndpointsClient.BeginStop method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-08-01/examples/streamingendpoint-stop.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewStreamingEndpointsClient().BeginStop(ctx, "mediaresources", "slitestmedia10", "myStreamingEndpoint1", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
_, err = poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
Output:

func (*StreamingEndpointsClient) BeginUpdate

func (client *StreamingEndpointsClient) BeginUpdate(ctx context.Context, resourceGroupName string, accountName string, streamingEndpointName string, parameters StreamingEndpoint, options *StreamingEndpointsClientBeginUpdateOptions) (*runtime.Poller[StreamingEndpointsClientUpdateResponse], error)

BeginUpdate - Updates a existing streaming endpoint. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • streamingEndpointName - The name of the streaming endpoint, maximum length is 24.
  • parameters - Streaming endpoint properties needed for creation.
  • options - StreamingEndpointsClientBeginUpdateOptions contains the optional parameters for the StreamingEndpointsClient.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-08-01/examples/streamingendpoint-update.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewStreamingEndpointsClient().BeginUpdate(ctx, "mediaresources", "slitestmedia10", "myStreamingEndpoint1", armmediaservices.StreamingEndpoint{
	Location: to.Ptr("West US"),
	Tags: map[string]*string{
		"tag3": to.Ptr("value3"),
		"tag5": to.Ptr("value5"),
	},
	Properties: &armmediaservices.StreamingEndpointProperties{
		Description:         to.Ptr("test event 2"),
		AvailabilitySetName: to.Ptr("availableset"),
		ScaleUnits:          to.Ptr[int32](5),
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.StreamingEndpoint = armmediaservices.StreamingEndpoint{
// 	Name: to.Ptr("myStreamingEndpoint1"),
// 	Type: to.Ptr("Microsoft.Media/mediaservices/streamingEndpoints"),
// 	ID: to.Ptr("/subscriptions/0a6ec948-5a62-437d-b9df-934dc7c1b722/resourceGroups/mediaresources/providers/Microsoft.Media/mediaservices/slitestmedia10/streamingendpoints/myStreamingEndpoint1"),
// 	Location: to.Ptr("West US"),
// 	Tags: map[string]*string{
// 		"tag3": to.Ptr("value3"),
// 		"tag5": to.Ptr("value5"),
// 	},
// 	Properties: &armmediaservices.StreamingEndpointProperties{
// 		Description: to.Ptr("test event 2"),
// 		AvailabilitySetName: to.Ptr("availableset"),
// 		CdnEnabled: to.Ptr(false),
// 		Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "1-01-01T00:00:00.000Z"); return t}()),
// 		CustomHostNames: []*string{
// 		},
// 		FreeTrialEndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "1-01-01T00:00:00.000Z"); return t}()),
// 		LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "1-01-01T00:00:00.000Z"); return t}()),
// 		ProvisioningState: to.Ptr("Succeeded"),
// 		ScaleUnits: to.Ptr[int32](5),
// 	},
// }
Output:

func (*StreamingEndpointsClient) Get

func (client *StreamingEndpointsClient) Get(ctx context.Context, resourceGroupName string, accountName string, streamingEndpointName string, options *StreamingEndpointsClientGetOptions) (StreamingEndpointsClientGetResponse, error)

Get - Gets a streaming endpoint. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • streamingEndpointName - The name of the streaming endpoint, maximum length is 24.
  • options - StreamingEndpointsClientGetOptions contains the optional parameters for the StreamingEndpointsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-08-01/examples/streamingendpoint-list-by-name.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewStreamingEndpointsClient().Get(ctx, "mediaresources", "slitestmedia10", "myStreamingEndpoint1", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.StreamingEndpoint = armmediaservices.StreamingEndpoint{
// 	Name: to.Ptr("myStreamingEndpoint1"),
// 	Type: to.Ptr("Microsoft.Media/mediaservices/streamingEndpoints"),
// 	ID: to.Ptr("/subscriptions/0a6ec948-5a62-437d-b9df-934dc7c1b722/resourceGroups/mediaresources/providers/Microsoft.Media/mediaservices/slitestmedia10/streamingendpoints/myStreamingEndpoint1"),
// 	Location: to.Ptr("West US"),
// 	Tags: map[string]*string{
// 		"tag1": to.Ptr("value1"),
// 		"tag2": to.Ptr("value2"),
// 	},
// 	Properties: &armmediaservices.StreamingEndpointProperties{
// 		Description: to.Ptr("test event 1"),
// 		AvailabilitySetName: to.Ptr("availableset"),
// 		CdnEnabled: to.Ptr(false),
// 		CdnProfile: to.Ptr(""),
// 		Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-03T02:25:09.350Z"); return t}()),
// 		CustomHostNames: []*string{
// 		},
// 		FreeTrialEndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "1-01-01T08:00:00.000Z"); return t}()),
// 		HostName: to.Ptr("mystreamingendpoint1-slitestmedia10.streaming.mediaservices.windows.net"),
// 		LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-03T02:25:09.350Z"); return t}()),
// 		ProvisioningState: to.Ptr("Succeeded"),
// 		ResourceState: to.Ptr(armmediaservices.StreamingEndpointResourceStateStopped),
// 		ScaleUnits: to.Ptr[int32](1),
// 	},
// }
Output:

func (*StreamingEndpointsClient) NewListPager

func (client *StreamingEndpointsClient) NewListPager(resourceGroupName string, accountName string, options *StreamingEndpointsClientListOptions) *runtime.Pager[StreamingEndpointsClientListResponse]

NewListPager - Lists the streaming endpoints in the account.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • options - StreamingEndpointsClientListOptions contains the optional parameters for the StreamingEndpointsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-08-01/examples/streamingendpoint-list-all.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewStreamingEndpointsClient().NewListPager("mediaresources", "slitestmedia10", nil)
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.StreamingEndpointListResult = armmediaservices.StreamingEndpointListResult{
	// 	Value: []*armmediaservices.StreamingEndpoint{
	// 		{
	// 			Name: to.Ptr("myStreamingEndpoint1"),
	// 			Type: to.Ptr("Microsoft.Media/mediaservices/streamingEndpoints"),
	// 			ID: to.Ptr("/subscriptions/0a6ec948-5a62-437d-b9df-934dc7c1b722/resourceGroups/mediaresources/providers/Microsoft.Media/mediaservices/slitestmedia10/streamingendpoints/myStreamingEndpoint1"),
	// 			Location: to.Ptr("West US"),
	// 			Tags: map[string]*string{
	// 				"tag1": to.Ptr("value1"),
	// 				"tag2": to.Ptr("value2"),
	// 			},
	// 			Properties: &armmediaservices.StreamingEndpointProperties{
	// 				Description: to.Ptr("test event 1"),
	// 				AvailabilitySetName: to.Ptr("availableset"),
	// 				CdnEnabled: to.Ptr(false),
	// 				CdnProfile: to.Ptr(""),
	// 				Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-03T02:25:09.202Z"); return t}()),
	// 				CustomHostNames: []*string{
	// 				},
	// 				FreeTrialEndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "1-01-01T08:00:00.000Z"); return t}()),
	// 				HostName: to.Ptr("mystreamingendpoint1-slitestmedia10.streaming.mediaservices.windows.net"),
	// 				LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-03T02:25:09.202Z"); return t}()),
	// 				ProvisioningState: to.Ptr("Succeeded"),
	// 				ResourceState: to.Ptr(armmediaservices.StreamingEndpointResourceStateStopped),
	// 				ScaleUnits: to.Ptr[int32](1),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("default"),
	// 			Type: to.Ptr("Microsoft.Media/mediaservices/streamingEndpoints"),
	// 			ID: to.Ptr("/subscriptions/0a6ec948-5a62-437d-b9df-934dc7c1b722/resourceGroups/mediaresources/providers/Microsoft.Media/mediaservices/slitestmedia10/streamingendpoints/default"),
	// 			Location: to.Ptr("West US"),
	// 			Tags: map[string]*string{
	// 			},
	// 			Properties: &armmediaservices.StreamingEndpointProperties{
	// 				Description: to.Ptr(""),
	// 				CdnEnabled: to.Ptr(true),
	// 				CdnProfile: to.Ptr("AzureMediaStreamingPlatformCdnProfile-StandardVerizon"),
	// 				CdnProvider: to.Ptr("StandardVerizon"),
	// 				Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-03T02:25:09.231Z"); return t}()),
	// 				CustomHostNames: []*string{
	// 				},
	// 				FreeTrialEndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "1-01-01T08:00:00.000Z"); return t}()),
	// 				HostName: to.Ptr("slitestmedia10.streaming.mediaservices.windows.net"),
	// 				LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-03T02:25:09.231Z"); return t}()),
	// 				ProvisioningState: to.Ptr("Succeeded"),
	// 				ResourceState: to.Ptr(armmediaservices.StreamingEndpointResourceStateStarting),
	// 				ScaleUnits: to.Ptr[int32](0),
	// 			},
	// 	}},
	// }
}
Output:

func (*StreamingEndpointsClient) OperationLocation added in v3.1.0

func (client *StreamingEndpointsClient) OperationLocation(ctx context.Context, resourceGroupName string, accountName string, streamingEndpointName string, operationID string, options *StreamingEndpointsClientOperationLocationOptions) (StreamingEndpointsClientOperationLocationResponse, error)

OperationLocation - Get a streaming endpoint operation status. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • streamingEndpointName - The name of the streaming endpoint, maximum length is 24.
  • operationID - The ID of an ongoing async operation.
  • options - StreamingEndpointsClientOperationLocationOptions contains the optional parameters for the StreamingEndpointsClient.OperationLocation method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-08-01/examples/streamingendpoint-operation-location.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewStreamingEndpointsClient().OperationLocation(ctx, "mediaresources", "slitestmedia10", "myStreamingEndpoint1", "62e4d893-d233-4005-988e-a428d9f77076", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.StreamingEndpoint = armmediaservices.StreamingEndpoint{
// 	Name: to.Ptr("myStreamingEndpoint1"),
// 	Type: to.Ptr("Microsoft.Media/mediaservices/streamingEndpoints"),
// 	ID: to.Ptr("/subscriptions/0a6ec948-5a62-437d-b9df-934dc7c1b722/resourceGroups/mediaresources/providers/Microsoft.Media/mediaservices/slitestmedia10/streamingendpoints/myStreamingEndpoint1"),
// 	Location: to.Ptr("West US"),
// 	Tags: map[string]*string{
// 		"tag1": to.Ptr("value1"),
// 		"tag2": to.Ptr("value2"),
// 	},
// 	Properties: &armmediaservices.StreamingEndpointProperties{
// 		Description: to.Ptr("test event 1"),
// 		AvailabilitySetName: to.Ptr("availableset"),
// 		CdnEnabled: to.Ptr(false),
// 		CdnProfile: to.Ptr(""),
// 		Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-03T02:25:09.350Z"); return t}()),
// 		CustomHostNames: []*string{
// 		},
// 		FreeTrialEndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "1-01-01T08:00:00.000Z"); return t}()),
// 		HostName: to.Ptr("mystreamingendpoint1-slitestmedia10.streaming.mediaservices.windows.net"),
// 		LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-03T02:25:09.350Z"); return t}()),
// 		ProvisioningState: to.Ptr("Succeeded"),
// 		ResourceState: to.Ptr(armmediaservices.StreamingEndpointResourceStateStopped),
// 		ScaleUnits: to.Ptr[int32](1),
// 	},
// 	SKU: &armmediaservices.ArmStreamingEndpointCurrentSKU{
// 		Name: to.Ptr("Premium"),
// 		Capacity: to.Ptr[int32](1),
// 	},
// 	SystemData: &armmediaservices.SystemData{
// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-03T02:25:09.350Z"); return t}()),
// 		CreatedBy: to.Ptr("example@microsoft.com"),
// 		CreatedByType: to.Ptr(armmediaservices.CreatedByTypeUser),
// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-03T02:25:09.350Z"); return t}()),
// 		LastModifiedBy: to.Ptr("example@microsoft.com"),
// 		LastModifiedByType: to.Ptr(armmediaservices.CreatedByTypeUser),
// 	},
// }
Output:

func (*StreamingEndpointsClient) SKUs

func (client *StreamingEndpointsClient) SKUs(ctx context.Context, resourceGroupName string, accountName string, streamingEndpointName string, options *StreamingEndpointsClientSKUsOptions) (StreamingEndpointsClientSKUsResponse, error)

SKUs - List streaming endpoint supported skus. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • streamingEndpointName - The name of the streaming endpoint, maximum length is 24.
  • options - StreamingEndpointsClientSKUsOptions contains the optional parameters for the StreamingEndpointsClient.SKUs method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-08-01/examples/streamingendpoint-list-skus.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewStreamingEndpointsClient().SKUs(ctx, "mediaresources", "slitestmedia10", "myStreamingEndpoint1", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.StreamingEndpointSKUInfoListResult = armmediaservices.StreamingEndpointSKUInfoListResult{
// 	Value: []*armmediaservices.ArmStreamingEndpointSKUInfo{
// 		{
// 			Capacity: &armmediaservices.ArmStreamingEndpointCapacity{
// 				Default: to.Ptr[int32](1),
// 				Maximum: to.Ptr[int32](10),
// 				Minimum: to.Ptr[int32](1),
// 				ScaleType: to.Ptr("Automatic"),
// 			},
// 			ResourceType: to.Ptr("Microsoft.Media/mediaservices/streamingEndpoints"),
// 			SKU: &armmediaservices.ArmStreamingEndpointSKU{
// 				Name: to.Ptr("Premium"),
// 			},
// 	}},
// }
Output:

type StreamingEndpointsClientAsyncOperationOptions added in v3.1.0

type StreamingEndpointsClientAsyncOperationOptions struct {
}

StreamingEndpointsClientAsyncOperationOptions contains the optional parameters for the StreamingEndpointsClient.AsyncOperation method.

type StreamingEndpointsClientAsyncOperationResponse added in v3.1.0

type StreamingEndpointsClientAsyncOperationResponse struct {
	// The status of an async operation.
	AsyncOperationResult
}

StreamingEndpointsClientAsyncOperationResponse contains the response from method StreamingEndpointsClient.AsyncOperation.

type StreamingEndpointsClientBeginCreateOptions

type StreamingEndpointsClientBeginCreateOptions struct {
	// The flag indicates if the resource should be automatically started on creation.
	AutoStart *bool

	// Resumes the LRO from the provided token.
	ResumeToken string
}

StreamingEndpointsClientBeginCreateOptions contains the optional parameters for the StreamingEndpointsClient.BeginCreate method.

type StreamingEndpointsClientBeginDeleteOptions

type StreamingEndpointsClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

StreamingEndpointsClientBeginDeleteOptions contains the optional parameters for the StreamingEndpointsClient.BeginDelete method.

type StreamingEndpointsClientBeginScaleOptions

type StreamingEndpointsClientBeginScaleOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

StreamingEndpointsClientBeginScaleOptions contains the optional parameters for the StreamingEndpointsClient.BeginScale method.

type StreamingEndpointsClientBeginStartOptions

type StreamingEndpointsClientBeginStartOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

StreamingEndpointsClientBeginStartOptions contains the optional parameters for the StreamingEndpointsClient.BeginStart method.

type StreamingEndpointsClientBeginStopOptions

type StreamingEndpointsClientBeginStopOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

StreamingEndpointsClientBeginStopOptions contains the optional parameters for the StreamingEndpointsClient.BeginStop method.

type StreamingEndpointsClientBeginUpdateOptions

type StreamingEndpointsClientBeginUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

StreamingEndpointsClientBeginUpdateOptions contains the optional parameters for the StreamingEndpointsClient.BeginUpdate method.

type StreamingEndpointsClientCreateResponse

type StreamingEndpointsClientCreateResponse struct {
	// The streaming endpoint.
	StreamingEndpoint
}

StreamingEndpointsClientCreateResponse contains the response from method StreamingEndpointsClient.BeginCreate.

type StreamingEndpointsClientDeleteResponse

type StreamingEndpointsClientDeleteResponse struct {
}

StreamingEndpointsClientDeleteResponse contains the response from method StreamingEndpointsClient.BeginDelete.

type StreamingEndpointsClientGetOptions

type StreamingEndpointsClientGetOptions struct {
}

StreamingEndpointsClientGetOptions contains the optional parameters for the StreamingEndpointsClient.Get method.

type StreamingEndpointsClientGetResponse

type StreamingEndpointsClientGetResponse struct {
	// The streaming endpoint.
	StreamingEndpoint
}

StreamingEndpointsClientGetResponse contains the response from method StreamingEndpointsClient.Get.

type StreamingEndpointsClientListOptions

type StreamingEndpointsClientListOptions struct {
}

StreamingEndpointsClientListOptions contains the optional parameters for the StreamingEndpointsClient.NewListPager method.

type StreamingEndpointsClientListResponse

type StreamingEndpointsClientListResponse struct {
	// The streaming endpoint list result.
	StreamingEndpointListResult
}

StreamingEndpointsClientListResponse contains the response from method StreamingEndpointsClient.NewListPager.

type StreamingEndpointsClientOperationLocationOptions added in v3.1.0

type StreamingEndpointsClientOperationLocationOptions struct {
}

StreamingEndpointsClientOperationLocationOptions contains the optional parameters for the StreamingEndpointsClient.OperationLocation method.

type StreamingEndpointsClientOperationLocationResponse added in v3.1.0

type StreamingEndpointsClientOperationLocationResponse struct {
	// The streaming endpoint.
	StreamingEndpoint
}

StreamingEndpointsClientOperationLocationResponse contains the response from method StreamingEndpointsClient.OperationLocation.

type StreamingEndpointsClientSKUsOptions

type StreamingEndpointsClientSKUsOptions struct {
}

StreamingEndpointsClientSKUsOptions contains the optional parameters for the StreamingEndpointsClient.SKUs method.

type StreamingEndpointsClientSKUsResponse

type StreamingEndpointsClientSKUsResponse struct {
	StreamingEndpointSKUInfoListResult
}

StreamingEndpointsClientSKUsResponse contains the response from method StreamingEndpointsClient.SKUs.

type StreamingEndpointsClientScaleResponse

type StreamingEndpointsClientScaleResponse struct {
}

StreamingEndpointsClientScaleResponse contains the response from method StreamingEndpointsClient.BeginScale.

type StreamingEndpointsClientStartResponse

type StreamingEndpointsClientStartResponse struct {
}

StreamingEndpointsClientStartResponse contains the response from method StreamingEndpointsClient.BeginStart.

type StreamingEndpointsClientStopResponse

type StreamingEndpointsClientStopResponse struct {
}

StreamingEndpointsClientStopResponse contains the response from method StreamingEndpointsClient.BeginStop.

type StreamingEndpointsClientUpdateResponse

type StreamingEndpointsClientUpdateResponse struct {
	// The streaming endpoint.
	StreamingEndpoint
}

StreamingEndpointsClientUpdateResponse contains the response from method StreamingEndpointsClient.BeginUpdate.

type StreamingEntityScaleUnit

type StreamingEntityScaleUnit struct {
	// The scale unit number of the streaming endpoint.
	ScaleUnit *int32
}

StreamingEntityScaleUnit - scale units definition

func (StreamingEntityScaleUnit) MarshalJSON

func (s StreamingEntityScaleUnit) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type StreamingEntityScaleUnit.

func (*StreamingEntityScaleUnit) UnmarshalJSON

func (s *StreamingEntityScaleUnit) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type StreamingEntityScaleUnit.

type StreamingLocator

type StreamingLocator struct {
	// Properties of the Streaming Locator.
	Properties *StreamingLocatorProperties

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; The system metadata relating to this resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

StreamingLocator - A Streaming Locator resource

func (StreamingLocator) MarshalJSON

func (s StreamingLocator) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type StreamingLocator.

func (*StreamingLocator) UnmarshalJSON

func (s *StreamingLocator) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type StreamingLocator.

type StreamingLocatorCollection

type StreamingLocatorCollection struct {
	// A link to the next page of the collection (when the collection contains too many results to return in one response).
	ODataNextLink *string

	// A collection of StreamingLocator items.
	Value []*StreamingLocator
}

StreamingLocatorCollection - A collection of StreamingLocator items.

func (StreamingLocatorCollection) MarshalJSON

func (s StreamingLocatorCollection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type StreamingLocatorCollection.

func (*StreamingLocatorCollection) UnmarshalJSON

func (s *StreamingLocatorCollection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type StreamingLocatorCollection.

type StreamingLocatorContentKey

type StreamingLocatorContentKey struct {
	// REQUIRED; ID of Content Key
	ID *string

	// Label of Content Key as specified in the Streaming Policy
	LabelReferenceInStreamingPolicy *string

	// Value of Content Key
	Value *string

	// READ-ONLY; ContentKeyPolicy used by Content Key
	PolicyName *string

	// READ-ONLY; Tracks which use this Content Key
	Tracks []*TrackSelection

	// READ-ONLY; Encryption type of Content Key
	Type *StreamingLocatorContentKeyType
}

StreamingLocatorContentKey - Class for content key in Streaming Locator

func (StreamingLocatorContentKey) MarshalJSON

func (s StreamingLocatorContentKey) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type StreamingLocatorContentKey.

func (*StreamingLocatorContentKey) UnmarshalJSON

func (s *StreamingLocatorContentKey) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type StreamingLocatorContentKey.

type StreamingLocatorContentKeyType

type StreamingLocatorContentKeyType string

StreamingLocatorContentKeyType - Encryption type of Content Key

const (
	// StreamingLocatorContentKeyTypeCommonEncryptionCbcs - Common Encryption using CBCS
	StreamingLocatorContentKeyTypeCommonEncryptionCbcs StreamingLocatorContentKeyType = "CommonEncryptionCbcs"
	// StreamingLocatorContentKeyTypeCommonEncryptionCenc - Common Encryption using CENC
	StreamingLocatorContentKeyTypeCommonEncryptionCenc StreamingLocatorContentKeyType = "CommonEncryptionCenc"
	// StreamingLocatorContentKeyTypeEnvelopeEncryption - Envelope Encryption
	StreamingLocatorContentKeyTypeEnvelopeEncryption StreamingLocatorContentKeyType = "EnvelopeEncryption"
)

func PossibleStreamingLocatorContentKeyTypeValues

func PossibleStreamingLocatorContentKeyTypeValues() []StreamingLocatorContentKeyType

PossibleStreamingLocatorContentKeyTypeValues returns the possible values for the StreamingLocatorContentKeyType const type.

type StreamingLocatorProperties

type StreamingLocatorProperties struct {
	// REQUIRED; Asset Name
	AssetName *string

	// REQUIRED; Name of the Streaming Policy used by this Streaming Locator. Either specify the name of Streaming Policy you
	// created or use one of the predefined Streaming Policies. The predefined Streaming Policies
	// available are: 'PredefinedDownloadOnly', 'PredefinedClearStreamingOnly', 'PredefinedDownloadAndClearStreaming', 'PredefinedClearKey',
	// 'PredefinedMultiDrmCencStreaming' and 'Predefined
	// MultiDrmStreaming'
	StreamingPolicyName *string

	// Alternative Media ID of this Streaming Locator
	AlternativeMediaID *string

	// The ContentKeys used by this Streaming Locator.
	ContentKeys []*StreamingLocatorContentKey

	// Name of the default ContentKeyPolicy used by this Streaming Locator.
	DefaultContentKeyPolicyName *string

	// The end time of the Streaming Locator.
	EndTime *time.Time

	// A list of asset or account filters which apply to this streaming locator
	Filters []*string

	// The start time of the Streaming Locator.
	StartTime *time.Time

	// The StreamingLocatorId of the Streaming Locator.
	StreamingLocatorID *string

	// READ-ONLY; The creation time of the Streaming Locator.
	Created *time.Time
}

StreamingLocatorProperties - Properties of the Streaming Locator.

func (StreamingLocatorProperties) MarshalJSON

func (s StreamingLocatorProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type StreamingLocatorProperties.

func (*StreamingLocatorProperties) UnmarshalJSON

func (s *StreamingLocatorProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type StreamingLocatorProperties.

type StreamingLocatorsClient

type StreamingLocatorsClient struct {
	// contains filtered or unexported fields
}

StreamingLocatorsClient contains the methods for the StreamingLocators group. Don't use this type directly, use NewStreamingLocatorsClient() instead.

func NewStreamingLocatorsClient

func NewStreamingLocatorsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*StreamingLocatorsClient, error)

NewStreamingLocatorsClient creates a new instance of StreamingLocatorsClient with the specified values.

  • subscriptionID - The unique identifier for a Microsoft Azure subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*StreamingLocatorsClient) Create

func (client *StreamingLocatorsClient) Create(ctx context.Context, resourceGroupName string, accountName string, streamingLocatorName string, parameters StreamingLocator, options *StreamingLocatorsClientCreateOptions) (StreamingLocatorsClientCreateResponse, error)

Create - Create a Streaming Locator in the Media Services account If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • streamingLocatorName - The Streaming Locator name.
  • parameters - The request parameters
  • options - StreamingLocatorsClientCreateOptions contains the optional parameters for the StreamingLocatorsClient.Create method.
Example (CreatesAStreamingLocatorWithClearStreaming)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/streaming-locators-create-clear.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewStreamingLocatorsClient().Create(ctx, "contoso", "contosomedia", "UserCreatedClearStreamingLocator", armmediaservices.StreamingLocator{
	Properties: &armmediaservices.StreamingLocatorProperties{
		AssetName:           to.Ptr("ClimbingMountRainier"),
		StreamingPolicyName: to.Ptr("clearStreamingPolicy"),
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

Example (CreatesAStreamingLocatorWithSecureStreaming)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/streaming-locators-create-secure.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewStreamingLocatorsClient().Create(ctx, "contoso", "contosomedia", "UserCreatedSecureStreamingLocator", armmediaservices.StreamingLocator{
	Properties: &armmediaservices.StreamingLocatorProperties{
		AssetName:           to.Ptr("ClimbingMountRainier"),
		EndTime:             to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2028-12-31T23:59:59.999Z"); return t }()),
		StartTime:           to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-01T00:00:00.000Z"); return t }()),
		StreamingPolicyName: to.Ptr("secureStreamingPolicy"),
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

Example (CreatesAStreamingLocatorWithUserDefinedContentKeys)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/streaming-locators-create-secure-userDefinedContentKeys.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewStreamingLocatorsClient().Create(ctx, "contoso", "contosomedia", "UserCreatedSecureStreamingLocatorWithUserDefinedContentKeys", armmediaservices.StreamingLocator{
	Properties: &armmediaservices.StreamingLocatorProperties{
		AssetName: to.Ptr("ClimbingMountRainier"),
		ContentKeys: []*armmediaservices.StreamingLocatorContentKey{
			{
				ID:                              to.Ptr("60000000-0000-0000-0000-000000000001"),
				LabelReferenceInStreamingPolicy: to.Ptr("aesDefaultKey"),
				Value:                           to.Ptr("1UqLohAfWsEGkULYxHjYZg=="),
			},
			{
				ID:                              to.Ptr("60000000-0000-0000-0000-000000000004"),
				LabelReferenceInStreamingPolicy: to.Ptr("cencDefaultKey"),
				Value:                           to.Ptr("4UqLohAfWsEGkULYxHjYZg=="),
			},
			{
				ID:                              to.Ptr("60000000-0000-0000-0000-000000000007"),
				LabelReferenceInStreamingPolicy: to.Ptr("cbcsDefaultKey"),
				Value:                           to.Ptr("7UqLohAfWsEGkULYxHjYZg=="),
			}},
		StreamingLocatorID:  to.Ptr("90000000-0000-0000-0000-00000000000A"),
		StreamingPolicyName: to.Ptr("secureStreamingPolicy"),
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*StreamingLocatorsClient) Delete

func (client *StreamingLocatorsClient) Delete(ctx context.Context, resourceGroupName string, accountName string, streamingLocatorName string, options *StreamingLocatorsClientDeleteOptions) (StreamingLocatorsClientDeleteResponse, error)

Delete - Deletes a Streaming Locator in the Media Services account If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • streamingLocatorName - The Streaming Locator name.
  • options - StreamingLocatorsClientDeleteOptions contains the optional parameters for the StreamingLocatorsClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/streaming-locators-delete.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewStreamingLocatorsClient().Delete(ctx, "contoso", "contosomedia", "clearStreamingLocator", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*StreamingLocatorsClient) Get

func (client *StreamingLocatorsClient) Get(ctx context.Context, resourceGroupName string, accountName string, streamingLocatorName string, options *StreamingLocatorsClientGetOptions) (StreamingLocatorsClientGetResponse, error)

Get - Get the details of a Streaming Locator in the Media Services account If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • streamingLocatorName - The Streaming Locator name.
  • options - StreamingLocatorsClientGetOptions contains the optional parameters for the StreamingLocatorsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/streaming-locators-get-by-name.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewStreamingLocatorsClient().Get(ctx, "contoso", "contosomedia", "clearStreamingLocator", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.StreamingLocator = armmediaservices.StreamingLocator{
// 	Name: to.Ptr("clearStreamingLocator"),
// 	Type: to.Ptr("Microsoft.Media/mediaservices/streamingLocators"),
// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/streamingLocators/clearStreamingLocator"),
// 	Properties: &armmediaservices.StreamingLocatorProperties{
// 		AssetName: to.Ptr("ClimbingMountRainier"),
// 		ContentKeys: []*armmediaservices.StreamingLocatorContentKey{
// 		},
// 		Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-08T18:29:32.115Z"); return t}()),
// 		EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "9999-12-31T23:59:59.999Z"); return t}()),
// 		StreamingLocatorID: to.Ptr("7684043b-f6d1-44a7-8bed-8a4aa474c5a4"),
// 		StreamingPolicyName: to.Ptr("clearStreamingPolicy"),
// 	},
// }
Output:

func (*StreamingLocatorsClient) ListContentKeys

func (client *StreamingLocatorsClient) ListContentKeys(ctx context.Context, resourceGroupName string, accountName string, streamingLocatorName string, options *StreamingLocatorsClientListContentKeysOptions) (StreamingLocatorsClientListContentKeysResponse, error)

ListContentKeys - List Content Keys used by this Streaming Locator If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • streamingLocatorName - The Streaming Locator name.
  • options - StreamingLocatorsClientListContentKeysOptions contains the optional parameters for the StreamingLocatorsClient.ListContentKeys method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/streaming-locators-list-content-keys.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewStreamingLocatorsClient().ListContentKeys(ctx, "contoso", "contosomedia", "secureStreamingLocator", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ListContentKeysResponse = armmediaservices.ListContentKeysResponse{
// 	ContentKeys: []*armmediaservices.StreamingLocatorContentKey{
// 		{
// 			Type: to.Ptr(armmediaservices.StreamingLocatorContentKeyTypeEnvelopeEncryption),
// 			ID: to.Ptr("9259eb06-eeee-4f77-987f-48f4ea5c649f"),
// 			LabelReferenceInStreamingPolicy: to.Ptr("aesDefaultKey"),
// 			PolicyName: to.Ptr("PolicyWithMultipleOptions"),
// 			Tracks: []*armmediaservices.TrackSelection{
// 			},
// 			Value: to.Ptr("QpiqeQROdN5xamnfUF2Wdw=="),
// 		},
// 		{
// 			Type: to.Ptr(armmediaservices.StreamingLocatorContentKeyTypeCommonEncryptionCenc),
// 			ID: to.Ptr("06bfeff1-2bb6-4f58-af27-a2767f058bca"),
// 			LabelReferenceInStreamingPolicy: to.Ptr("cencDefaultKey"),
// 			PolicyName: to.Ptr("PolicyWithMultipleOptions"),
// 			Tracks: []*armmediaservices.TrackSelection{
// 			},
// 			Value: to.Ptr("ZjgWhNnqnqcov/h+wrYusw=="),
// 		},
// 		{
// 			Type: to.Ptr(armmediaservices.StreamingLocatorContentKeyTypeCommonEncryptionCbcs),
// 			ID: to.Ptr("799e78a0-ed6f-4179-9222-ed4ec4223cec"),
// 			LabelReferenceInStreamingPolicy: to.Ptr("cbcsDefaultKey"),
// 			PolicyName: to.Ptr("PolicyWithMultipleOptions"),
// 			Tracks: []*armmediaservices.TrackSelection{
// 			},
// 			Value: to.Ptr("FjZ3n3yRcVxRFftdYFbe9g=="),
// 	}},
// }
Output:

func (*StreamingLocatorsClient) ListPaths

func (client *StreamingLocatorsClient) ListPaths(ctx context.Context, resourceGroupName string, accountName string, streamingLocatorName string, options *StreamingLocatorsClientListPathsOptions) (StreamingLocatorsClientListPathsResponse, error)

ListPaths - List Paths supported by this Streaming Locator If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • streamingLocatorName - The Streaming Locator name.
  • options - StreamingLocatorsClientListPathsOptions contains the optional parameters for the StreamingLocatorsClient.ListPaths method.
Example (ListPathsWhichHasStreamingPathsAndDownloadPaths)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/streaming-locators-list-paths-streaming-and-download.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewStreamingLocatorsClient().ListPaths(ctx, "contoso", "contosomedia", "clearStreamingLocator", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ListPathsResponse = armmediaservices.ListPathsResponse{
// 	DownloadPaths: []*string{
// 		to.Ptr("/262a87b6-b538-4657-bac1-b6897924471d/textTrack.vtt"),
// 		to.Ptr("/262a87b6-b538-4657-bac1-b6897924471d/video1.mp4"),
// 		to.Ptr("/262a87b6-b538-4657-bac1-b6897924471d/video2.mp4"),
// 		to.Ptr("/262a87b6-b538-4657-bac1-b6897924471d/video3.mp4")},
// 		StreamingPaths: []*armmediaservices.StreamingPath{
// 			{
// 				EncryptionScheme: to.Ptr(armmediaservices.EncryptionSchemeNoEncryption),
// 				Paths: []*string{
// 					to.Ptr("/262a87b6-b538-4657-bac1-b6897924471d/videoManifest1.ism/manifest(format=m3u8-aapl)"),
// 					to.Ptr("/262a87b6-b538-4657-bac1-b6897924471d/videoManifest2.ism/manifest(format=m3u8-aapl)"),
// 					to.Ptr("/262a87b6-b538-4657-bac1-b6897924471d/videoManifest3.ism/manifest(format=m3u8-aapl)")},
// 					StreamingProtocol: to.Ptr(armmediaservices.StreamingPolicyStreamingProtocolHls),
// 				},
// 				{
// 					EncryptionScheme: to.Ptr(armmediaservices.EncryptionSchemeNoEncryption),
// 					Paths: []*string{
// 						to.Ptr("/262a87b6-b538-4657-bac1-b6897924471d/videoManifest1.ism/manifest(format=mpd-time-csf)"),
// 						to.Ptr("/262a87b6-b538-4657-bac1-b6897924471d/videoManifest2.ism/manifest(format=mpd-time-csf)"),
// 						to.Ptr("/262a87b6-b538-4657-bac1-b6897924471d/videoManifest3.ism/manifest(format=mpd-time-csf)")},
// 						StreamingProtocol: to.Ptr(armmediaservices.StreamingPolicyStreamingProtocolDash),
// 					},
// 					{
// 						EncryptionScheme: to.Ptr(armmediaservices.EncryptionSchemeNoEncryption),
// 						Paths: []*string{
// 							to.Ptr("/262a87b6-b538-4657-bac1-b6897924471d/videoManifest1.ism/manifest"),
// 							to.Ptr("/262a87b6-b538-4657-bac1-b6897924471d/videoManifest2.ism/manifest"),
// 							to.Ptr("/262a87b6-b538-4657-bac1-b6897924471d/videoManifest3.ism/manifest")},
// 							StreamingProtocol: to.Ptr(armmediaservices.StreamingPolicyStreamingProtocolSmoothStreaming),
// 					}},
// 				}
Output:

Example (ListPathsWhichHasStreamingPathsOnly)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/streaming-locators-list-paths-streaming-only.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewStreamingLocatorsClient().ListPaths(ctx, "contoso", "contosomedia", "secureStreamingLocator", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ListPathsResponse = armmediaservices.ListPathsResponse{
// 	DownloadPaths: []*string{
// 	},
// 	StreamingPaths: []*armmediaservices.StreamingPath{
// 		{
// 			EncryptionScheme: to.Ptr(armmediaservices.EncryptionSchemeEnvelopeEncryption),
// 			Paths: []*string{
// 				to.Ptr("/c3cd62e3-d117-4619-bcbd-99f96edd8dbe/videoManifest1.ism/manifest(format=m3u8-aapl,encryption=cbc)"),
// 				to.Ptr("/c3cd62e3-d117-4619-bcbd-99f96edd8dbe/videoManifest2.ism/manifest(format=m3u8-aapl,encryption=cbc)"),
// 				to.Ptr("/c3cd62e3-d117-4619-bcbd-99f96edd8dbe/videoManifest3.ism/manifest(format=m3u8-aapl,encryption=cbc)")},
// 				StreamingProtocol: to.Ptr(armmediaservices.StreamingPolicyStreamingProtocolHls),
// 			},
// 			{
// 				EncryptionScheme: to.Ptr(armmediaservices.EncryptionSchemeEnvelopeEncryption),
// 				Paths: []*string{
// 					to.Ptr("/c3cd62e3-d117-4619-bcbd-99f96edd8dbe/videoManifest1.ism/manifest(format=mpd-time-csf,encryption=cbc)"),
// 					to.Ptr("/c3cd62e3-d117-4619-bcbd-99f96edd8dbe/videoManifest2.ism/manifest(format=mpd-time-csf,encryption=cbc)"),
// 					to.Ptr("/c3cd62e3-d117-4619-bcbd-99f96edd8dbe/videoManifest3.ism/manifest(format=mpd-time-csf,encryption=cbc)")},
// 					StreamingProtocol: to.Ptr(armmediaservices.StreamingPolicyStreamingProtocolDash),
// 				},
// 				{
// 					EncryptionScheme: to.Ptr(armmediaservices.EncryptionSchemeEnvelopeEncryption),
// 					Paths: []*string{
// 						to.Ptr("/c3cd62e3-d117-4619-bcbd-99f96edd8dbe/videoManifest1.ism/manifest(encryption=cbc)"),
// 						to.Ptr("/c3cd62e3-d117-4619-bcbd-99f96edd8dbe/videoManifest2.ism/manifest(encryption=cbc)"),
// 						to.Ptr("/c3cd62e3-d117-4619-bcbd-99f96edd8dbe/videoManifest3.ism/manifest(encryption=cbc)")},
// 						StreamingProtocol: to.Ptr(armmediaservices.StreamingPolicyStreamingProtocolSmoothStreaming),
// 					},
// 					{
// 						EncryptionScheme: to.Ptr(armmediaservices.EncryptionSchemeCommonEncryptionCenc),
// 						Paths: []*string{
// 							to.Ptr("/c3cd62e3-d117-4619-bcbd-99f96edd8dbe/videoManifest1.ism/manifest(format=mpd-time-csf,encryption=cenc)"),
// 							to.Ptr("/c3cd62e3-d117-4619-bcbd-99f96edd8dbe/videoManifest2.ism/manifest(format=mpd-time-csf,encryption=cenc)"),
// 							to.Ptr("/c3cd62e3-d117-4619-bcbd-99f96edd8dbe/videoManifest3.ism/manifest(format=mpd-time-csf,encryption=cenc)")},
// 							StreamingProtocol: to.Ptr(armmediaservices.StreamingPolicyStreamingProtocolDash),
// 						},
// 						{
// 							EncryptionScheme: to.Ptr(armmediaservices.EncryptionSchemeCommonEncryptionCenc),
// 							Paths: []*string{
// 								to.Ptr("/c3cd62e3-d117-4619-bcbd-99f96edd8dbe/videoManifest1.ism/manifest(encryption=cenc)"),
// 								to.Ptr("/c3cd62e3-d117-4619-bcbd-99f96edd8dbe/videoManifest2.ism/manifest(encryption=cenc)"),
// 								to.Ptr("/c3cd62e3-d117-4619-bcbd-99f96edd8dbe/videoManifest3.ism/manifest(encryption=cenc)")},
// 								StreamingProtocol: to.Ptr(armmediaservices.StreamingPolicyStreamingProtocolSmoothStreaming),
// 							},
// 							{
// 								EncryptionScheme: to.Ptr(armmediaservices.EncryptionSchemeCommonEncryptionCbcs),
// 								Paths: []*string{
// 									to.Ptr("/c3cd62e3-d117-4619-bcbd-99f96edd8dbe/videoManifest1.ism/manifest(format=m3u8-aapl,encryption=cbcs-aapl)"),
// 									to.Ptr("/c3cd62e3-d117-4619-bcbd-99f96edd8dbe/videoManifest2.ism/manifest(format=m3u8-aapl,encryption=cbcs-aapl)"),
// 									to.Ptr("/c3cd62e3-d117-4619-bcbd-99f96edd8dbe/videoManifest3.ism/manifest(format=m3u8-aapl,encryption=cbcs-aapl)")},
// 									StreamingProtocol: to.Ptr(armmediaservices.StreamingPolicyStreamingProtocolHls),
// 							}},
// 						}
Output:

func (*StreamingLocatorsClient) NewListPager

func (client *StreamingLocatorsClient) NewListPager(resourceGroupName string, accountName string, options *StreamingLocatorsClientListOptions) *runtime.Pager[StreamingLocatorsClientListResponse]

NewListPager - Lists the Streaming Locators in the account

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • options - StreamingLocatorsClientListOptions contains the optional parameters for the StreamingLocatorsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/streaming-locators-list.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewStreamingLocatorsClient().NewListPager("contoso", "contosomedia", &armmediaservices.StreamingLocatorsClientListOptions{Filter: nil,
	Top:     nil,
	Orderby: nil,
})
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.StreamingLocatorCollection = armmediaservices.StreamingLocatorCollection{
	// 	Value: []*armmediaservices.StreamingLocator{
	// 		{
	// 			Name: to.Ptr("clearStreamingLocator"),
	// 			Type: to.Ptr("Microsoft.Media/mediaservices/streamingLocators"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/streamingLocators/clearStreamingLocator"),
	// 			Properties: &armmediaservices.StreamingLocatorProperties{
	// 				AssetName: to.Ptr("ClimbingMountRainier"),
	// 				ContentKeys: []*armmediaservices.StreamingLocatorContentKey{
	// 				},
	// 				Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-08T18:29:31.934Z"); return t}()),
	// 				EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "9999-12-31T23:59:59.999Z"); return t}()),
	// 				StreamingLocatorID: to.Ptr("6a116ec6-0c85-441f-9c31-89a5bc3adf0a"),
	// 				StreamingPolicyName: to.Ptr("clearStreamingPolicy"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("secureStreamingLocator"),
	// 			Type: to.Ptr("Microsoft.Media/mediaservices/streamingLocators"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/streamingLocators/secureStreamingLocator"),
	// 			Properties: &armmediaservices.StreamingLocatorProperties{
	// 				AssetName: to.Ptr("ClimbingMountRainier"),
	// 				ContentKeys: []*armmediaservices.StreamingLocatorContentKey{
	// 				},
	// 				Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-08T18:29:31.954Z"); return t}()),
	// 				EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "9999-12-31T23:59:59.999Z"); return t}()),
	// 				StreamingLocatorID: to.Ptr("7338ef90-ffc8-42de-8bff-de8f99973300"),
	// 				StreamingPolicyName: to.Ptr("secureStreamingPolicy"),
	// 			},
	// 	}},
	// }
}
Output:

type StreamingLocatorsClientCreateOptions

type StreamingLocatorsClientCreateOptions struct {
}

StreamingLocatorsClientCreateOptions contains the optional parameters for the StreamingLocatorsClient.Create method.

type StreamingLocatorsClientCreateResponse

type StreamingLocatorsClientCreateResponse struct {
	// A Streaming Locator resource
	StreamingLocator
}

StreamingLocatorsClientCreateResponse contains the response from method StreamingLocatorsClient.Create.

type StreamingLocatorsClientDeleteOptions

type StreamingLocatorsClientDeleteOptions struct {
}

StreamingLocatorsClientDeleteOptions contains the optional parameters for the StreamingLocatorsClient.Delete method.

type StreamingLocatorsClientDeleteResponse

type StreamingLocatorsClientDeleteResponse struct {
}

StreamingLocatorsClientDeleteResponse contains the response from method StreamingLocatorsClient.Delete.

type StreamingLocatorsClientGetOptions

type StreamingLocatorsClientGetOptions struct {
}

StreamingLocatorsClientGetOptions contains the optional parameters for the StreamingLocatorsClient.Get method.

type StreamingLocatorsClientGetResponse

type StreamingLocatorsClientGetResponse struct {
	// A Streaming Locator resource
	StreamingLocator
}

StreamingLocatorsClientGetResponse contains the response from method StreamingLocatorsClient.Get.

type StreamingLocatorsClientListContentKeysOptions

type StreamingLocatorsClientListContentKeysOptions struct {
}

StreamingLocatorsClientListContentKeysOptions contains the optional parameters for the StreamingLocatorsClient.ListContentKeys method.

type StreamingLocatorsClientListContentKeysResponse

type StreamingLocatorsClientListContentKeysResponse struct {
	// Class of response for listContentKeys action
	ListContentKeysResponse
}

StreamingLocatorsClientListContentKeysResponse contains the response from method StreamingLocatorsClient.ListContentKeys.

type StreamingLocatorsClientListOptions

type StreamingLocatorsClientListOptions struct {
	// Restricts the set of items returned.
	Filter *string

	// Specifies the key by which the result collection should be ordered.
	Orderby *string

	// Specifies a non-negative integer n that limits the number of items returned from a collection. The service returns the
	// number of available items up to but not greater than the specified value n.
	Top *int32
}

StreamingLocatorsClientListOptions contains the optional parameters for the StreamingLocatorsClient.NewListPager method.

type StreamingLocatorsClientListPathsOptions

type StreamingLocatorsClientListPathsOptions struct {
}

StreamingLocatorsClientListPathsOptions contains the optional parameters for the StreamingLocatorsClient.ListPaths method.

type StreamingLocatorsClientListPathsResponse

type StreamingLocatorsClientListPathsResponse struct {
	// Class of response for listPaths action
	ListPathsResponse
}

StreamingLocatorsClientListPathsResponse contains the response from method StreamingLocatorsClient.ListPaths.

type StreamingLocatorsClientListResponse

type StreamingLocatorsClientListResponse struct {
	// A collection of StreamingLocator items.
	StreamingLocatorCollection
}

StreamingLocatorsClientListResponse contains the response from method StreamingLocatorsClient.NewListPager.

type StreamingPath

type StreamingPath struct {
	// REQUIRED; Encryption scheme
	EncryptionScheme *EncryptionScheme

	// REQUIRED; Streaming protocol
	StreamingProtocol *StreamingPolicyStreamingProtocol

	// Streaming paths for each protocol and encryptionScheme pair
	Paths []*string
}

StreamingPath - Class of paths for streaming

func (StreamingPath) MarshalJSON

func (s StreamingPath) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type StreamingPath.

func (*StreamingPath) UnmarshalJSON

func (s *StreamingPath) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type StreamingPath.

type StreamingPoliciesClient

type StreamingPoliciesClient struct {
	// contains filtered or unexported fields
}

StreamingPoliciesClient contains the methods for the StreamingPolicies group. Don't use this type directly, use NewStreamingPoliciesClient() instead.

func NewStreamingPoliciesClient

func NewStreamingPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*StreamingPoliciesClient, error)

NewStreamingPoliciesClient creates a new instance of StreamingPoliciesClient with the specified values.

  • subscriptionID - The unique identifier for a Microsoft Azure subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*StreamingPoliciesClient) Create

func (client *StreamingPoliciesClient) Create(ctx context.Context, resourceGroupName string, accountName string, streamingPolicyName string, parameters StreamingPolicy, options *StreamingPoliciesClientCreateOptions) (StreamingPoliciesClientCreateResponse, error)

Create - Create a Streaming Policy in the Media Services account If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • streamingPolicyName - The Streaming Policy name.
  • parameters - The request parameters
  • options - StreamingPoliciesClientCreateOptions contains the optional parameters for the StreamingPoliciesClient.Create method.
Example (CreatesAStreamingPolicyWithClearKeyEncryptionInCommonEncryptionCbcs)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/streaming-policies-create-commonEncryptionCbcs-clearKeyEncryption.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewStreamingPoliciesClient().Create(ctx, "contoso", "contosomedia", "UserCreatedSecureStreamingPolicyWithCommonEncryptionCbcsOnly", armmediaservices.StreamingPolicy{
	Properties: &armmediaservices.StreamingPolicyProperties{
		CommonEncryptionCbcs: &armmediaservices.CommonEncryptionCbcs{
			ClearKeyEncryptionConfiguration: &armmediaservices.ClearKeyEncryptionConfiguration{
				CustomKeysAcquisitionURLTemplate: to.Ptr("https://contoso.com/{AlternativeMediaId}/clearkey/"),
			},
			ContentKeys: &armmediaservices.StreamingPolicyContentKeys{
				DefaultKey: &armmediaservices.DefaultKey{
					Label: to.Ptr("cbcsDefaultKey"),
				},
			},
			EnabledProtocols: &armmediaservices.EnabledProtocols{
				Dash:            to.Ptr(false),
				Download:        to.Ptr(false),
				Hls:             to.Ptr(true),
				SmoothStreaming: to.Ptr(false),
			},
		},
		DefaultContentKeyPolicyName: to.Ptr("PolicyWithMultipleOptions"),
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

Example (CreatesAStreamingPolicyWithClearKeyEncryptionInCommonEncryptionCenc)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/streaming-policies-create-commonEncryptionCenc-clearKeyEncryption.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewStreamingPoliciesClient().Create(ctx, "contoso", "contosomedia", "UserCreatedSecureStreamingPolicyWithCommonEncryptionCencOnly", armmediaservices.StreamingPolicy{
	Properties: &armmediaservices.StreamingPolicyProperties{
		CommonEncryptionCenc: &armmediaservices.CommonEncryptionCenc{
			ClearKeyEncryptionConfiguration: &armmediaservices.ClearKeyEncryptionConfiguration{
				CustomKeysAcquisitionURLTemplate: to.Ptr("https://contoso.com/{AlternativeMediaId}/clearkey/"),
			},
			ClearTracks: []*armmediaservices.TrackSelection{
				{
					TrackSelections: []*armmediaservices.TrackPropertyCondition{
						{
							Operation: to.Ptr(armmediaservices.TrackPropertyCompareOperationEqual),
							Property:  to.Ptr(armmediaservices.TrackPropertyTypeFourCC),
							Value:     to.Ptr("hev1"),
						}},
				}},
			ContentKeys: &armmediaservices.StreamingPolicyContentKeys{
				DefaultKey: &armmediaservices.DefaultKey{
					Label: to.Ptr("cencDefaultKey"),
				},
			},
			EnabledProtocols: &armmediaservices.EnabledProtocols{
				Dash:            to.Ptr(true),
				Download:        to.Ptr(false),
				Hls:             to.Ptr(false),
				SmoothStreaming: to.Ptr(true),
			},
		},
		DefaultContentKeyPolicyName: to.Ptr("PolicyWithPlayReadyOptionAndOpenRestriction"),
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

Example (CreatesAStreamingPolicyWithClearStreaming)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/streaming-policies-create-clear.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewStreamingPoliciesClient().Create(ctx, "contoso", "contosomedia", "UserCreatedClearStreamingPolicy", armmediaservices.StreamingPolicy{
	Properties: &armmediaservices.StreamingPolicyProperties{
		NoEncryption: &armmediaservices.NoEncryption{
			EnabledProtocols: &armmediaservices.EnabledProtocols{
				Dash:            to.Ptr(true),
				Download:        to.Ptr(true),
				Hls:             to.Ptr(true),
				SmoothStreaming: to.Ptr(true),
			},
		},
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

Example (CreatesAStreamingPolicyWithCommonEncryptionCbcsOnly)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/streaming-policies-create-commonEncryptionCbcs-only.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewStreamingPoliciesClient().Create(ctx, "contoso", "contosomedia", "UserCreatedSecureStreamingPolicyWithCommonEncryptionCbcsOnly", armmediaservices.StreamingPolicy{
	Properties: &armmediaservices.StreamingPolicyProperties{
		CommonEncryptionCbcs: &armmediaservices.CommonEncryptionCbcs{
			ContentKeys: &armmediaservices.StreamingPolicyContentKeys{
				DefaultKey: &armmediaservices.DefaultKey{
					Label: to.Ptr("cbcsDefaultKey"),
				},
			},
			Drm: &armmediaservices.CbcsDrmConfiguration{
				FairPlay: &armmediaservices.StreamingPolicyFairPlayConfiguration{
					AllowPersistentLicense:              to.Ptr(true),
					CustomLicenseAcquisitionURLTemplate: to.Ptr("https://contoso.com/{AssetAlternativeId}/fairplay/{ContentKeyId}"),
				},
			},
			EnabledProtocols: &armmediaservices.EnabledProtocols{
				Dash:            to.Ptr(false),
				Download:        to.Ptr(false),
				Hls:             to.Ptr(true),
				SmoothStreaming: to.Ptr(false),
			},
		},
		DefaultContentKeyPolicyName: to.Ptr("PolicyWithMultipleOptions"),
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

Example (CreatesAStreamingPolicyWithCommonEncryptionCencOnly)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/streaming-policies-create-commonEncryptionCenc-only.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewStreamingPoliciesClient().Create(ctx, "contoso", "contosomedia", "UserCreatedSecureStreamingPolicyWithCommonEncryptionCencOnly", armmediaservices.StreamingPolicy{
	Properties: &armmediaservices.StreamingPolicyProperties{
		CommonEncryptionCenc: &armmediaservices.CommonEncryptionCenc{
			ClearTracks: []*armmediaservices.TrackSelection{
				{
					TrackSelections: []*armmediaservices.TrackPropertyCondition{
						{
							Operation: to.Ptr(armmediaservices.TrackPropertyCompareOperationEqual),
							Property:  to.Ptr(armmediaservices.TrackPropertyTypeFourCC),
							Value:     to.Ptr("hev1"),
						}},
				}},
			ContentKeys: &armmediaservices.StreamingPolicyContentKeys{
				DefaultKey: &armmediaservices.DefaultKey{
					Label: to.Ptr("cencDefaultKey"),
				},
			},
			Drm: &armmediaservices.CencDrmConfiguration{
				PlayReady: &armmediaservices.StreamingPolicyPlayReadyConfiguration{
					CustomLicenseAcquisitionURLTemplate: to.Ptr("https://contoso.com/{AssetAlternativeId}/playready/{ContentKeyId}"),
					PlayReadyCustomAttributes:           to.Ptr("PlayReady CustomAttributes"),
				},
				Widevine: &armmediaservices.StreamingPolicyWidevineConfiguration{
					CustomLicenseAcquisitionURLTemplate: to.Ptr("https://contoso.com/{AssetAlternativeId}/widevine/{ContentKeyId"),
				},
			},
			EnabledProtocols: &armmediaservices.EnabledProtocols{
				Dash:            to.Ptr(true),
				Download:        to.Ptr(false),
				Hls:             to.Ptr(false),
				SmoothStreaming: to.Ptr(true),
			},
		},
		DefaultContentKeyPolicyName: to.Ptr("PolicyWithPlayReadyOptionAndOpenRestriction"),
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

Example (CreatesAStreamingPolicyWithEnvelopeEncryptionOnly)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/streaming-policies-create-envelopeEncryption-only.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewStreamingPoliciesClient().Create(ctx, "contoso", "contosomedia", "UserCreatedSecureStreamingPolicyWithEnvelopeEncryptionOnly", armmediaservices.StreamingPolicy{
	Properties: &armmediaservices.StreamingPolicyProperties{
		DefaultContentKeyPolicyName: to.Ptr("PolicyWithClearKeyOptionAndTokenRestriction"),
		EnvelopeEncryption: &armmediaservices.EnvelopeEncryption{
			ContentKeys: &armmediaservices.StreamingPolicyContentKeys{
				DefaultKey: &armmediaservices.DefaultKey{
					Label: to.Ptr("aesDefaultKey"),
				},
			},
			CustomKeyAcquisitionURLTemplate: to.Ptr("https://contoso.com/{AssetAlternativeId}/envelope/{ContentKeyId}"),
			EnabledProtocols: &armmediaservices.EnabledProtocols{
				Dash:            to.Ptr(true),
				Download:        to.Ptr(false),
				Hls:             to.Ptr(true),
				SmoothStreaming: to.Ptr(true),
			},
		},
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

Example (CreatesAStreamingPolicyWithSecureStreaming)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/streaming-policies-create-secure-streaming.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewStreamingPoliciesClient().Create(ctx, "contoso", "contosomedia", "UserCreatedSecureStreamingPolicy", armmediaservices.StreamingPolicy{
	Properties: &armmediaservices.StreamingPolicyProperties{
		CommonEncryptionCbcs: &armmediaservices.CommonEncryptionCbcs{
			ContentKeys: &armmediaservices.StreamingPolicyContentKeys{
				DefaultKey: &armmediaservices.DefaultKey{
					Label: to.Ptr("cbcsDefaultKey"),
				},
			},
			Drm: &armmediaservices.CbcsDrmConfiguration{
				FairPlay: &armmediaservices.StreamingPolicyFairPlayConfiguration{
					AllowPersistentLicense:              to.Ptr(true),
					CustomLicenseAcquisitionURLTemplate: to.Ptr("https://contoso.com/{AssetAlternativeId}/fairplay/{ContentKeyId}"),
				},
			},
			EnabledProtocols: &armmediaservices.EnabledProtocols{
				Dash:            to.Ptr(false),
				Download:        to.Ptr(false),
				Hls:             to.Ptr(true),
				SmoothStreaming: to.Ptr(false),
			},
		},
		CommonEncryptionCenc: &armmediaservices.CommonEncryptionCenc{
			ClearTracks: []*armmediaservices.TrackSelection{
				{
					TrackSelections: []*armmediaservices.TrackPropertyCondition{
						{
							Operation: to.Ptr(armmediaservices.TrackPropertyCompareOperationEqual),
							Property:  to.Ptr(armmediaservices.TrackPropertyTypeFourCC),
							Value:     to.Ptr("hev1"),
						}},
				}},
			ContentKeys: &armmediaservices.StreamingPolicyContentKeys{
				DefaultKey: &armmediaservices.DefaultKey{
					Label: to.Ptr("cencDefaultKey"),
				},
			},
			Drm: &armmediaservices.CencDrmConfiguration{
				PlayReady: &armmediaservices.StreamingPolicyPlayReadyConfiguration{
					CustomLicenseAcquisitionURLTemplate: to.Ptr("https://contoso.com/{AssetAlternativeId}/playready/{ContentKeyId}"),
					PlayReadyCustomAttributes:           to.Ptr("PlayReady CustomAttributes"),
				},
				Widevine: &armmediaservices.StreamingPolicyWidevineConfiguration{
					CustomLicenseAcquisitionURLTemplate: to.Ptr("https://contoso.com/{AssetAlternativeId}/widevine/{ContentKeyId"),
				},
			},
			EnabledProtocols: &armmediaservices.EnabledProtocols{
				Dash:            to.Ptr(true),
				Download:        to.Ptr(false),
				Hls:             to.Ptr(false),
				SmoothStreaming: to.Ptr(true),
			},
		},
		DefaultContentKeyPolicyName: to.Ptr("PolicyWithMultipleOptions"),
		EnvelopeEncryption: &armmediaservices.EnvelopeEncryption{
			ContentKeys: &armmediaservices.StreamingPolicyContentKeys{
				DefaultKey: &armmediaservices.DefaultKey{
					Label: to.Ptr("aesDefaultKey"),
				},
			},
			CustomKeyAcquisitionURLTemplate: to.Ptr("https://contoso.com/{AssetAlternativeId}/envelope/{ContentKeyId}"),
			EnabledProtocols: &armmediaservices.EnabledProtocols{
				Dash:            to.Ptr(true),
				Download:        to.Ptr(false),
				Hls:             to.Ptr(true),
				SmoothStreaming: to.Ptr(true),
			},
		},
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*StreamingPoliciesClient) Delete

func (client *StreamingPoliciesClient) Delete(ctx context.Context, resourceGroupName string, accountName string, streamingPolicyName string, options *StreamingPoliciesClientDeleteOptions) (StreamingPoliciesClientDeleteResponse, error)

Delete - Deletes a Streaming Policy in the Media Services account If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • streamingPolicyName - The Streaming Policy name.
  • options - StreamingPoliciesClientDeleteOptions contains the optional parameters for the StreamingPoliciesClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/streaming-policies-delete.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewStreamingPoliciesClient().Delete(ctx, "contoso", "contosomedia", "secureStreamingPolicyWithCommonEncryptionCbcsOnly", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*StreamingPoliciesClient) Get

func (client *StreamingPoliciesClient) Get(ctx context.Context, resourceGroupName string, accountName string, streamingPolicyName string, options *StreamingPoliciesClientGetOptions) (StreamingPoliciesClientGetResponse, error)

Get - Get the details of a Streaming Policy in the Media Services account If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • streamingPolicyName - The Streaming Policy name.
  • options - StreamingPoliciesClientGetOptions contains the optional parameters for the StreamingPoliciesClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/streaming-policy-get-by-name.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewStreamingPoliciesClient().Get(ctx, "contoso", "contosomedia", "clearStreamingPolicy", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.StreamingPolicy = armmediaservices.StreamingPolicy{
// 	Name: to.Ptr("clearStreamingPolicy"),
// 	Type: to.Ptr("Microsoft.Media/mediaservices/streamingPolicies"),
// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/streamingPolicies/clearStreamingPolicy"),
// 	Properties: &armmediaservices.StreamingPolicyProperties{
// 		Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-08T18:29:30.850Z"); return t}()),
// 		NoEncryption: &armmediaservices.NoEncryption{
// 			EnabledProtocols: &armmediaservices.EnabledProtocols{
// 				Dash: to.Ptr(true),
// 				Download: to.Ptr(true),
// 				Hls: to.Ptr(true),
// 				SmoothStreaming: to.Ptr(true),
// 			},
// 		},
// 	},
// }
Output:

func (*StreamingPoliciesClient) NewListPager

func (client *StreamingPoliciesClient) NewListPager(resourceGroupName string, accountName string, options *StreamingPoliciesClientListOptions) *runtime.Pager[StreamingPoliciesClientListResponse]

NewListPager - Lists the Streaming Policies in the account

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • options - StreamingPoliciesClientListOptions contains the optional parameters for the StreamingPoliciesClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/streaming-policies-list.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewStreamingPoliciesClient().NewListPager("contoso", "contosomedia", &armmediaservices.StreamingPoliciesClientListOptions{Filter: nil,
	Top:     nil,
	Orderby: nil,
})
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.StreamingPolicyCollection = armmediaservices.StreamingPolicyCollection{
	// 	Value: []*armmediaservices.StreamingPolicy{
	// 		{
	// 			Name: to.Ptr("clearStreamingPolicy"),
	// 			Type: to.Ptr("Microsoft.Media/mediaservices/streamingPolicies"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/streamingPolicies/clearStreamingPolicy"),
	// 			Properties: &armmediaservices.StreamingPolicyProperties{
	// 				Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-08T18:29:30.676Z"); return t}()),
	// 				NoEncryption: &armmediaservices.NoEncryption{
	// 					EnabledProtocols: &armmediaservices.EnabledProtocols{
	// 						Dash: to.Ptr(true),
	// 						Download: to.Ptr(true),
	// 						Hls: to.Ptr(true),
	// 						SmoothStreaming: to.Ptr(true),
	// 					},
	// 				},
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("secureStreamingPolicy"),
	// 			Type: to.Ptr("Microsoft.Media/mediaservices/streamingPolicies"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/streamingPolicies/secureStreamingPolicy"),
	// 			Properties: &armmediaservices.StreamingPolicyProperties{
	// 				CommonEncryptionCbcs: &armmediaservices.CommonEncryptionCbcs{
	// 					ClearTracks: []*armmediaservices.TrackSelection{
	// 					},
	// 					ContentKeys: &armmediaservices.StreamingPolicyContentKeys{
	// 						DefaultKey: &armmediaservices.DefaultKey{
	// 							Label: to.Ptr("cbcsDefaultKey"),
	// 						},
	// 						KeyToTrackMappings: []*armmediaservices.StreamingPolicyContentKey{
	// 						},
	// 					},
	// 					Drm: &armmediaservices.CbcsDrmConfiguration{
	// 						FairPlay: &armmediaservices.StreamingPolicyFairPlayConfiguration{
	// 							AllowPersistentLicense: to.Ptr(true),
	// 							CustomLicenseAcquisitionURLTemplate: to.Ptr("https://contoso.com/{AssetAlternativeId}/fairplay/{ContentKeyId}"),
	// 						},
	// 					},
	// 					EnabledProtocols: &armmediaservices.EnabledProtocols{
	// 						Dash: to.Ptr(false),
	// 						Download: to.Ptr(false),
	// 						Hls: to.Ptr(true),
	// 						SmoothStreaming: to.Ptr(false),
	// 					},
	// 				},
	// 				CommonEncryptionCenc: &armmediaservices.CommonEncryptionCenc{
	// 					ClearTracks: []*armmediaservices.TrackSelection{
	// 						{
	// 							TrackSelections: []*armmediaservices.TrackPropertyCondition{
	// 								{
	// 									Operation: to.Ptr(armmediaservices.TrackPropertyCompareOperationUnknown),
	// 									Property: to.Ptr(armmediaservices.TrackPropertyTypeFourCC),
	// 									Value: to.Ptr("hev1"),
	// 							}},
	// 					}},
	// 					ContentKeys: &armmediaservices.StreamingPolicyContentKeys{
	// 						DefaultKey: &armmediaservices.DefaultKey{
	// 							Label: to.Ptr("cencDefaultKey"),
	// 						},
	// 						KeyToTrackMappings: []*armmediaservices.StreamingPolicyContentKey{
	// 						},
	// 					},
	// 					Drm: &armmediaservices.CencDrmConfiguration{
	// 						PlayReady: &armmediaservices.StreamingPolicyPlayReadyConfiguration{
	// 							CustomLicenseAcquisitionURLTemplate: to.Ptr("https://contoso.com/{AssetAlternativeId}/playready/{ContentKeyId}"),
	// 							PlayReadyCustomAttributes: to.Ptr("PlayReady CustomAttributes"),
	// 						},
	// 						Widevine: &armmediaservices.StreamingPolicyWidevineConfiguration{
	// 							CustomLicenseAcquisitionURLTemplate: to.Ptr("https://contoso.com/{AssetAlternativeId}/widevine/{ContentKeyId"),
	// 						},
	// 					},
	// 					EnabledProtocols: &armmediaservices.EnabledProtocols{
	// 						Dash: to.Ptr(true),
	// 						Download: to.Ptr(false),
	// 						Hls: to.Ptr(false),
	// 						SmoothStreaming: to.Ptr(true),
	// 					},
	// 				},
	// 				Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-08T18:29:30.678Z"); return t}()),
	// 				DefaultContentKeyPolicyName: to.Ptr("PolicyWithMultipleOptions"),
	// 				EnvelopeEncryption: &armmediaservices.EnvelopeEncryption{
	// 					ClearTracks: []*armmediaservices.TrackSelection{
	// 					},
	// 					ContentKeys: &armmediaservices.StreamingPolicyContentKeys{
	// 						DefaultKey: &armmediaservices.DefaultKey{
	// 							Label: to.Ptr("aesDefaultKey"),
	// 						},
	// 						KeyToTrackMappings: []*armmediaservices.StreamingPolicyContentKey{
	// 						},
	// 					},
	// 					CustomKeyAcquisitionURLTemplate: to.Ptr("https://contoso.com/{AssetAlternativeId}/envelope/{ContentKeyId}"),
	// 					EnabledProtocols: &armmediaservices.EnabledProtocols{
	// 						Dash: to.Ptr(true),
	// 						Download: to.Ptr(false),
	// 						Hls: to.Ptr(true),
	// 						SmoothStreaming: to.Ptr(true),
	// 					},
	// 				},
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("secureStreamingPolicyWithCommonEncryptionCbcsOnly"),
	// 			Type: to.Ptr("Microsoft.Media/mediaservices/streamingPolicies"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/streamingPolicies/secureStreamingPolicyWithCommonEncryptionCbcsOnly"),
	// 			Properties: &armmediaservices.StreamingPolicyProperties{
	// 				CommonEncryptionCbcs: &armmediaservices.CommonEncryptionCbcs{
	// 					ClearTracks: []*armmediaservices.TrackSelection{
	// 					},
	// 					ContentKeys: &armmediaservices.StreamingPolicyContentKeys{
	// 						DefaultKey: &armmediaservices.DefaultKey{
	// 							Label: to.Ptr("cbcsDefaultKey"),
	// 						},
	// 						KeyToTrackMappings: []*armmediaservices.StreamingPolicyContentKey{
	// 						},
	// 					},
	// 					Drm: &armmediaservices.CbcsDrmConfiguration{
	// 						FairPlay: &armmediaservices.StreamingPolicyFairPlayConfiguration{
	// 							AllowPersistentLicense: to.Ptr(true),
	// 							CustomLicenseAcquisitionURLTemplate: to.Ptr("https://contoso.com/{AssetAlternativeId}/fairplay/{ContentKeyId}"),
	// 						},
	// 					},
	// 					EnabledProtocols: &armmediaservices.EnabledProtocols{
	// 						Dash: to.Ptr(false),
	// 						Download: to.Ptr(false),
	// 						Hls: to.Ptr(true),
	// 						SmoothStreaming: to.Ptr(false),
	// 					},
	// 				},
	// 				Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-08T18:29:30.678Z"); return t}()),
	// 				DefaultContentKeyPolicyName: to.Ptr("PolicyWithMultipleOptions"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("secureStreamingPolicyWithCommonEncryptionCencOnly"),
	// 			Type: to.Ptr("Microsoft.Media/mediaservices/streamingPolicies"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/streamingPolicies/secureStreamingPolicyWithCommonEncryptionCencOnly"),
	// 			Properties: &armmediaservices.StreamingPolicyProperties{
	// 				CommonEncryptionCenc: &armmediaservices.CommonEncryptionCenc{
	// 					ClearTracks: []*armmediaservices.TrackSelection{
	// 						{
	// 							TrackSelections: []*armmediaservices.TrackPropertyCondition{
	// 								{
	// 									Operation: to.Ptr(armmediaservices.TrackPropertyCompareOperationUnknown),
	// 									Property: to.Ptr(armmediaservices.TrackPropertyTypeFourCC),
	// 									Value: to.Ptr("hev1"),
	// 							}},
	// 					}},
	// 					ContentKeys: &armmediaservices.StreamingPolicyContentKeys{
	// 						DefaultKey: &armmediaservices.DefaultKey{
	// 							Label: to.Ptr("cencDefaultKey"),
	// 						},
	// 						KeyToTrackMappings: []*armmediaservices.StreamingPolicyContentKey{
	// 						},
	// 					},
	// 					Drm: &armmediaservices.CencDrmConfiguration{
	// 						PlayReady: &armmediaservices.StreamingPolicyPlayReadyConfiguration{
	// 							CustomLicenseAcquisitionURLTemplate: to.Ptr("https://contoso.com/{AssetAlternativeId}/playready/{ContentKeyId}"),
	// 							PlayReadyCustomAttributes: to.Ptr("PlayReady CustomAttributes"),
	// 						},
	// 						Widevine: &armmediaservices.StreamingPolicyWidevineConfiguration{
	// 							CustomLicenseAcquisitionURLTemplate: to.Ptr("https://contoso.com/{AssetAlternativeId}/widevine/{ContentKeyId"),
	// 						},
	// 					},
	// 					EnabledProtocols: &armmediaservices.EnabledProtocols{
	// 						Dash: to.Ptr(true),
	// 						Download: to.Ptr(false),
	// 						Hls: to.Ptr(false),
	// 						SmoothStreaming: to.Ptr(true),
	// 					},
	// 				},
	// 				Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-08T18:29:30.678Z"); return t}()),
	// 				DefaultContentKeyPolicyName: to.Ptr("PolicyWithMultipleOptions"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("secureStreamingPolicyWithEnvelopeEncryptionOnly"),
	// 			Type: to.Ptr("Microsoft.Media/mediaservices/streamingPolicies"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/streamingPolicies/secureStreamingPolicyWithEnvelopeEncryptionOnly"),
	// 			Properties: &armmediaservices.StreamingPolicyProperties{
	// 				Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-08T18:29:30.678Z"); return t}()),
	// 				DefaultContentKeyPolicyName: to.Ptr("PolicyWithClearKeyOptionAndTokenRestriction"),
	// 				EnvelopeEncryption: &armmediaservices.EnvelopeEncryption{
	// 					ClearTracks: []*armmediaservices.TrackSelection{
	// 					},
	// 					ContentKeys: &armmediaservices.StreamingPolicyContentKeys{
	// 						DefaultKey: &armmediaservices.DefaultKey{
	// 							Label: to.Ptr("aesDefaultKey"),
	// 						},
	// 						KeyToTrackMappings: []*armmediaservices.StreamingPolicyContentKey{
	// 						},
	// 					},
	// 					CustomKeyAcquisitionURLTemplate: to.Ptr("https://contoso.com/{AssetAlternativeId}/envelope/{ContentKeyId}"),
	// 					EnabledProtocols: &armmediaservices.EnabledProtocols{
	// 						Dash: to.Ptr(true),
	// 						Download: to.Ptr(false),
	// 						Hls: to.Ptr(true),
	// 						SmoothStreaming: to.Ptr(true),
	// 					},
	// 				},
	// 			},
	// 	}},
	// }
}
Output:

type StreamingPoliciesClientCreateOptions

type StreamingPoliciesClientCreateOptions struct {
}

StreamingPoliciesClientCreateOptions contains the optional parameters for the StreamingPoliciesClient.Create method.

type StreamingPoliciesClientCreateResponse

type StreamingPoliciesClientCreateResponse struct {
	// A Streaming Policy resource
	StreamingPolicy
}

StreamingPoliciesClientCreateResponse contains the response from method StreamingPoliciesClient.Create.

type StreamingPoliciesClientDeleteOptions

type StreamingPoliciesClientDeleteOptions struct {
}

StreamingPoliciesClientDeleteOptions contains the optional parameters for the StreamingPoliciesClient.Delete method.

type StreamingPoliciesClientDeleteResponse

type StreamingPoliciesClientDeleteResponse struct {
}

StreamingPoliciesClientDeleteResponse contains the response from method StreamingPoliciesClient.Delete.

type StreamingPoliciesClientGetOptions

type StreamingPoliciesClientGetOptions struct {
}

StreamingPoliciesClientGetOptions contains the optional parameters for the StreamingPoliciesClient.Get method.

type StreamingPoliciesClientGetResponse

type StreamingPoliciesClientGetResponse struct {
	// A Streaming Policy resource
	StreamingPolicy
}

StreamingPoliciesClientGetResponse contains the response from method StreamingPoliciesClient.Get.

type StreamingPoliciesClientListOptions

type StreamingPoliciesClientListOptions struct {
	// Restricts the set of items returned.
	Filter *string

	// Specifies the key by which the result collection should be ordered.
	Orderby *string

	// Specifies a non-negative integer n that limits the number of items returned from a collection. The service returns the
	// number of available items up to but not greater than the specified value n.
	Top *int32
}

StreamingPoliciesClientListOptions contains the optional parameters for the StreamingPoliciesClient.NewListPager method.

type StreamingPoliciesClientListResponse

type StreamingPoliciesClientListResponse struct {
	// A collection of StreamingPolicy items.
	StreamingPolicyCollection
}

StreamingPoliciesClientListResponse contains the response from method StreamingPoliciesClient.NewListPager.

type StreamingPolicy

type StreamingPolicy struct {
	// Class to specify properties of Streaming Policy
	Properties *StreamingPolicyProperties

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; The system metadata relating to this resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

StreamingPolicy - A Streaming Policy resource

func (StreamingPolicy) MarshalJSON

func (s StreamingPolicy) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type StreamingPolicy.

func (*StreamingPolicy) UnmarshalJSON

func (s *StreamingPolicy) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type StreamingPolicy.

type StreamingPolicyCollection

type StreamingPolicyCollection struct {
	// A link to the next page of the collection (when the collection contains too many results to return in one response).
	ODataNextLink *string

	// A collection of StreamingPolicy items.
	Value []*StreamingPolicy
}

StreamingPolicyCollection - A collection of StreamingPolicy items.

func (StreamingPolicyCollection) MarshalJSON

func (s StreamingPolicyCollection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type StreamingPolicyCollection.

func (*StreamingPolicyCollection) UnmarshalJSON

func (s *StreamingPolicyCollection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type StreamingPolicyCollection.

type StreamingPolicyContentKey

type StreamingPolicyContentKey struct {
	// Label can be used to specify Content Key when creating a Streaming Locator
	Label *string

	// Policy used by Content Key
	PolicyName *string

	// Tracks which use this content key
	Tracks []*TrackSelection
}

StreamingPolicyContentKey - Class to specify properties of content key

func (StreamingPolicyContentKey) MarshalJSON

func (s StreamingPolicyContentKey) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type StreamingPolicyContentKey.

func (*StreamingPolicyContentKey) UnmarshalJSON

func (s *StreamingPolicyContentKey) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type StreamingPolicyContentKey.

type StreamingPolicyContentKeys

type StreamingPolicyContentKeys struct {
	// Default content key for an encryption scheme
	DefaultKey *DefaultKey

	// Representing tracks needs separate content key
	KeyToTrackMappings []*StreamingPolicyContentKey
}

StreamingPolicyContentKeys - Class to specify properties of all content keys in Streaming Policy

func (StreamingPolicyContentKeys) MarshalJSON

func (s StreamingPolicyContentKeys) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type StreamingPolicyContentKeys.

func (*StreamingPolicyContentKeys) UnmarshalJSON

func (s *StreamingPolicyContentKeys) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type StreamingPolicyContentKeys.

type StreamingPolicyFairPlayConfiguration

type StreamingPolicyFairPlayConfiguration struct {
	// REQUIRED; All license to be persistent or not
	AllowPersistentLicense *bool

	// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media
	// Services for issuing licenses. The template supports replaceable tokens that the
	// service will update at runtime with the value specific to the request. The currently supported token values are {AlternativeMediaId},
	// which is replaced with the value of
	// StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of the key being
	// requested.
	CustomLicenseAcquisitionURLTemplate *string
}

StreamingPolicyFairPlayConfiguration - Class to specify configurations of FairPlay in Streaming Policy

func (StreamingPolicyFairPlayConfiguration) MarshalJSON

func (s StreamingPolicyFairPlayConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type StreamingPolicyFairPlayConfiguration.

func (*StreamingPolicyFairPlayConfiguration) UnmarshalJSON

func (s *StreamingPolicyFairPlayConfiguration) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type StreamingPolicyFairPlayConfiguration.

type StreamingPolicyPlayReadyConfiguration

type StreamingPolicyPlayReadyConfiguration struct {
	// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media
	// Services for issuing licenses. The template supports replaceable tokens that the
	// service will update at runtime with the value specific to the request. The currently supported token values are {AlternativeMediaId},
	// which is replaced with the value of
	// StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of the key being
	// requested.
	CustomLicenseAcquisitionURLTemplate *string

	// Custom attributes for PlayReady
	PlayReadyCustomAttributes *string
}

StreamingPolicyPlayReadyConfiguration - Class to specify configurations of PlayReady in Streaming Policy

func (StreamingPolicyPlayReadyConfiguration) MarshalJSON

func (s StreamingPolicyPlayReadyConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type StreamingPolicyPlayReadyConfiguration.

func (*StreamingPolicyPlayReadyConfiguration) UnmarshalJSON

func (s *StreamingPolicyPlayReadyConfiguration) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type StreamingPolicyPlayReadyConfiguration.

type StreamingPolicyProperties

type StreamingPolicyProperties struct {
	// Configuration of CommonEncryptionCbcs
	CommonEncryptionCbcs *CommonEncryptionCbcs

	// Configuration of CommonEncryptionCenc
	CommonEncryptionCenc *CommonEncryptionCenc

	// Default ContentKey used by current Streaming Policy
	DefaultContentKeyPolicyName *string

	// Configuration of EnvelopeEncryption
	EnvelopeEncryption *EnvelopeEncryption

	// Configurations of NoEncryption
	NoEncryption *NoEncryption

	// READ-ONLY; Creation time of Streaming Policy
	Created *time.Time
}

StreamingPolicyProperties - Class to specify properties of Streaming Policy

func (StreamingPolicyProperties) MarshalJSON

func (s StreamingPolicyProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type StreamingPolicyProperties.

func (*StreamingPolicyProperties) UnmarshalJSON

func (s *StreamingPolicyProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type StreamingPolicyProperties.

type StreamingPolicyStreamingProtocol

type StreamingPolicyStreamingProtocol string

StreamingPolicyStreamingProtocol - Streaming protocol

const (
	// StreamingPolicyStreamingProtocolDash - DASH protocol
	StreamingPolicyStreamingProtocolDash StreamingPolicyStreamingProtocol = "Dash"
	// StreamingPolicyStreamingProtocolDownload - Download protocol
	StreamingPolicyStreamingProtocolDownload StreamingPolicyStreamingProtocol = "Download"
	// StreamingPolicyStreamingProtocolHls - HLS protocol
	StreamingPolicyStreamingProtocolHls StreamingPolicyStreamingProtocol = "Hls"
	// StreamingPolicyStreamingProtocolSmoothStreaming - SmoothStreaming protocol
	StreamingPolicyStreamingProtocolSmoothStreaming StreamingPolicyStreamingProtocol = "SmoothStreaming"
)

func PossibleStreamingPolicyStreamingProtocolValues

func PossibleStreamingPolicyStreamingProtocolValues() []StreamingPolicyStreamingProtocol

PossibleStreamingPolicyStreamingProtocolValues returns the possible values for the StreamingPolicyStreamingProtocol const type.

type StreamingPolicyWidevineConfiguration

type StreamingPolicyWidevineConfiguration struct {
	// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media
	// Services for issuing licenses. The template supports replaceable tokens that the
	// service will update at runtime with the value specific to the request. The currently supported token values are {AlternativeMediaId},
	// which is replaced with the value of
	// StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of the key being
	// requested.
	CustomLicenseAcquisitionURLTemplate *string
}

StreamingPolicyWidevineConfiguration - Class to specify configurations of Widevine in Streaming Policy

func (StreamingPolicyWidevineConfiguration) MarshalJSON

func (s StreamingPolicyWidevineConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type StreamingPolicyWidevineConfiguration.

func (*StreamingPolicyWidevineConfiguration) UnmarshalJSON

func (s *StreamingPolicyWidevineConfiguration) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type StreamingPolicyWidevineConfiguration.

type StretchMode

type StretchMode string

StretchMode - The resizing mode - how the input video will be resized to fit the desired output resolution(s). Default is AutoSize

const (
	// StretchModeAutoFit - Pad the output (with either letterbox or pillar box) to honor the output resolution, while ensuring
	// that the active video region in the output has the same aspect ratio as the input. For example, if the input is 1920x1080
	// and the encoding preset asks for 1280x1280, then the output will be at 1280x1280, which contains an inner rectangle of
	// 1280x720 at aspect ratio of 16:9, and pillar box regions 280 pixels wide at the left and right.
	StretchModeAutoFit StretchMode = "AutoFit"
	// StretchModeAutoSize - Override the output resolution, and change it to match the display aspect ratio of the input, without
	// padding. For example, if the input is 1920x1080 and the encoding preset asks for 1280x1280, then the value in the preset
	// is overridden, and the output will be at 1280x720, which maintains the input aspect ratio of 16:9.
	StretchModeAutoSize StretchMode = "AutoSize"
	// StretchModeNone - Strictly respect the output resolution without considering the pixel aspect ratio or display aspect ratio
	// of the input video.
	StretchModeNone StretchMode = "None"
)

func PossibleStretchModeValues

func PossibleStretchModeValues() []StretchMode

PossibleStretchModeValues returns the possible values for the StretchMode const type.

type SyncStorageKeysInput

type SyncStorageKeysInput struct {
	// The ID of the storage account resource.
	ID *string
}

SyncStorageKeysInput - The input to the sync storage keys request.

func (SyncStorageKeysInput) MarshalJSON

func (s SyncStorageKeysInput) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SyncStorageKeysInput.

func (*SyncStorageKeysInput) UnmarshalJSON

func (s *SyncStorageKeysInput) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SyncStorageKeysInput.

type SystemData

type SystemData struct {
	// The timestamp of resource creation (UTC).
	CreatedAt *time.Time

	// The identity that created the resource.
	CreatedBy *string

	// The type of identity that created the resource.
	CreatedByType *CreatedByType

	// The timestamp of resource last modification (UTC)
	LastModifiedAt *time.Time

	// The identity that last modified the resource.
	LastModifiedBy *string

	// The type of identity that last modified the resource.
	LastModifiedByType *CreatedByType
}

SystemData - Metadata pertaining to creation and last modification of the resource.

func (SystemData) MarshalJSON

func (s SystemData) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SystemData.

func (*SystemData) UnmarshalJSON

func (s *SystemData) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SystemData.

type TextTrack

type TextTrack struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string

	// The display name of the text track on a video player. In HLS, this maps to the NAME attribute of EXT-X-MEDIA.
	DisplayName *string

	// The file name to the source file. This file is located in the storage container of the asset.
	FileName *string

	// The HLS specific setting for the text track.
	HlsSettings *HlsSettings

	// When PlayerVisibility is set to "Visible", the text track will be present in the DASH manifest or HLS playlist when requested
	// by a client. When the PlayerVisibility is set to "Hidden", the text will
	// not be available to the client. The default value is "Visible".
	PlayerVisibility *Visibility

	// READ-ONLY; The RFC5646 language code for the text track.
	LanguageCode *string
}

TextTrack - Represents a text track in an asset. A text track is usually used for sparse data related to the audio or video tracks.

func (*TextTrack) GetTrackBase

func (t *TextTrack) GetTrackBase() *TrackBase

GetTrackBase implements the TrackBaseClassification interface for type TextTrack.

func (TextTrack) MarshalJSON

func (t TextTrack) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TextTrack.

func (*TextTrack) UnmarshalJSON

func (t *TextTrack) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TextTrack.

type TrackAttribute

type TrackAttribute string

TrackAttribute - The TrackAttribute to filter the tracks by.

const (
	// TrackAttributeBitrate - The bitrate of the track.
	TrackAttributeBitrate TrackAttribute = "Bitrate"
	// TrackAttributeLanguage - The language of the track.
	TrackAttributeLanguage TrackAttribute = "Language"
)

func PossibleTrackAttributeValues

func PossibleTrackAttributeValues() []TrackAttribute

PossibleTrackAttributeValues returns the possible values for the TrackAttribute const type.

type TrackBase

type TrackBase struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string
}

TrackBase - Base type for concrete track types. A derived type must be used to represent the Track.

func (*TrackBase) GetTrackBase

func (t *TrackBase) GetTrackBase() *TrackBase

GetTrackBase implements the TrackBaseClassification interface for type TrackBase.

func (TrackBase) MarshalJSON

func (t TrackBase) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TrackBase.

func (*TrackBase) UnmarshalJSON

func (t *TrackBase) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TrackBase.

type TrackBaseClassification

type TrackBaseClassification interface {
	// GetTrackBase returns the TrackBase content of the underlying type.
	GetTrackBase() *TrackBase
}

TrackBaseClassification provides polymorphic access to related types. Call the interface's GetTrackBase() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *AudioTrack, *TextTrack, *TrackBase, *VideoTrack

type TrackDescriptor

type TrackDescriptor struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string
}

TrackDescriptor - Base type for all TrackDescriptor types, which define the metadata and selection for tracks that should be processed by a Job

func (*TrackDescriptor) GetTrackDescriptor

func (t *TrackDescriptor) GetTrackDescriptor() *TrackDescriptor

GetTrackDescriptor implements the TrackDescriptorClassification interface for type TrackDescriptor.

func (TrackDescriptor) MarshalJSON

func (t TrackDescriptor) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TrackDescriptor.

func (*TrackDescriptor) UnmarshalJSON

func (t *TrackDescriptor) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TrackDescriptor.

type TrackDescriptorClassification

type TrackDescriptorClassification interface {
	// GetTrackDescriptor returns the TrackDescriptor content of the underlying type.
	GetTrackDescriptor() *TrackDescriptor
}

TrackDescriptorClassification provides polymorphic access to related types. Call the interface's GetTrackDescriptor() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *AudioTrackDescriptor, *SelectAudioTrackByAttribute, *SelectAudioTrackByID, *SelectVideoTrackByAttribute, *SelectVideoTrackByID, - *TrackDescriptor, *VideoTrackDescriptor

type TrackPropertyCompareOperation

type TrackPropertyCompareOperation string

TrackPropertyCompareOperation - Track property condition operation

const (
	// TrackPropertyCompareOperationEqual - Equal operation
	TrackPropertyCompareOperationEqual TrackPropertyCompareOperation = "Equal"
	// TrackPropertyCompareOperationUnknown - Unknown track property compare operation
	TrackPropertyCompareOperationUnknown TrackPropertyCompareOperation = "Unknown"
)

func PossibleTrackPropertyCompareOperationValues

func PossibleTrackPropertyCompareOperationValues() []TrackPropertyCompareOperation

PossibleTrackPropertyCompareOperationValues returns the possible values for the TrackPropertyCompareOperation const type.

type TrackPropertyCondition

type TrackPropertyCondition struct {
	// REQUIRED; Track property condition operation
	Operation *TrackPropertyCompareOperation

	// REQUIRED; Track property type
	Property *TrackPropertyType

	// Track property value
	Value *string
}

TrackPropertyCondition - Class to specify one track property condition

func (TrackPropertyCondition) MarshalJSON

func (t TrackPropertyCondition) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TrackPropertyCondition.

func (*TrackPropertyCondition) UnmarshalJSON

func (t *TrackPropertyCondition) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TrackPropertyCondition.

type TrackPropertyType

type TrackPropertyType string

TrackPropertyType - Track property type

const (
	// TrackPropertyTypeFourCC - Track FourCC
	TrackPropertyTypeFourCC TrackPropertyType = "FourCC"
	// TrackPropertyTypeUnknown - Unknown track property
	TrackPropertyTypeUnknown TrackPropertyType = "Unknown"
)

func PossibleTrackPropertyTypeValues

func PossibleTrackPropertyTypeValues() []TrackPropertyType

PossibleTrackPropertyTypeValues returns the possible values for the TrackPropertyType const type.

type TrackSelection

type TrackSelection struct {
	// TrackSelections is a track property condition list which can specify track(s)
	TrackSelections []*TrackPropertyCondition
}

TrackSelection - Class to select a track

func (TrackSelection) MarshalJSON

func (t TrackSelection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TrackSelection.

func (*TrackSelection) UnmarshalJSON

func (t *TrackSelection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TrackSelection.

type TrackedResource

type TrackedResource struct {
	// REQUIRED; The geo-location where the resource lives
	Location *string

	// Resource tags.
	Tags map[string]*string

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

TrackedResource - The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'

func (TrackedResource) MarshalJSON

func (t TrackedResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TrackedResource.

func (*TrackedResource) UnmarshalJSON

func (t *TrackedResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TrackedResource.

type TracksClient

type TracksClient struct {
	// contains filtered or unexported fields
}

TracksClient contains the methods for the Tracks group. Don't use this type directly, use NewTracksClient() instead.

func NewTracksClient

func NewTracksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*TracksClient, error)

NewTracksClient creates a new instance of TracksClient with the specified values.

  • subscriptionID - The unique identifier for a Microsoft Azure subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*TracksClient) BeginCreateOrUpdate

func (client *TracksClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, assetName string, trackName string, parameters AssetTrack, options *TracksClientBeginCreateOrUpdateOptions) (*runtime.Poller[TracksClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Create or update a Track in the asset If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • assetName - The Asset name.
  • trackName - The Asset Track name.
  • parameters - The request parameters
  • options - TracksClientBeginCreateOrUpdateOptions contains the optional parameters for the TracksClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/asset-tracks-create.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewTracksClient().BeginCreateOrUpdate(ctx, "contoso", "contosomedia", "ClimbingMountRainer", "text3", armmediaservices.AssetTrack{
	Properties: &armmediaservices.AssetTrackProperties{
		Track: &armmediaservices.TextTrack{
			ODataType:        to.Ptr("#Microsoft.Media.TextTrack"),
			DisplayName:      to.Ptr("A new track"),
			FileName:         to.Ptr("text3.ttml"),
			PlayerVisibility: to.Ptr(armmediaservices.VisibilityVisible),
		},
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.AssetTrack = armmediaservices.AssetTrack{
// 	Name: to.Ptr("text3"),
// 	Type: to.Ptr("Microsoft.Media/mediaservices/assets/tracks"),
// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingMountRainer/tracks/text3"),
// 	Properties: &armmediaservices.AssetTrackProperties{
// 		ProvisioningState: to.Ptr(armmediaservices.ProvisioningStateSucceeded),
// 		Track: &armmediaservices.TextTrack{
// 			ODataType: to.Ptr("#Microsoft.Media.TextTrack"),
// 			DisplayName: to.Ptr("A new track"),
// 			FileName: to.Ptr("text3.ttml"),
// 			PlayerVisibility: to.Ptr(armmediaservices.VisibilityVisible),
// 		},
// 	},
// }
Output:

func (*TracksClient) BeginDelete

func (client *TracksClient) BeginDelete(ctx context.Context, resourceGroupName string, accountName string, assetName string, trackName string, options *TracksClientBeginDeleteOptions) (*runtime.Poller[TracksClientDeleteResponse], error)

BeginDelete - Deletes a Track in the asset If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • assetName - The Asset name.
  • trackName - The Asset Track name.
  • options - TracksClientBeginDeleteOptions contains the optional parameters for the TracksClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/asset-tracks-delete.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewTracksClient().BeginDelete(ctx, "contoso", "contosomedia", "ClimbingMountRainer", "text2", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
_, err = poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
Output:

func (*TracksClient) BeginUpdate

func (client *TracksClient) BeginUpdate(ctx context.Context, resourceGroupName string, accountName string, assetName string, trackName string, parameters AssetTrack, options *TracksClientBeginUpdateOptions) (*runtime.Poller[TracksClientUpdateResponse], error)

BeginUpdate - Updates an existing Track in the asset If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • assetName - The Asset name.
  • trackName - The Asset Track name.
  • parameters - The request parameters
  • options - TracksClientBeginUpdateOptions contains the optional parameters for the TracksClient.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/asset-tracks-update.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewTracksClient().BeginUpdate(ctx, "contoso", "contosomedia", "ClimbingMountRainer", "text1", armmediaservices.AssetTrack{
	Properties: &armmediaservices.AssetTrackProperties{
		Track: &armmediaservices.TextTrack{
			ODataType:   to.Ptr("#Microsoft.Media.TextTrack"),
			DisplayName: to.Ptr("A new name"),
		},
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
_, err = poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
Output:

func (*TracksClient) BeginUpdateTrackData

func (client *TracksClient) BeginUpdateTrackData(ctx context.Context, resourceGroupName string, accountName string, assetName string, trackName string, options *TracksClientBeginUpdateTrackDataOptions) (*runtime.Poller[TracksClientUpdateTrackDataResponse], error)

BeginUpdateTrackData - Update the track data. Call this API after any changes are made to the track data stored in the asset container. For example, you have modified the WebVTT captions file in the Azure blob storage container for the asset, viewers will not see the new version of the captions unless this API is called. Note, the changes may not be reflected immediately. CDN cache may also need to be purged if applicable. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • assetName - The Asset name.
  • trackName - The Asset Track name.
  • options - TracksClientBeginUpdateTrackDataOptions contains the optional parameters for the TracksClient.BeginUpdateTrackData method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/asset-tracks-update-data.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewTracksClient().BeginUpdateTrackData(ctx, "contoso", "contosomedia", "ClimbingMountRainer", "text2", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
_, err = poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
Output:

func (*TracksClient) Get

func (client *TracksClient) Get(ctx context.Context, resourceGroupName string, accountName string, assetName string, trackName string, options *TracksClientGetOptions) (TracksClientGetResponse, error)

Get - Get the details of a Track in the Asset If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • assetName - The Asset name.
  • trackName - The Asset Track name.
  • options - TracksClientGetOptions contains the optional parameters for the TracksClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/asset-tracks-get-by-name.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewTracksClient().Get(ctx, "contoso", "contosomedia", "ClimbingMountRainer", "text1", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.AssetTrack = armmediaservices.AssetTrack{
// 	Name: to.Ptr("text1"),
// 	Type: to.Ptr("Microsoft.Media/mediaservices/assets/tracks"),
// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingMountRainer/tracks/text1"),
// 	Properties: &armmediaservices.AssetTrackProperties{
// 		ProvisioningState: to.Ptr(armmediaservices.ProvisioningStateSucceeded),
// 		Track: &armmediaservices.TextTrack{
// 			ODataType: to.Ptr("#Microsoft.Media.TextTrack"),
// 			DisplayName: to.Ptr("Auto generated"),
// 			FileName: to.Ptr("auto_generated.ttml"),
// 			LanguageCode: to.Ptr("en-us"),
// 			PlayerVisibility: to.Ptr(armmediaservices.VisibilityVisible),
// 		},
// 	},
// }
Output:

func (*TracksClient) NewListPager

func (client *TracksClient) NewListPager(resourceGroupName string, accountName string, assetName string, options *TracksClientListOptions) *runtime.Pager[TracksClientListResponse]

NewListPager - Lists the Tracks in the asset

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • assetName - The Asset name.
  • options - TracksClientListOptions contains the optional parameters for the TracksClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/asset-tracks-list-all.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewTracksClient().NewListPager("contoso", "contosomedia", "ClimbingMountRainer", nil)
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.AssetTrackCollection = armmediaservices.AssetTrackCollection{
	// 	Value: []*armmediaservices.AssetTrack{
	// 		{
	// 			Name: to.Ptr("video"),
	// 			Type: to.Ptr("Microsoft.Media/mediaservices/assets/tracks"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingMountRainer/tracks/video"),
	// 			Properties: &armmediaservices.AssetTrackProperties{
	// 				ProvisioningState: to.Ptr(armmediaservices.ProvisioningStateSucceeded),
	// 				Track: &armmediaservices.VideoTrack{
	// 					ODataType: to.Ptr("#Microsoft.Media.VideoTrack"),
	// 				},
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("audio"),
	// 			Type: to.Ptr("Microsoft.Media/mediaservices/assets/tracks"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingMountRainer/tracks/audio"),
	// 			Properties: &armmediaservices.AssetTrackProperties{
	// 				ProvisioningState: to.Ptr(armmediaservices.ProvisioningStateSucceeded),
	// 				Track: &armmediaservices.AudioTrack{
	// 					ODataType: to.Ptr("#Microsoft.Media.AudioTrack"),
	// 				},
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("text1"),
	// 			Type: to.Ptr("Microsoft.Media/mediaservices/assets/tracks"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingMountRainer/tracks/text1"),
	// 			Properties: &armmediaservices.AssetTrackProperties{
	// 				ProvisioningState: to.Ptr(armmediaservices.ProvisioningStateSucceeded),
	// 				Track: &armmediaservices.TextTrack{
	// 					ODataType: to.Ptr("#Microsoft.Media.TextTrack"),
	// 					DisplayName: to.Ptr("Auto generated"),
	// 					FileName: to.Ptr("auto_generated.ttml"),
	// 					LanguageCode: to.Ptr("en-us"),
	// 					PlayerVisibility: to.Ptr(armmediaservices.VisibilityVisible),
	// 				},
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("text2"),
	// 			Type: to.Ptr("Microsoft.Media/mediaservices/assets/tracks"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingMountRainer/tracks/text2"),
	// 			Properties: &armmediaservices.AssetTrackProperties{
	// 				ProvisioningState: to.Ptr(armmediaservices.ProvisioningStateSucceeded),
	// 				Track: &armmediaservices.TextTrack{
	// 					ODataType: to.Ptr("#Microsoft.Media.TextTrack"),
	// 					DisplayName: to.Ptr("user uploaded text track"),
	// 					FileName: to.Ptr("text2.vtt"),
	// 					HlsSettings: &armmediaservices.HlsSettings{
	// 						Default: to.Ptr(true),
	// 						Characteristics: to.Ptr("public.accessibility.transcribes-spoken-dialog,public.easy-to-read"),
	// 						Forced: to.Ptr(true),
	// 					},
	// 					LanguageCode: to.Ptr("en-us"),
	// 					PlayerVisibility: to.Ptr(armmediaservices.VisibilityHidden),
	// 				},
	// 			},
	// 	}},
	// }
}
Output:

type TracksClientBeginCreateOrUpdateOptions

type TracksClientBeginCreateOrUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

TracksClientBeginCreateOrUpdateOptions contains the optional parameters for the TracksClient.BeginCreateOrUpdate method.

type TracksClientBeginDeleteOptions

type TracksClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

TracksClientBeginDeleteOptions contains the optional parameters for the TracksClient.BeginDelete method.

type TracksClientBeginUpdateOptions

type TracksClientBeginUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

TracksClientBeginUpdateOptions contains the optional parameters for the TracksClient.BeginUpdate method.

type TracksClientBeginUpdateTrackDataOptions

type TracksClientBeginUpdateTrackDataOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

TracksClientBeginUpdateTrackDataOptions contains the optional parameters for the TracksClient.BeginUpdateTrackData method.

type TracksClientCreateOrUpdateResponse

type TracksClientCreateOrUpdateResponse struct {
	// An Asset Track resource.
	AssetTrack
}

TracksClientCreateOrUpdateResponse contains the response from method TracksClient.BeginCreateOrUpdate.

type TracksClientDeleteResponse

type TracksClientDeleteResponse struct {
}

TracksClientDeleteResponse contains the response from method TracksClient.BeginDelete.

type TracksClientGetOptions

type TracksClientGetOptions struct {
}

TracksClientGetOptions contains the optional parameters for the TracksClient.Get method.

type TracksClientGetResponse

type TracksClientGetResponse struct {
	// An Asset Track resource.
	AssetTrack
}

TracksClientGetResponse contains the response from method TracksClient.Get.

type TracksClientListOptions

type TracksClientListOptions struct {
}

TracksClientListOptions contains the optional parameters for the TracksClient.NewListPager method.

type TracksClientListResponse

type TracksClientListResponse struct {
	// A collection of AssetTrack items.
	AssetTrackCollection
}

TracksClientListResponse contains the response from method TracksClient.NewListPager.

type TracksClientUpdateResponse

type TracksClientUpdateResponse struct {
	// An Asset Track resource.
	AssetTrack
}

TracksClientUpdateResponse contains the response from method TracksClient.BeginUpdate.

type TracksClientUpdateTrackDataResponse

type TracksClientUpdateTrackDataResponse struct {
}

TracksClientUpdateTrackDataResponse contains the response from method TracksClient.BeginUpdateTrackData.

type Transform

type Transform struct {
	// The resource properties.
	Properties *TransformProperties

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; The system metadata relating to this resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

Transform - A Transform encapsulates the rules or instructions for generating desired outputs from input media, such as by transcoding or by extracting insights. After the Transform is created, it can be applied to input media by creating Jobs.

func (Transform) MarshalJSON

func (t Transform) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Transform.

func (*Transform) UnmarshalJSON

func (t *Transform) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Transform.

type TransformCollection

type TransformCollection struct {
	// A link to the next page of the collection (when the collection contains too many results to return in one response).
	ODataNextLink *string

	// A collection of Transform items.
	Value []*Transform
}

TransformCollection - A collection of Transform items.

func (TransformCollection) MarshalJSON

func (t TransformCollection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TransformCollection.

func (*TransformCollection) UnmarshalJSON

func (t *TransformCollection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TransformCollection.

type TransformOutput

type TransformOutput struct {
	// REQUIRED; Preset that describes the operations that will be used to modify, transcode, or extract insights from the source
	// file to generate the output.
	Preset PresetClassification

	// A Transform can define more than one outputs. This property defines what the service should do when one output fails -
	// either continue to produce other outputs, or, stop the other outputs. The overall
	// Job state will not reflect failures of outputs that are specified with 'ContinueJob'. The default is 'StopProcessingJob'.
	OnError *OnErrorType

	// Sets the relative priority of the TransformOutputs within a Transform. This sets the priority that the service uses for
	// processing TransformOutputs. The default priority is Normal.
	RelativePriority *Priority
}

TransformOutput - Describes the properties of a TransformOutput, which are the rules to be applied while generating the desired output.

func (TransformOutput) MarshalJSON

func (t TransformOutput) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TransformOutput.

func (*TransformOutput) UnmarshalJSON

func (t *TransformOutput) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TransformOutput.

type TransformProperties

type TransformProperties struct {
	// REQUIRED; An array of one or more TransformOutputs that the Transform should generate.
	Outputs []*TransformOutput

	// An optional verbose description of the Transform.
	Description *string

	// READ-ONLY; The UTC date and time when the Transform was created, in 'YYYY-MM-DDThh:mm:ssZ' format.
	Created *time.Time

	// READ-ONLY; The UTC date and time when the Transform was last updated, in 'YYYY-MM-DDThh:mm:ssZ' format.
	LastModified *time.Time
}

TransformProperties - A Transform.

func (TransformProperties) MarshalJSON

func (t TransformProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TransformProperties.

func (*TransformProperties) UnmarshalJSON

func (t *TransformProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TransformProperties.

type TransformsClient

type TransformsClient struct {
	// contains filtered or unexported fields
}

TransformsClient contains the methods for the Transforms group. Don't use this type directly, use NewTransformsClient() instead.

func NewTransformsClient

func NewTransformsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*TransformsClient, error)

NewTransformsClient creates a new instance of TransformsClient with the specified values.

  • subscriptionID - The unique identifier for a Microsoft Azure subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*TransformsClient) CreateOrUpdate

func (client *TransformsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, transformName string, parameters Transform, options *TransformsClientCreateOrUpdateOptions) (TransformsClientCreateOrUpdateResponse, error)

CreateOrUpdate - Creates or updates a new Transform. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-07-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • transformName - The Transform name.
  • parameters - The request parameters
  • options - TransformsClientCreateOrUpdateOptions contains the optional parameters for the TransformsClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Encoding/stable/2022-07-01/examples/transforms-create.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewTransformsClient().CreateOrUpdate(ctx, "contosoresources", "contosomedia", "createdTransform", armmediaservices.Transform{
	Properties: &armmediaservices.TransformProperties{
		Description: to.Ptr("Example Transform to illustrate create and update."),
		Outputs: []*armmediaservices.TransformOutput{
			{
				Preset: &armmediaservices.BuiltInStandardEncoderPreset{
					ODataType:  to.Ptr("#Microsoft.Media.BuiltInStandardEncoderPreset"),
					PresetName: to.Ptr(armmediaservices.EncoderNamedPresetAdaptiveStreaming),
				},
			}},
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.Transform = armmediaservices.Transform{
// 	Name: to.Ptr("createdTransform"),
// 	Type: to.Ptr("Microsoft.Media/mediaservices/transforms"),
// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosoresources/providers/Microsoft.Media/mediaservices/contosomedia/transforms/createdTransform"),
// 	Properties: &armmediaservices.TransformProperties{
// 		Description: to.Ptr("Example Transform to illustrate create and update."),
// 		Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-17T23:14:31.766Z"); return t}()),
// 		LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-17T23:14:31.766Z"); return t}()),
// 		Outputs: []*armmediaservices.TransformOutput{
// 			{
// 				OnError: to.Ptr(armmediaservices.OnErrorTypeStopProcessingJob),
// 				Preset: &armmediaservices.BuiltInStandardEncoderPreset{
// 					ODataType: to.Ptr("#Microsoft.Media.BuiltInStandardEncoderPreset"),
// 					PresetName: to.Ptr(armmediaservices.EncoderNamedPresetAdaptiveStreaming),
// 				},
// 				RelativePriority: to.Ptr(armmediaservices.PriorityNormal),
// 		}},
// 	},
// 	SystemData: &armmediaservices.SystemData{
// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-17T23:14:31.766Z"); return t}()),
// 		CreatedBy: to.Ptr("contoso@microsoft.com"),
// 		CreatedByType: to.Ptr(armmediaservices.CreatedByTypeUser),
// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-17T23:14:31.766Z"); return t}()),
// 		LastModifiedBy: to.Ptr("contoso@microsoft.com"),
// 		LastModifiedByType: to.Ptr(armmediaservices.CreatedByTypeUser),
// 	},
// }
Output:

func (*TransformsClient) Delete

func (client *TransformsClient) Delete(ctx context.Context, resourceGroupName string, accountName string, transformName string, options *TransformsClientDeleteOptions) (TransformsClientDeleteResponse, error)

Delete - Deletes a Transform. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-07-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • transformName - The Transform name.
  • options - TransformsClientDeleteOptions contains the optional parameters for the TransformsClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Encoding/stable/2022-07-01/examples/transforms-delete.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewTransformsClient().Delete(ctx, "contosoresources", "contosomedia", "sampleTransform", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*TransformsClient) Get

func (client *TransformsClient) Get(ctx context.Context, resourceGroupName string, accountName string, transformName string, options *TransformsClientGetOptions) (TransformsClientGetResponse, error)

Get - Gets a Transform. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-07-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • transformName - The Transform name.
  • options - TransformsClientGetOptions contains the optional parameters for the TransformsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Encoding/stable/2022-07-01/examples/transforms-get-by-name.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewTransformsClient().Get(ctx, "contosoresources", "contosomedia", "sampleTransform", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.Transform = armmediaservices.Transform{
// 	Name: to.Ptr("sampleTransform"),
// 	Type: to.Ptr("Microsoft.Media/mediaservices/transforms"),
// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosoresources/providers/Microsoft.Media/mediaservices/contosomedia/transforms/sampleTransform"),
// 	Properties: &armmediaservices.TransformProperties{
// 		Description: to.Ptr("A sample Transform using the Standard Encoder with a built in preset."),
// 		Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-17T23:14:31.628Z"); return t}()),
// 		LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-17T23:14:31.628Z"); return t}()),
// 		Outputs: []*armmediaservices.TransformOutput{
// 			{
// 				OnError: to.Ptr(armmediaservices.OnErrorTypeStopProcessingJob),
// 				Preset: &armmediaservices.BuiltInStandardEncoderPreset{
// 					ODataType: to.Ptr("#Microsoft.Media.BuiltInStandardEncoderPreset"),
// 					PresetName: to.Ptr(armmediaservices.EncoderNamedPresetH264MultipleBitrate1080P),
// 				},
// 				RelativePriority: to.Ptr(armmediaservices.PriorityNormal),
// 		}},
// 	},
// 	SystemData: &armmediaservices.SystemData{
// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-17T23:14:31.628Z"); return t}()),
// 		CreatedBy: to.Ptr("contoso@microsoft.com"),
// 		CreatedByType: to.Ptr(armmediaservices.CreatedByTypeUser),
// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-17T23:14:31.628Z"); return t}()),
// 		LastModifiedBy: to.Ptr("contoso@microsoft.com"),
// 		LastModifiedByType: to.Ptr(armmediaservices.CreatedByTypeUser),
// 	},
// }
Output:

func (*TransformsClient) NewListPager

func (client *TransformsClient) NewListPager(resourceGroupName string, accountName string, options *TransformsClientListOptions) *runtime.Pager[TransformsClientListResponse]

NewListPager - Lists the Transforms in the account.

Generated from API version 2022-07-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • options - TransformsClientListOptions contains the optional parameters for the TransformsClient.NewListPager method.
Example (ListsTheTransforms)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Encoding/stable/2022-07-01/examples/transforms-list-all.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewTransformsClient().NewListPager("contosoresources", "contosomedia", &armmediaservices.TransformsClientListOptions{Filter: nil,
	Orderby: nil,
})
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.TransformCollection = armmediaservices.TransformCollection{
	// 	Value: []*armmediaservices.Transform{
	// 		{
	// 			Name: to.Ptr("sampleEncode"),
	// 			Type: to.Ptr("Microsoft.Media/mediaservices/transforms"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosoresources/providers/Microsoft.Media/mediaservices/contosomedia/transforms/sampleEncode"),
	// 			Properties: &armmediaservices.TransformProperties{
	// 				Description: to.Ptr("A sample Transform using the Standard Encoder with a built in preset."),
	// 				Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-17T23:14:30.248Z"); return t}()),
	// 				LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-17T23:14:30.248Z"); return t}()),
	// 				Outputs: []*armmediaservices.TransformOutput{
	// 					{
	// 						OnError: to.Ptr(armmediaservices.OnErrorTypeStopProcessingJob),
	// 						Preset: &armmediaservices.BuiltInStandardEncoderPreset{
	// 							ODataType: to.Ptr("#Microsoft.Media.BuiltInStandardEncoderPreset"),
	// 							PresetName: to.Ptr(armmediaservices.EncoderNamedPresetAdaptiveStreaming),
	// 						},
	// 						RelativePriority: to.Ptr(armmediaservices.PriorityNormal),
	// 				}},
	// 			},
	// 			SystemData: &armmediaservices.SystemData{
	// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-17T23:14:30.248Z"); return t}()),
	// 				CreatedBy: to.Ptr("contoso@microsoft.com"),
	// 				CreatedByType: to.Ptr(armmediaservices.CreatedByTypeUser),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-17T23:14:30.248Z"); return t}()),
	// 				LastModifiedBy: to.Ptr("contoso@microsoft.com"),
	// 				LastModifiedByType: to.Ptr(armmediaservices.CreatedByTypeUser),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("sampleEncodeAndVideoIndex"),
	// 			Type: to.Ptr("Microsoft.Media/mediaservices/transforms"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosoresources/providers/Microsoft.Media/mediaservices/contosomedia/transforms/sampleEncodeAndVideoIndex"),
	// 			Properties: &armmediaservices.TransformProperties{
	// 				Description: to.Ptr("A sample Transform using the Standard Encoder with a built-in preset, as well as the Video Analyzer."),
	// 				Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-17T23:14:30.477Z"); return t}()),
	// 				LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-17T23:14:30.477Z"); return t}()),
	// 				Outputs: []*armmediaservices.TransformOutput{
	// 					{
	// 						OnError: to.Ptr(armmediaservices.OnErrorTypeStopProcessingJob),
	// 						Preset: &armmediaservices.BuiltInStandardEncoderPreset{
	// 							ODataType: to.Ptr("#Microsoft.Media.BuiltInStandardEncoderPreset"),
	// 							PresetName: to.Ptr(armmediaservices.EncoderNamedPresetAdaptiveStreaming),
	// 						},
	// 						RelativePriority: to.Ptr(armmediaservices.PriorityNormal),
	// 					},
	// 					{
	// 						OnError: to.Ptr(armmediaservices.OnErrorTypeStopProcessingJob),
	// 						Preset: &armmediaservices.VideoAnalyzerPreset{
	// 							ODataType: to.Ptr("#Microsoft.Media.VideoAnalyzerPreset"),
	// 							Mode: to.Ptr(armmediaservices.AudioAnalysisModeStandard),
	// 							InsightsToExtract: to.Ptr(armmediaservices.InsightsTypeAllInsights),
	// 						},
	// 						RelativePriority: to.Ptr(armmediaservices.PriorityNormal),
	// 				}},
	// 			},
	// 			SystemData: &armmediaservices.SystemData{
	// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-17T23:14:30.477Z"); return t}()),
	// 				CreatedBy: to.Ptr("contoso@microsoft.com"),
	// 				CreatedByType: to.Ptr(armmediaservices.CreatedByTypeUser),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-17T23:14:30.477Z"); return t}()),
	// 				LastModifiedBy: to.Ptr("contoso@microsoft.com"),
	// 				LastModifiedByType: to.Ptr(armmediaservices.CreatedByTypeUser),
	// 			},
	// 	}},
	// }
}
Output:

Example (ListsTheTransformsFilterByCreated)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Encoding/stable/2022-07-01/examples/transforms-list-all-filter-by-created.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewTransformsClient().NewListPager("contosoresources", "contosomedia", &armmediaservices.TransformsClientListOptions{Filter: to.Ptr("properties/created gt 2021-06-01T00:00:00.0000000Z and properties/created le 2021-06-01T00:00:10.0000000Z"),
	Orderby: to.Ptr("properties/created"),
})
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.TransformCollection = armmediaservices.TransformCollection{
	// 	Value: []*armmediaservices.Transform{
	// 		{
	// 			Name: to.Ptr("sampleEncodeAndVideoIndex"),
	// 			Type: to.Ptr("Microsoft.Media/mediaservices/transforms"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosoresources/providers/Microsoft.Media/mediaservices/contosomedia/transforms/sampleEncodeAndVideoIndex"),
	// 			Properties: &armmediaservices.TransformProperties{
	// 				Description: to.Ptr("A sample Transform using the Video Analyzer."),
	// 				Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-01T00:00:10.000Z"); return t}()),
	// 				LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-01T00:00:10.000Z"); return t}()),
	// 				Outputs: []*armmediaservices.TransformOutput{
	// 					{
	// 						OnError: to.Ptr(armmediaservices.OnErrorTypeStopProcessingJob),
	// 						Preset: &armmediaservices.VideoAnalyzerPreset{
	// 							ODataType: to.Ptr("#Microsoft.Media.VideoAnalyzerPreset"),
	// 							Mode: to.Ptr(armmediaservices.AudioAnalysisModeStandard),
	// 							InsightsToExtract: to.Ptr(armmediaservices.InsightsTypeAllInsights),
	// 						},
	// 						RelativePriority: to.Ptr(armmediaservices.PriorityNormal),
	// 				}},
	// 			},
	// 			SystemData: &armmediaservices.SystemData{
	// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-01T00:00:10.000Z"); return t}()),
	// 				CreatedBy: to.Ptr("contoso@microsoft.com"),
	// 				CreatedByType: to.Ptr(armmediaservices.CreatedByTypeUser),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-01T00:00:10.000Z"); return t}()),
	// 				LastModifiedBy: to.Ptr("contoso@microsoft.com"),
	// 				LastModifiedByType: to.Ptr(armmediaservices.CreatedByTypeUser),
	// 			},
	// 	}},
	// }
}
Output:

Example (ListsTheTransformsFilterByLastmodified)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Encoding/stable/2022-07-01/examples/transforms-list-all-filter-by-lastmodified.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewTransformsClient().NewListPager("contosoresources", "contosomedia", &armmediaservices.TransformsClientListOptions{Filter: to.Ptr("properties/lastmodified gt 2021-06-01T00:00:00.0000000Z and properties/lastmodified le 2021-06-01T00:00:10.0000000Z"),
	Orderby: to.Ptr("properties/lastmodified desc"),
})
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.TransformCollection = armmediaservices.TransformCollection{
	// 	Value: []*armmediaservices.Transform{
	// 		{
	// 			Name: to.Ptr("sampleEncodeAndVideoIndex"),
	// 			Type: to.Ptr("Microsoft.Media/mediaservices/transforms"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosoresources/providers/Microsoft.Media/mediaservices/contosomedia/transforms/sampleEncodeAndVideoIndex"),
	// 			Properties: &armmediaservices.TransformProperties{
	// 				Description: to.Ptr("A sample Transform using the Video Analyzer."),
	// 				Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-01T00:00:10.000Z"); return t}()),
	// 				LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-01T00:00:10.000Z"); return t}()),
	// 				Outputs: []*armmediaservices.TransformOutput{
	// 					{
	// 						OnError: to.Ptr(armmediaservices.OnErrorTypeStopProcessingJob),
	// 						Preset: &armmediaservices.VideoAnalyzerPreset{
	// 							ODataType: to.Ptr("#Microsoft.Media.VideoAnalyzerPreset"),
	// 							Mode: to.Ptr(armmediaservices.AudioAnalysisModeStandard),
	// 							InsightsToExtract: to.Ptr(armmediaservices.InsightsTypeAllInsights),
	// 						},
	// 						RelativePriority: to.Ptr(armmediaservices.PriorityNormal),
	// 				}},
	// 			},
	// 			SystemData: &armmediaservices.SystemData{
	// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-01T00:00:10.000Z"); return t}()),
	// 				CreatedBy: to.Ptr("contoso@microsoft.com"),
	// 				CreatedByType: to.Ptr(armmediaservices.CreatedByTypeUser),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-01T00:00:10.000Z"); return t}()),
	// 				LastModifiedBy: to.Ptr("contoso@microsoft.com"),
	// 				LastModifiedByType: to.Ptr(armmediaservices.CreatedByTypeUser),
	// 			},
	// 	}},
	// }
}
Output:

Example (ListsTheTransformsFilterByName)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Encoding/stable/2022-07-01/examples/transforms-list-all-filter-by-name.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewTransformsClient().NewListPager("contosoresources", "contosomedia", &armmediaservices.TransformsClientListOptions{Filter: to.Ptr("(name eq 'sampleEncode') or (name eq 'sampleEncodeAndVideoIndex')"),
	Orderby: to.Ptr("name desc"),
})
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.TransformCollection = armmediaservices.TransformCollection{
	// 	Value: []*armmediaservices.Transform{
	// 		{
	// 			Name: to.Ptr("sampleEncodeAndVideoIndex"),
	// 			Type: to.Ptr("Microsoft.Media/mediaservices/transforms"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosoresources/providers/Microsoft.Media/mediaservices/contosomedia/transforms/sampleEncodeAndVideoIndex"),
	// 			Properties: &armmediaservices.TransformProperties{
	// 				Description: to.Ptr("A sample Transform using the Standard Encoder with a built-in preset, as well as the Video Analyzer."),
	// 				Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-17T23:14:31.238Z"); return t}()),
	// 				LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-17T23:14:31.238Z"); return t}()),
	// 				Outputs: []*armmediaservices.TransformOutput{
	// 					{
	// 						OnError: to.Ptr(armmediaservices.OnErrorTypeStopProcessingJob),
	// 						Preset: &armmediaservices.BuiltInStandardEncoderPreset{
	// 							ODataType: to.Ptr("#Microsoft.Media.BuiltInStandardEncoderPreset"),
	// 							PresetName: to.Ptr(armmediaservices.EncoderNamedPresetAdaptiveStreaming),
	// 						},
	// 						RelativePriority: to.Ptr(armmediaservices.PriorityNormal),
	// 					},
	// 					{
	// 						OnError: to.Ptr(armmediaservices.OnErrorTypeStopProcessingJob),
	// 						Preset: &armmediaservices.VideoAnalyzerPreset{
	// 							ODataType: to.Ptr("#Microsoft.Media.VideoAnalyzerPreset"),
	// 							Mode: to.Ptr(armmediaservices.AudioAnalysisModeStandard),
	// 							InsightsToExtract: to.Ptr(armmediaservices.InsightsTypeAllInsights),
	// 						},
	// 						RelativePriority: to.Ptr(armmediaservices.PriorityNormal),
	// 				}},
	// 			},
	// 			SystemData: &armmediaservices.SystemData{
	// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-17T23:14:31.238Z"); return t}()),
	// 				CreatedBy: to.Ptr("contoso@microsoft.com"),
	// 				CreatedByType: to.Ptr(armmediaservices.CreatedByTypeUser),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-17T23:14:31.238Z"); return t}()),
	// 				LastModifiedBy: to.Ptr("contoso@microsoft.com"),
	// 				LastModifiedByType: to.Ptr(armmediaservices.CreatedByTypeUser),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("sampleEncode"),
	// 			Type: to.Ptr("Microsoft.Media/mediaservices/transforms"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosoresources/providers/Microsoft.Media/mediaservices/contosomedia/transforms/sampleEncode"),
	// 			Properties: &armmediaservices.TransformProperties{
	// 				Description: to.Ptr("A sample Transform using the Standard Encoder with a built in preset."),
	// 				Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-17T23:14:31.238Z"); return t}()),
	// 				LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-17T23:14:31.238Z"); return t}()),
	// 				Outputs: []*armmediaservices.TransformOutput{
	// 					{
	// 						OnError: to.Ptr(armmediaservices.OnErrorTypeStopProcessingJob),
	// 						Preset: &armmediaservices.BuiltInStandardEncoderPreset{
	// 							ODataType: to.Ptr("#Microsoft.Media.BuiltInStandardEncoderPreset"),
	// 							PresetName: to.Ptr(armmediaservices.EncoderNamedPresetAdaptiveStreaming),
	// 						},
	// 						RelativePriority: to.Ptr(armmediaservices.PriorityNormal),
	// 				}},
	// 			},
	// 			SystemData: &armmediaservices.SystemData{
	// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-17T23:14:31.238Z"); return t}()),
	// 				CreatedBy: to.Ptr("contoso@microsoft.com"),
	// 				CreatedByType: to.Ptr(armmediaservices.CreatedByTypeUser),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-17T23:14:31.238Z"); return t}()),
	// 				LastModifiedBy: to.Ptr("contoso@microsoft.com"),
	// 				LastModifiedByType: to.Ptr(armmediaservices.CreatedByTypeUser),
	// 			},
	// 	}},
	// }
}
Output:

func (*TransformsClient) Update

func (client *TransformsClient) Update(ctx context.Context, resourceGroupName string, accountName string, transformName string, parameters Transform, options *TransformsClientUpdateOptions) (TransformsClientUpdateResponse, error)

Update - Updates a Transform. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-07-01

  • resourceGroupName - The name of the resource group within the Azure subscription.
  • accountName - The Media Services account name.
  • transformName - The Transform name.
  • parameters - The request parameters
  • options - TransformsClientUpdateOptions contains the optional parameters for the TransformsClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Encoding/stable/2022-07-01/examples/transforms-update.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewTransformsClient().Update(ctx, "contosoresources", "contosomedia", "transformToUpdate", armmediaservices.Transform{
	Properties: &armmediaservices.TransformProperties{
		Description: to.Ptr("Example transform to illustrate update."),
		Outputs: []*armmediaservices.TransformOutput{
			{
				Preset: &armmediaservices.BuiltInStandardEncoderPreset{
					ODataType:  to.Ptr("#Microsoft.Media.BuiltInStandardEncoderPreset"),
					PresetName: to.Ptr(armmediaservices.EncoderNamedPresetH264MultipleBitrate720P),
				},
				RelativePriority: to.Ptr(armmediaservices.PriorityHigh),
			}},
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.Transform = armmediaservices.Transform{
// 	Name: to.Ptr("transformToUpdate"),
// 	Type: to.Ptr("Microsoft.Media/mediaservices/transforms"),
// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosoresources/providers/Microsoft.Media/mediaservices/contosomedia/transforms/transformToUpdate"),
// 	Properties: &armmediaservices.TransformProperties{
// 		Description: to.Ptr("Example transform to illustrate update."),
// 		Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-17T23:14:32.143Z"); return t}()),
// 		LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-17T23:14:32.145Z"); return t}()),
// 		Outputs: []*armmediaservices.TransformOutput{
// 			{
// 				OnError: to.Ptr(armmediaservices.OnErrorTypeStopProcessingJob),
// 				Preset: &armmediaservices.BuiltInStandardEncoderPreset{
// 					ODataType: to.Ptr("#Microsoft.Media.BuiltInStandardEncoderPreset"),
// 					PresetName: to.Ptr(armmediaservices.EncoderNamedPresetH264MultipleBitrate720P),
// 				},
// 				RelativePriority: to.Ptr(armmediaservices.PriorityHigh),
// 		}},
// 	},
// 	SystemData: &armmediaservices.SystemData{
// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-17T23:14:32.143Z"); return t}()),
// 		CreatedBy: to.Ptr("contoso@microsoft.com"),
// 		CreatedByType: to.Ptr(armmediaservices.CreatedByTypeUser),
// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-17T23:14:32.145Z"); return t}()),
// 		LastModifiedBy: to.Ptr("contoso@microsoft.com"),
// 		LastModifiedByType: to.Ptr(armmediaservices.CreatedByTypeUser),
// 	},
// }
Output:

type TransformsClientCreateOrUpdateOptions

type TransformsClientCreateOrUpdateOptions struct {
}

TransformsClientCreateOrUpdateOptions contains the optional parameters for the TransformsClient.CreateOrUpdate method.

type TransformsClientCreateOrUpdateResponse

type TransformsClientCreateOrUpdateResponse struct {
	// A Transform encapsulates the rules or instructions for generating desired outputs from input media, such as by transcoding
	// or by extracting insights. After the Transform is created, it can be applied to input media by creating Jobs.
	Transform
}

TransformsClientCreateOrUpdateResponse contains the response from method TransformsClient.CreateOrUpdate.

type TransformsClientDeleteOptions

type TransformsClientDeleteOptions struct {
}

TransformsClientDeleteOptions contains the optional parameters for the TransformsClient.Delete method.

type TransformsClientDeleteResponse

type TransformsClientDeleteResponse struct {
}

TransformsClientDeleteResponse contains the response from method TransformsClient.Delete.

type TransformsClientGetOptions

type TransformsClientGetOptions struct {
}

TransformsClientGetOptions contains the optional parameters for the TransformsClient.Get method.

type TransformsClientGetResponse

type TransformsClientGetResponse struct {
	// A Transform encapsulates the rules or instructions for generating desired outputs from input media, such as by transcoding
	// or by extracting insights. After the Transform is created, it can be applied to input media by creating Jobs.
	Transform
}

TransformsClientGetResponse contains the response from method TransformsClient.Get.

type TransformsClientListOptions

type TransformsClientListOptions struct {
	// Restricts the set of items returned.
	Filter *string

	// Specifies the key by which the result collection should be ordered.
	Orderby *string
}

TransformsClientListOptions contains the optional parameters for the TransformsClient.NewListPager method.

type TransformsClientListResponse

type TransformsClientListResponse struct {
	// A collection of Transform items.
	TransformCollection
}

TransformsClientListResponse contains the response from method TransformsClient.NewListPager.

type TransformsClientUpdateOptions

type TransformsClientUpdateOptions struct {
}

TransformsClientUpdateOptions contains the optional parameters for the TransformsClient.Update method.

type TransformsClientUpdateResponse

type TransformsClientUpdateResponse struct {
	// A Transform encapsulates the rules or instructions for generating desired outputs from input media, such as by transcoding
	// or by extracting insights. After the Transform is created, it can be applied to input media by creating Jobs.
	Transform
}

TransformsClientUpdateResponse contains the response from method TransformsClient.Update.

type TransportStreamFormat

type TransportStreamFormat struct {
	// REQUIRED; The file naming pattern used for the creation of output files. The following macros are supported in the file
	// name: {Basename} - An expansion macro that will use the name of the input video file. If
	// the base name(the file suffix is not included) of the input video file is less than 32 characters long, the base name of
	// input video files will be used. If the length of base name of the input video
	// file exceeds 32 characters, the base name is truncated to the first 32 characters in total length. {Extension} - The appropriate
	// extension for this format. {Label} - The label assigned to the
	// codec/layer. {Index} - A unique index for thumbnails. Only applicable to thumbnails. {AudioStream} - string "Audio" plus
	// audio stream number(start from 1). {Bitrate} - The audio/video bitrate in kbps.
	// Not applicable to thumbnails. {Codec} - The type of the audio/video codec. {Resolution} - The video resolution. Any unsubstituted
	// macros will be collapsed and removed from the filename.
	FilenamePattern *string

	// REQUIRED; The discriminator for derived types.
	ODataType *string

	// The list of output files to produce. Each entry in the list is a set of audio and video layer labels to be muxed together
	// .
	OutputFiles []*OutputFile
}

TransportStreamFormat - Describes the properties for generating an MPEG-2 Transport Stream (ISO/IEC 13818-1) output video file(s).

func (*TransportStreamFormat) GetFormat

func (t *TransportStreamFormat) GetFormat() *Format

GetFormat implements the FormatClassification interface for type TransportStreamFormat.

func (*TransportStreamFormat) GetMultiBitrateFormat

func (t *TransportStreamFormat) GetMultiBitrateFormat() *MultiBitrateFormat

GetMultiBitrateFormat implements the MultiBitrateFormatClassification interface for type TransportStreamFormat.

func (TransportStreamFormat) MarshalJSON

func (t TransportStreamFormat) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TransportStreamFormat.

func (*TransportStreamFormat) UnmarshalJSON

func (t *TransportStreamFormat) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TransportStreamFormat.

type UTCClipTime

type UTCClipTime struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string

	// REQUIRED; The time position on the timeline of the input media based on Utc time.
	Time *time.Time
}

UTCClipTime - Specifies the clip time as a Utc time position in the media file. The Utc time can point to a different position depending on whether the media file starts from a timestamp of zero or not.

func (*UTCClipTime) GetClipTime

func (u *UTCClipTime) GetClipTime() *ClipTime

GetClipTime implements the ClipTimeClassification interface for type UTCClipTime.

func (UTCClipTime) MarshalJSON

func (u UTCClipTime) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UTCClipTime.

func (*UTCClipTime) UnmarshalJSON

func (u *UTCClipTime) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UTCClipTime.

type UserAssignedManagedIdentity

type UserAssignedManagedIdentity struct {
	// READ-ONLY; The client ID.
	ClientID *string

	// READ-ONLY; The principal ID.
	PrincipalID *string
}

func (UserAssignedManagedIdentity) MarshalJSON

func (u UserAssignedManagedIdentity) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UserAssignedManagedIdentity.

func (*UserAssignedManagedIdentity) UnmarshalJSON

func (u *UserAssignedManagedIdentity) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UserAssignedManagedIdentity.

type Video

type Video struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string

	// The distance between two key frames. The value should be non-zero in the range [0.5, 20] seconds, specified in ISO 8601
	// format. The default is 2 seconds(PT2S). Note that this setting is ignored if
	// VideoSyncMode.Passthrough is set, where the KeyFrameInterval value will follow the input source setting.
	KeyFrameInterval *string

	// An optional label for the codec. The label can be used to control muxing behavior.
	Label *string

	// The resizing mode - how the input video will be resized to fit the desired output resolution(s). Default is AutoSize
	StretchMode *StretchMode

	// The Video Sync Mode
	SyncMode *VideoSyncMode
}

Video - Describes the basic properties for encoding the input video.

func (*Video) GetCodec

func (v *Video) GetCodec() *Codec

GetCodec implements the CodecClassification interface for type Video.

func (*Video) GetVideo

func (v *Video) GetVideo() *Video

GetVideo implements the VideoClassification interface for type Video.

func (Video) MarshalJSON

func (v Video) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Video.

func (*Video) UnmarshalJSON

func (v *Video) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Video.

type VideoAnalyzerPreset

type VideoAnalyzerPreset struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string

	// The language for the audio payload in the input using the BCP-47 format of 'language tag-region' (e.g: 'en-US'). If you
	// know the language of your content, it is recommended that you specify it. The
	// language must be specified explicitly for AudioAnalysisMode::Basic, since automatic language detection is not included
	// in basic mode. If the language isn't specified or set to null, automatic language
	// detection will choose the first language detected and process with the selected language for the duration of the file.
	// It does not currently support dynamically switching between languages after the
	// first language is detected. The automatic detection works best with audio recordings with clearly discernable speech. If
	// automatic detection fails to find the language, transcription would fallback to
	// 'en-US'." The list of supported languages is available here: https://go.microsoft.com/fwlink/?linkid=2109463
	AudioLanguage *string

	// Dictionary containing key value pairs for parameters not exposed in the preset itself
	ExperimentalOptions map[string]*string

	// Defines the type of insights that you want the service to generate. The allowed values are 'AudioInsightsOnly', 'VideoInsightsOnly',
	// and 'AllInsights'. The default is AllInsights. If you set this to
	// AllInsights and the input is audio only, then only audio insights are generated. Similarly if the input is video only,
	// then only video insights are generated. It is recommended that you not use
	// AudioInsightsOnly if you expect some of your inputs to be video only; or use VideoInsightsOnly if you expect some of your
	// inputs to be audio only. Your Jobs in such conditions would error out.
	InsightsToExtract *InsightsType

	// Determines the set of audio analysis operations to be performed. If unspecified, the Standard AudioAnalysisMode would be
	// chosen.
	Mode *AudioAnalysisMode
}

VideoAnalyzerPreset - A video analyzer preset that extracts insights (rich metadata) from both audio and video, and outputs a JSON format file.

func (*VideoAnalyzerPreset) GetAudioAnalyzerPreset

func (v *VideoAnalyzerPreset) GetAudioAnalyzerPreset() *AudioAnalyzerPreset

GetAudioAnalyzerPreset implements the AudioAnalyzerPresetClassification interface for type VideoAnalyzerPreset.

func (*VideoAnalyzerPreset) GetPreset

func (v *VideoAnalyzerPreset) GetPreset() *Preset

GetPreset implements the PresetClassification interface for type VideoAnalyzerPreset.

func (VideoAnalyzerPreset) MarshalJSON

func (v VideoAnalyzerPreset) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VideoAnalyzerPreset.

func (*VideoAnalyzerPreset) UnmarshalJSON

func (v *VideoAnalyzerPreset) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type VideoAnalyzerPreset.

type VideoClassification

type VideoClassification interface {
	CodecClassification
	// GetVideo returns the Video content of the underlying type.
	GetVideo() *Video
}

VideoClassification provides polymorphic access to related types. Call the interface's GetVideo() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *H264Video, *H265Video, *Image, *JpgImage, *PNGImage, *Video

type VideoLayer

type VideoLayer struct {
	// REQUIRED; The average bitrate in bits per second at which to encode the input video when generating this layer. This is
	// a required field.
	Bitrate *int32

	// Whether or not adaptive B-frames are to be used when encoding this layer. If not specified, the encoder will turn it on
	// whenever the video profile permits its use.
	AdaptiveBFrame *bool

	// The number of B-frames to be used when encoding this layer. If not specified, the encoder chooses an appropriate number
	// based on the video profile and level.
	BFrames *int32

	// The frame rate (in frames per second) at which to encode this layer. The value can be in the form of M/N where M and N
	// are integers (For example, 30000/1001), or in the form of a number (For example,
	// 30, or 29.97). The encoder enforces constraints on allowed frame rates based on the profile and level. If it is not specified,
	// the encoder will use the same frame rate as the input video.
	FrameRate *string

	// The height of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example
	// 50% means the output video has half as many pixels in height as the input.
	Height *string

	// The alphanumeric label for this layer, which can be used in multiplexing different video and audio layers, or in naming
	// the output file.
	Label *string

	// The maximum bitrate (in bits per second), at which the VBV buffer should be assumed to refill. If not specified, defaults
	// to the same value as bitrate.
	MaxBitrate *int32

	// The number of slices to be used when encoding this layer. If not specified, default is zero, which means that encoder will
	// use a single slice for each frame.
	Slices *int32

	// The width of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example
	// 50% means the output video has half as many pixels in width as the input.
	Width *string
}

VideoLayer - Describes the settings to be used when encoding the input video into a desired output bitrate layer.

func (VideoLayer) MarshalJSON

func (v VideoLayer) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VideoLayer.

func (*VideoLayer) UnmarshalJSON

func (v *VideoLayer) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type VideoLayer.

type VideoOverlay

type VideoOverlay struct {
	// REQUIRED; The label of the job input which is to be used as an overlay. The Input must specify exactly one file. You can
	// specify an image file in JPG, PNG, GIF or BMP format, or an audio file (such as a WAV,
	// MP3, WMA or M4A file), or a video file. See https://aka.ms/mesformats for the complete list of supported audio and video
	// file formats.
	InputLabel *string

	// REQUIRED; The discriminator for derived types.
	ODataType *string

	// The gain level of audio in the overlay. The value should be in the range [0, 1.0]. The default is 1.0.
	AudioGainLevel *float64

	// An optional rectangular window used to crop the overlay image or video.
	CropRectangle *Rectangle

	// The end position, with reference to the input video, at which the overlay ends. The value should be in ISO 8601 format.
	// For example, PT30S to end the overlay at 30 seconds into the input video. If not
	// specified or the value is greater than the input video duration, the overlay will be applied until the end of the input
	// video if the overlay media duration is greater than the input video duration,
	// else the overlay will last as long as the overlay media duration.
	End *string

	// The duration over which the overlay fades in onto the input video. The value should be in ISO 8601 duration format. If
	// not specified the default behavior is to have no fade in (same as PT0S).
	FadeInDuration *string

	// The duration over which the overlay fades out of the input video. The value should be in ISO 8601 duration format. If not
	// specified the default behavior is to have no fade out (same as PT0S).
	FadeOutDuration *string

	// The opacity of the overlay. This is a value in the range [0 - 1.0]. Default is 1.0 which mean the overlay is opaque.
	Opacity *float64

	// The location in the input video where the overlay is applied.
	Position *Rectangle

	// The start position, with reference to the input video, at which the overlay starts. The value should be in ISO 8601 format.
	// For example, PT05S to start the overlay at 5 seconds into the input video.
	// If not specified the overlay starts from the beginning of the input video.
	Start *string
}

VideoOverlay - Describes the properties of a video overlay.

func (*VideoOverlay) GetOverlay

func (v *VideoOverlay) GetOverlay() *Overlay

GetOverlay implements the OverlayClassification interface for type VideoOverlay.

func (VideoOverlay) MarshalJSON

func (v VideoOverlay) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VideoOverlay.

func (*VideoOverlay) UnmarshalJSON

func (v *VideoOverlay) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type VideoOverlay.

type VideoSyncMode

type VideoSyncMode string

VideoSyncMode - The Video Sync Mode

const (
	// VideoSyncModeAuto - This is the default method. Chooses between Cfr and Vfr depending on muxer capabilities. For output
	// format MP4, the default mode is Cfr.
	VideoSyncModeAuto VideoSyncMode = "Auto"
	// VideoSyncModeCfr - Input frames will be repeated and/or dropped as needed to achieve exactly the requested constant frame
	// rate. Recommended when the output frame rate is explicitly set at a specified value
	VideoSyncModeCfr VideoSyncMode = "Cfr"
	// VideoSyncModePassthrough - The presentation timestamps on frames are passed through from the input file to the output file
	// writer. Recommended when the input source has variable frame rate, and are attempting to produce multiple layers for adaptive
	// streaming in the output which have aligned GOP boundaries. Note: if two or more frames in the input have duplicate timestamps,
	// then the output will also have the same behavior
	VideoSyncModePassthrough VideoSyncMode = "Passthrough"
	// VideoSyncModeVfr - Similar to the Passthrough mode, but if the input has frames that have duplicate timestamps, then only
	// one frame is passed through to the output, and others are dropped. Recommended when the number of output frames is expected
	// to be equal to the number of input frames. For example, the output is used to calculate a quality metric like PSNR against
	// the input
	VideoSyncModeVfr VideoSyncMode = "Vfr"
)

func PossibleVideoSyncModeValues

func PossibleVideoSyncModeValues() []VideoSyncMode

PossibleVideoSyncModeValues returns the possible values for the VideoSyncMode const type.

type VideoTrack

type VideoTrack struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string
}

VideoTrack - Represents a video track in the asset.

func (*VideoTrack) GetTrackBase

func (v *VideoTrack) GetTrackBase() *TrackBase

GetTrackBase implements the TrackBaseClassification interface for type VideoTrack.

func (VideoTrack) MarshalJSON

func (v VideoTrack) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VideoTrack.

func (*VideoTrack) UnmarshalJSON

func (v *VideoTrack) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type VideoTrack.

type VideoTrackDescriptor

type VideoTrackDescriptor struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string
}

VideoTrackDescriptor - A TrackSelection to select video tracks.

func (*VideoTrackDescriptor) GetTrackDescriptor

func (v *VideoTrackDescriptor) GetTrackDescriptor() *TrackDescriptor

GetTrackDescriptor implements the TrackDescriptorClassification interface for type VideoTrackDescriptor.

func (*VideoTrackDescriptor) GetVideoTrackDescriptor

func (v *VideoTrackDescriptor) GetVideoTrackDescriptor() *VideoTrackDescriptor

GetVideoTrackDescriptor implements the VideoTrackDescriptorClassification interface for type VideoTrackDescriptor.

func (VideoTrackDescriptor) MarshalJSON

func (v VideoTrackDescriptor) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VideoTrackDescriptor.

func (*VideoTrackDescriptor) UnmarshalJSON

func (v *VideoTrackDescriptor) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type VideoTrackDescriptor.

type VideoTrackDescriptorClassification

type VideoTrackDescriptorClassification interface {
	TrackDescriptorClassification
	// GetVideoTrackDescriptor returns the VideoTrackDescriptor content of the underlying type.
	GetVideoTrackDescriptor() *VideoTrackDescriptor
}

VideoTrackDescriptorClassification provides polymorphic access to related types. Call the interface's GetVideoTrackDescriptor() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *SelectVideoTrackByAttribute, *SelectVideoTrackByID, *VideoTrackDescriptor

type Visibility

type Visibility string

Visibility - When PlayerVisibility is set to "Visible", the text track will be present in the DASH manifest or HLS playlist when requested by a client. When the PlayerVisibility is set to "Hidden", the text will not be available to the client. The default value is "Visible".

const (
	// VisibilityHidden - The track is hidden to video player.
	VisibilityHidden Visibility = "Hidden"
	// VisibilityVisible - The track is visible to video player.
	VisibilityVisible Visibility = "Visible"
)

func PossibleVisibilityValues

func PossibleVisibilityValues() []Visibility

PossibleVisibilityValues returns the possible values for the Visibility const type.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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