live_events
Creates, updates, deletes, gets or lists a live_events resource.
Overview
| Name | live_events |
| Type | Resource |
| Id | azure_extras.media.live_events |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
created | string (date-time) | The creation time for the live event. |
crossSiteAccessPolicies | object | Live event cross site access policies. |
description | string | A description for the live event. |
encoding | object | 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. |
hostnamePrefix | string | 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. |
input | object | Live event input settings. It defines how the live event receives input from a contribution encoder. |
lastModified | string (date-time) | The last modified time of the live event. |
location | string | The geo-location where the resource lives. Required. |
preview | object | Live event preview settings. Preview allows live event producers to preview the live streaming content without creating any live output. |
provisioningState | string | The provisioning state of the live event. |
resourceState | string | The 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". |
streamOptions | array | 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'. |
systemData | object | The system metadata relating to this resource. |
tags | object | Resource tags. |
transcriptions | array | Live transcription settings for the live event. See https://go.microsoft.com/fwlink/?linkid=2133742 for more information about the live transcription feature. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
useStaticHostname | boolean | 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. |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
created | string (date-time) | The creation time for the live event. |
crossSiteAccessPolicies | object | Live event cross site access policies. |
description | string | A description for the live event. |
encoding | object | 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. |
hostnamePrefix | string | 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. |
input | object | Live event input settings. It defines how the live event receives input from a contribution encoder. |
lastModified | string (date-time) | The last modified time of the live event. |
location | string | The geo-location where the resource lives. Required. |
preview | object | Live event preview settings. Preview allows live event producers to preview the live streaming content without creating any live output. |
provisioningState | string | The provisioning state of the live event. |
resourceState | string | The 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". |
streamOptions | array | 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'. |
systemData | object | The system metadata relating to this resource. |
tags | object | Resource tags. |
transcriptions | array | Live transcription settings for the live event. See https://go.microsoft.com/fwlink/?linkid=2133742 for more information about the live transcription feature. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
useStaticHostname | boolean | 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. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, account_name, live_event_name, subscription_id | Get Live Event. Gets properties of a live event. | |
list | select | resource_group_name, account_name, subscription_id | List live events. Lists all the live events in the account. | |
create | insert | resource_group_name, account_name, live_event_name, subscription_id, location | autoStart | Create Live Event. Creates a new live event. |
update | update | resource_group_name, account_name, live_event_name, subscription_id, location | Updates settings on an existing live event. | |
delete | delete | resource_group_name, account_name, live_event_name, subscription_id | Delete Live Event. Deletes a live event. | |
allocate | exec | resource_group_name, account_name, live_event_name, subscription_id | Allocate resources for a live event. A live event is in StandBy state after allocation completes, and is ready to start. | |
start | exec | resource_group_name, account_name, live_event_name, subscription_id | Start Live Event. A live event in Stopped or StandBy state will be in Running state after the start operation completes. | |
stop | exec | resource_group_name, account_name, live_event_name, subscription_id | Stop Live Event. Stops a running live event. | |
reset | exec | resource_group_name, account_name, live_event_name, subscription_id | Reset 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_operation | exec | resource_group_name, account_name, operation_id, subscription_id | Get operation status. Get a live event operation status. | |
operation_location | exec | resource_group_name, account_name, live_event_name, operation_id, subscription_id | Get 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.
| Name | Datatype | Description |
|---|---|---|
account_name | string | The Media Services account name. Required. |
live_event_name | string | The name of the live event, maximum length is 32. Required. |
operation_id | string | The ID of an ongoing async operation. Required. |
resource_group_name | string | The name of the resource group within the Azure subscription. Required. |
subscription_id | string | |
autoStart | boolean | The flag indicates if the resource should be automatically started on creation. Default value is None. |
SELECT examples
- get
- list
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
;
List live events. Lists all the live events in the account.
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 subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: live_events
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the live_events resource.
- name: account_name
value: "{{ account_name }}"
description: Required parameter for the live_events resource.
- name: live_event_name
value: "{{ live_event_name }}"
description: Required parameter for the live_events resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the live_events resource.
- name: tags
value: "{{ tags }}"
description: |
Resource tags.
- name: location
value: "{{ location }}"
description: |
The geo-location where the resource lives. Required.
- name: properties
value:
description: "{{ description }}"
input:
streamingProtocol: "{{ streamingProtocol }}"
accessControl:
ip:
allow:
- name: "{{ name }}"
address: "{{ address }}"
subnetPrefixLength: {{ subnetPrefixLength }}
keyFrameIntervalDuration: "{{ keyFrameIntervalDuration }}"
accessToken: "{{ accessToken }}"
endpoints:
- protocol: "{{ protocol }}"
url: "{{ url }}"
preview:
endpoints:
- protocol: "{{ protocol }}"
url: "{{ url }}"
accessControl:
ip:
allow:
- name: "{{ name }}"
address: "{{ address }}"
subnetPrefixLength: {{ subnetPrefixLength }}
previewLocator: "{{ previewLocator }}"
streamingPolicyName: "{{ streamingPolicyName }}"
alternativeMediaId: "{{ alternativeMediaId }}"
encoding:
encodingType: "{{ encodingType }}"
presetName: "{{ presetName }}"
stretchMode: "{{ stretchMode }}"
keyFrameInterval: "{{ keyFrameInterval }}"
transcriptions:
- language: "{{ language }}"
inputTrackSelection: "{{ inputTrackSelection }}"
outputTranscriptionTrack:
trackName: "{{ trackName }}"
crossSiteAccessPolicies:
clientAccessPolicy: "{{ clientAccessPolicy }}"
crossDomainPolicy: "{{ crossDomainPolicy }}"
useStaticHostname: {{ useStaticHostname }}
hostnamePrefix: "{{ hostnamePrefix }}"
streamOptions:
- "{{ streamOptions }}"
- name: autoStart
value: {{ autoStart }}
description: The flag indicates if the resource should be automatically started on creation. Default value is None.
description: The flag indicates if the resource should be automatically started on creation. Default value is None.
UPDATE examples
- update
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
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
- start
- stop
- reset
- async_operation
- operation_location
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
;
Start Live Event. A live event in Stopped or StandBy state will be in Running state after the start operation completes.
EXEC azure_extras.media.live_events.start
@resource_group_name='{{ resource_group_name }}' --required,
@account_name='{{ account_name }}' --required,
@live_event_name='{{ live_event_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;
Stop Live Event. Stops a running live event.
EXEC azure_extras.media.live_events.stop
@resource_group_name='{{ resource_group_name }}' --required,
@account_name='{{ account_name }}' --required,
@live_event_name='{{ live_event_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"removeOutputsOnStop": {{ removeOutputsOnStop }}
}'
;
Reset 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.
EXEC azure_extras.media.live_events.reset
@resource_group_name='{{ resource_group_name }}' --required,
@account_name='{{ account_name }}' --required,
@live_event_name='{{ live_event_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;
Get operation status. Get a live event operation status.
EXEC azure_extras.media.live_events.async_operation
@resource_group_name='{{ resource_group_name }}' --required,
@account_name='{{ account_name }}' --required,
@operation_id='{{ operation_id }}' --required,
@subscription_id='{{ subscription_id }}' --required
;
Get operation status. Get a live event operation status.
EXEC azure_extras.media.live_events.operation_location
@resource_group_name='{{ resource_group_name }}' --required,
@account_name='{{ account_name }}' --required,
@live_event_name='{{ live_event_name }}' --required,
@operation_id='{{ operation_id }}' --required,
@subscription_id='{{ subscription_id }}' --required
;