Skip to main content

live_events

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

Overview

Namelive_events
TypeResource
Idazure_extras.media.live_events

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
createdstring (date-time)The creation time for the live event.
crossSiteAccessPoliciesobjectLive event cross site access policies.
descriptionstringA description for the live event.
encodingobjectEncoding 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.
hostnamePrefixstringWhen 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.
inputobjectLive event input settings. It defines how the live event receives input from a contribution encoder.
lastModifiedstring (date-time)The last modified time of the live event.
locationstringThe geo-location where the resource lives. Required.
previewobjectLive event preview settings. Preview allows live event producers to preview the live streaming content without creating any live output.
provisioningStatestringThe provisioning state of the live event.
resourceStatestringThe resource state of the live event. See https://go.microsoft.com/fwlink/?linkid=2139012 for more information. Known values are: "Stopped", "Allocating", "StandBy", "Starting", "Running", "Stopping", and "Deleting".
streamOptionsarrayThe 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'.
systemDataobjectThe system metadata relating to this resource.
tagsobjectResource tags.
transcriptionsarrayLive transcription settings for the live event. See https://go.microsoft.com/fwlink/?linkid=2133742 for more information about the live transcription feature.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
useStaticHostnamebooleanSpecifies 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.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, account_name, live_event_name, subscription_idGet Live Event. Gets properties of a live event.
listselectresource_group_name, account_name, subscription_idList live events. Lists all the live events in the account.
createinsertresource_group_name, account_name, live_event_name, subscription_id, locationautoStartCreate Live Event. Creates a new live event.
updateupdateresource_group_name, account_name, live_event_name, subscription_id, locationUpdates settings on an existing live event.
deletedeleteresource_group_name, account_name, live_event_name, subscription_idDelete Live Event. Deletes a live event.
allocateexecresource_group_name, account_name, live_event_name, subscription_idAllocate resources for a live event. A live event is in StandBy state after allocation completes, and is ready to start.
startexecresource_group_name, account_name, live_event_name, subscription_idStart Live Event. A live event in Stopped or StandBy state will be in Running state after the start operation completes.
stopexecresource_group_name, account_name, live_event_name, subscription_idStop Live Event. Stops a running live event.
resetexecresource_group_name, account_name, live_event_name, subscription_idReset Live Event. 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.
async_operationexecresource_group_name, account_name, operation_id, subscription_idGet operation status. Get a live event operation status.
operation_locationexecresource_group_name, account_name, live_event_name, operation_id, subscription_idGet operation status. Get 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
account_namestringThe Media Services account name. Required.
live_event_namestringThe name of the live event, maximum length is 32. Required.
operation_idstringThe ID of an ongoing async operation. Required.
resource_group_namestringThe name of the resource group within the Azure subscription. Required.
subscription_idstring
autoStartbooleanThe flag indicates if the resource should be automatically started on creation. Default value is None.

SELECT examples

Get Live Event. Gets properties of a live event.

SELECT
id,
name,
created,
crossSiteAccessPolicies,
description,
encoding,
hostnamePrefix,
input,
lastModified,
location,
preview,
provisioningState,
resourceState,
streamOptions,
systemData,
tags,
transcriptions,
type,
useStaticHostname
FROM azure_extras.media.live_events
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND account_name = '{{ account_name }}' -- required
AND live_event_name = '{{ live_event_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Create Live Event. Creates a new live event.

INSERT INTO azure_extras.media.live_events (
tags,
location,
properties,
resource_group_name,
account_name,
live_event_name,
subscription_id,
autoStart
)
SELECT
'{{ tags }}',
'{{ location }}' /* required */,
'{{ properties }}',
'{{ resource_group_name }}',
'{{ account_name }}',
'{{ live_event_name }}',
'{{ subscription_id }}',
'{{ autoStart }}'
RETURNING
id,
name,
location,
properties,
systemData,
tags,
type
;

UPDATE examples

Updates settings on an existing live event.

UPDATE azure_extras.media.live_events
SET
tags = '{{ tags }}',
location = '{{ location }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND account_name = '{{ account_name }}' --required
AND live_event_name = '{{ live_event_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND location = '{{ location }}' --required
RETURNING
id,
name,
location,
properties,
systemData,
tags,
type;

DELETE examples

Delete Live Event. Deletes a live event.

DELETE FROM azure_extras.media.live_events
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND account_name = '{{ account_name }}' --required
AND live_event_name = '{{ live_event_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;

Lifecycle Methods

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

EXEC azure_extras.media.live_events.allocate 
@resource_group_name='{{ resource_group_name }}' --required,
@account_name='{{ account_name }}' --required,
@live_event_name='{{ live_event_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;