Skip to main content

live_events

Creates, updates, deletes, gets or lists a live_events resource.

Overview

Namelive_events
TypeResource
Idazure.media_services.live_events

Fields

The following fields are returned by SELECT queries:

OK. The request has succeeded.

NameDatatypeDescription
locationstringThe geo-location where the resource lives
propertiesobjectThe live event properties.
systemDataobjectThe system metadata relating to this resource.
tagsobjectResource tags.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectsubscriptionId, resourceGroupName, accountName, liveEventNameapi-versionGets properties of a live event.
listselectsubscriptionId, resourceGroupName, accountNameapi-versionLists all the live events in the account.
createinsertsubscriptionId, resourceGroupName, accountName, liveEventNameapi-version, autoStartCreates a new live event.
updateupdatesubscriptionId, resourceGroupName, accountName, liveEventNameapi-versionUpdates settings on an existing live event.
deletedeletesubscriptionId, resourceGroupName, accountName, liveEventNameapi-versionDeletes a live event.
allocateexecsubscriptionId, resourceGroupName, accountName, liveEventNameapi-versionA live event is in StandBy state after allocation completes, and is ready to start.
startexecsubscriptionId, resourceGroupName, accountName, liveEventNameapi-versionA live event in Stopped or StandBy state will be in Running state after the start operation completes.
stopexecsubscriptionId, resourceGroupName, accountName, liveEventNameapi-versionStops a running live event.
resetexecsubscriptionId, resourceGroupName, accountName, liveEventNameapi-versionResets 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.
async_operationexecsubscriptionId, resourceGroupName, accountName, operationIdapi-versionGet a live event operation status.
operation_locationexecsubscriptionId, resourceGroupName, accountName, liveEventName, operationIdapi-versionGet a live event operation status.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
accountNamestringThe Media Services account name.
liveEventNamestringThe name of the live event, maximum length is 32.
operationIdstringThe ID of an ongoing async operation.
resourceGroupNamestringThe name of the resource group within the Azure subscription.
subscriptionIdstringThe unique identifier for a Microsoft Azure subscription.
api-versionstringThe version of the API to be used with the client request.
autoStartbooleanThe flag indicates if the resource should be automatically started on creation.

SELECT examples

Gets properties of a live event.

SELECT
location,
properties,
systemData,
tags
FROM azure.media_services.live_events
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
AND accountName = '{{ accountName }}' -- required
AND liveEventName = '{{ liveEventName }}' -- required
AND api-version = '{{ api-version }}'
;

INSERT examples

Creates a new live event.

INSERT INTO azure.media_services.live_events (
data__properties,
data__tags,
data__location,
subscriptionId,
resourceGroupName,
accountName,
liveEventName,
api-version,
autoStart
)
SELECT
'{{ properties }}',
'{{ tags }}',
'{{ location }}',
'{{ subscriptionId }}',
'{{ resourceGroupName }}',
'{{ accountName }}',
'{{ liveEventName }}',
'{{ api-version }}',
'{{ autoStart }}'
RETURNING
location,
properties,
systemData,
tags
;

UPDATE examples

Updates settings on an existing live event.

UPDATE azure.media_services.live_events
SET
data__properties = '{{ properties }}',
data__tags = '{{ tags }}',
data__location = '{{ location }}'
WHERE
subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND accountName = '{{ accountName }}' --required
AND liveEventName = '{{ liveEventName }}' --required
AND api-version = '{{ api-version}}'
RETURNING
location,
properties,
systemData,
tags;

DELETE examples

Deletes a live event.

DELETE FROM azure.media_services.live_events
WHERE subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND accountName = '{{ accountName }}' --required
AND liveEventName = '{{ liveEventName }}' --required
AND api-version = '{{ api-version }}'
;

Lifecycle Methods

A live event is in StandBy state after allocation completes, and is ready to start.

EXEC azure.media_services.live_events.allocate 
@subscriptionId='{{ subscriptionId }}' --required,
@resourceGroupName='{{ resourceGroupName }}' --required,
@accountName='{{ accountName }}' --required,
@liveEventName='{{ liveEventName }}' --required,
@api-version='{{ api-version }}'
;