azurermMediaServicesAccountFilter
Manages a Media Services Account Filter.
Example Usage
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as azurerm from "./.gen/providers/azurerm";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: azurerm.
For a more precise conversion please use the --provider flag in convert.*/
new azurerm.mediaAssetFilter.MediaAssetFilter(this, "example", {
first_quality_bitrate: 128000,
media_services_account_name: "${azurerm_media_services_account.test.name}",
name: "Filter1",
presentation_time_range: [
{
end_in_units: 15,
force_end: false,
live_backoff_in_units: 0,
presentation_window_in_units: 90,
start_in_units: 0,
unit_timescale_in_milliseconds: 1000,
},
],
resource_group_name: "${azurerm_resource_group.test.name}",
track_selection: [
{
condition: [
{
operation: "Equal",
property: "Type",
value: "Audio",
},
{
operation: "NotEqual",
property: "Language",
value: "en",
},
{
operation: "NotEqual",
property: "FourCC",
value: "EC-3",
},
],
},
{
condition: [
{
operation: "Equal",
property: "Type",
value: "Video",
},
{
operation: "Equal",
property: "Bitrate",
value: "3000000-5000000",
},
],
},
],
});
const azurermResourceGroupExample = new azurerm.resourceGroup.ResourceGroup(
this,
"example_1",
{
location: "West Europe",
name: "media-resources",
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermResourceGroupExample.overrideLogicalId("example");
const azurermStorageAccountExample = new azurerm.storageAccount.StorageAccount(
this,
"example_2",
{
account_replication_type: "GRS",
account_tier: "Standard",
location: azurermResourceGroupExample.location,
name: "examplestoracc",
resource_group_name: azurermResourceGroupExample.name,
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermStorageAccountExample.overrideLogicalId("example");
const azurermMediaServicesAccountExample =
new azurerm.mediaServicesAccount.MediaServicesAccount(this, "example_3", {
location: azurermResourceGroupExample.location,
name: "examplemediaacc",
resource_group_name: azurermResourceGroupExample.name,
storage_account: [
{
id: azurermStorageAccountExample.id,
is_primary: true,
},
],
});
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermMediaServicesAccountExample.overrideLogicalId("example");
Arguments Reference
The following arguments are supported:
-
name
- (Required) The name which should be used for this Account Filter. Changing this forces a new Account Filter to be created. -
resourceGroupName
- (Required) The name of the Resource Group where the Account Filter should exist. Changing this forces a new Account Filter to be created. -
mediaServicesAccountName
- (Required) The Media Services account name. Changing this forces a new Account Filter to be created.
-
firstQualityBitrate
- (Optional) The first quality bitrate. Sets the first video track to appear in the Live Streaming playlist to allow HLS native players to start downloading from this quality level at the beginning. -
presentationTimeRange
- (Optional) ApresentationTimeRange
block as defined below. -
trackSelection
- (Optional) One or moretrackSelection
blocks as defined below.
A presentationTimeRange
block supports the following:
-
unitTimescaleInMilliseconds
- (Required) Specified as the number of milliseconds in one unit timescale. For example, if you want to set astartInUnits
at 30 seconds, you would use a value of 30 when using theunitTimescaleInMilliseconds
in 1000. Or if you want to setstartInUnits
in 30 milliseconds, you would use a value of 30 when using theunitTimescaleInMilliseconds
in 1. Applies timescale tostartInUnits
,startTimescale
andpresentationWindowInTimescale
andliveBackoffInTimescale
. -
endInUnits
- (Optional) The absolute end time boundary. Applies to Video on Demand (VoD). For the Live Streaming presentation, it is silently ignored and applied when the presentation ends and the stream becomes VoD. This is a long value that represents an absolute end point of the presentation, rounded to the closest next GOP start. The unit is defined byunitTimescaleInMilliseconds
, so anendInUnits
of 180 would be for 3 minutes. UsestartInUnits
andendInUnits
to trim the fragments that will be in the playlist (manifest). For example,startInUnits
set to 20 andendInUnits
set to 60 usingunitTimescaleInMilliseconds
in 1000 will generate a playlist that contains fragments from between 20 seconds and 60 seconds of the VoD presentation. If a fragment straddles the boundary, the entire fragment will be included in the manifest. -
forceEnd
- (Optional) Indicates whether theendInUnits
property must be present. If true,endInUnits
must be specified or a bad request code is returned. Applies to Live Streaming only. Allowed values:false
,true
. -
liveBackoffInUnits
- (Optional) The relative to end right edge. Applies to Live Streaming only. This value defines the latest live position that a client can seek to. Using this property, you can delay live playback position and create a server-side buffer for players. The unit is defined byunitTimescaleInMilliseconds
. The maximum live back off duration is 300 seconds. For example, a value of 20 means that the latest available content is 20 seconds delayed from the real live edge. -
presentationWindowInUnits
- (Optional) The relative to end sliding window. Applies to Live Streaming only. UsepresentationWindowInUnits
to apply a sliding window of fragments to include in a playlist. The unit is defined byunitTimescaleInMilliseconds
. For example, setpresentationWindowInUnits
to 120 to apply a two-minute sliding window. Media within 2 minutes of the live edge will be included in the playlist. If a fragment straddles the boundary, the entire fragment will be included in the playlist. The minimum presentation window duration is 60 seconds. -
startInUnits
- (Optional) The absolute start time boundary. Applies to Video on Demand (VoD) or Live Streaming. This is a long value that represents an absolute start point of the stream. The value gets rounded to the closest next GOP start. The unit is defined byunitTimescaleInMilliseconds
, so astartInUnits
of 15 would be for 15 seconds. UsestartInUnits
andendInUnits
to trim the fragments that will be in the playlist (manifest). For example,startInUnits
set to 20 andendInUnits
set to 60 usingunitTimescaleInMilliseconds
in 1000 will generate a playlist that contains fragments from between 20 seconds and 60 seconds of the VoD presentation. If a fragment straddles the boundary, the entire fragment will be included in the manifest.
A selection
block supports the following:
-
operation
- (Required) The condition operation to test a track property against. Supported values areequal
andnotEqual
. -
property
- (Required) The track property to compare. Supported values arebitrate
,fourCc
,language
,name
andtype
. Check documentation for more details. -
value
- (Required) The track property value to match or not match.
A trackSelection
block supports the following:
condition
- (Required) One or moreselection
blocks as defined above.
Attributes Reference
In addition to the Arguments listed above - the following Attributes are exported:
id
- The ID of the Account Filter.
Timeouts
The timeouts
block allows you to specify timeouts for certain actions:
create
- (Defaults to 30 minutes) Used when creating the Account Filter.read
- (Defaults to 5 minutes) Used when retrieving the Account Filter.update
- (Defaults to 30 minutes) Used when updating the Account Filter.delete
- (Defaults to 30 minutes) Used when deleting the Account Filter.
Import
Account Filters can be imported using the resourceId
, e.g.