Account Filters - Create Or Update

Create or update an Account Filter
Creates or updates an Account Filter in the Media Services account.

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/accountFilters/{filterName}?api-version=2022-08-01

URI Parameters

Name In Required Type Description
accountName
path True

string

The Media Services account name.

filterName
path True

string

The Account Filter name

resourceGroupName
path True

string

The name of the resource group within the Azure subscription.

subscriptionId
path True

string

The unique identifier for a Microsoft Azure subscription.

api-version
query True

string

The version of the API to be used with the client request.

Request Body

Name Type Description
properties.firstQuality

FirstQuality

The first quality.

properties.presentationTimeRange

PresentationTimeRange

The presentation time range.

properties.tracks

FilterTrackSelection[]

The tracks selection conditions.

Responses

Name Type Description
200 OK

AccountFilter

OK

201 Created

AccountFilter

Created

Other Status Codes

ErrorResponse

Detailed error information.

Examples

Create an Account Filter

Sample Request

PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.Media/mediaServices/contosomedia/accountFilters/newAccountFilter?api-version=2022-08-01

{
  "properties": {
    "presentationTimeRange": {
      "startTimestamp": 0,
      "endTimestamp": 170000000,
      "presentationWindowDuration": 9223372036854774806,
      "liveBackoffDuration": 0,
      "timescale": 10000000,
      "forceEndTimestamp": false
    },
    "firstQuality": {
      "bitrate": 128000
    },
    "tracks": [
      {
        "trackSelections": [
          {
            "property": "Type",
            "operation": "Equal",
            "value": "Audio"
          },
          {
            "property": "Language",
            "operation": "NotEqual",
            "value": "en"
          },
          {
            "property": "FourCC",
            "operation": "NotEqual",
            "value": "EC-3"
          }
        ]
      },
      {
        "trackSelections": [
          {
            "property": "Type",
            "operation": "Equal",
            "value": "Video"
          },
          {
            "property": "Bitrate",
            "operation": "Equal",
            "value": "3000000-5000000"
          }
        ]
      }
    ]
  }
}

Sample Response

{
  "name": "newAccountFilter",
  "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.Media/mediaservices/contosomedia/accountFilters/newAccountFilter",
  "type": "Microsoft.Media/mediaservices/accountFilters",
  "properties": {
    "presentationTimeRange": {
      "startTimestamp": 0,
      "endTimestamp": 170000000,
      "presentationWindowDuration": 9223372036854774806,
      "liveBackoffDuration": 0,
      "timescale": 10000000,
      "forceEndTimestamp": false
    },
    "firstQuality": {
      "bitrate": 128000
    },
    "tracks": [
      {
        "trackSelections": [
          {
            "property": "Type",
            "value": "Audio",
            "operation": "Equal"
          },
          {
            "property": "Language",
            "value": "en",
            "operation": "NotEqual"
          },
          {
            "property": "FourCC",
            "value": "EC-3",
            "operation": "NotEqual"
          }
        ]
      },
      {
        "trackSelections": [
          {
            "property": "Type",
            "value": "Video",
            "operation": "Equal"
          },
          {
            "property": "Bitrate",
            "value": "3000000-5000000",
            "operation": "Equal"
          }
        ]
      }
    ]
  }
}
{
  "name": "newAccountFilter",
  "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.Media/mediaservices/contosomedia/accountFilters/newAccountFilter",
  "type": "Microsoft.Media/mediaservices/accountFilters",
  "properties": {
    "presentationTimeRange": {
      "startTimestamp": 0,
      "endTimestamp": 170000000,
      "presentationWindowDuration": 9223372036854774806,
      "liveBackoffDuration": 0,
      "timescale": 10000000,
      "forceEndTimestamp": false
    },
    "firstQuality": {
      "bitrate": 128000
    },
    "tracks": [
      {
        "trackSelections": [
          {
            "property": "Type",
            "value": "Audio",
            "operation": "Equal"
          },
          {
            "property": "Language",
            "value": "en",
            "operation": "NotEqual"
          },
          {
            "property": "FourCC",
            "value": "EC-3",
            "operation": "NotEqual"
          }
        ]
      },
      {
        "trackSelections": [
          {
            "property": "Type",
            "value": "Video",
            "operation": "Equal"
          },
          {
            "property": "Bitrate",
            "value": "3000000-5000000",
            "operation": "Equal"
          }
        ]
      }
    ]
  }
}

Definitions

Name Description
AccountFilter

An Account Filter.

createdByType

The type of identity that created the resource.

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

FilterTrackPropertyCompareOperation

The track property condition operation.

FilterTrackPropertyCondition

The class to specify one track property condition.

FilterTrackPropertyType

The track property type.

FilterTrackSelection

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

FirstQuality

Filter First Quality

PresentationTimeRange

The presentation time range, this is asset related and not recommended for Account Filter.

systemData

Metadata pertaining to creation and last modification of the resource.

AccountFilter

An Account Filter.

Name Type 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

properties.firstQuality

FirstQuality

The first quality.

properties.presentationTimeRange

PresentationTimeRange

The presentation time range.

properties.tracks

FilterTrackSelection[]

The tracks selection conditions.

systemData

systemData

The system metadata relating to this resource.

type

string

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

createdByType

The type of identity that created the resource.

Name Type Description
Application

string

Key

string

ManagedIdentity

string

User

string

ErrorAdditionalInfo

The resource management error additional info.

Name Type Description
info

object

The additional info.

type

string

The additional info type.

ErrorDetail

The error detail.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorDetail[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorResponse

Error response

Name Type Description
error

ErrorDetail

The error object.

FilterTrackPropertyCompareOperation

The track property condition operation.

Name Type Description
Equal

string

The equal operation.

NotEqual

string

The not equal operation.

FilterTrackPropertyCondition

The class to specify one track property condition.

Name Type Description
operation

FilterTrackPropertyCompareOperation

The track property condition operation.

property

FilterTrackPropertyType

The track property type.

value

string

The track property value.

FilterTrackPropertyType

The track property type.

Name Type Description
Bitrate

string

The bitrate.

FourCC

string

The fourCC.

Language

string

The language.

Name

string

The name.

Type

string

The type.

Unknown

string

The unknown track property type.

FilterTrackSelection

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

Name Type Description
trackSelections

FilterTrackPropertyCondition[]

The track selections.

FirstQuality

Filter First Quality

Name Type Description
bitrate

integer

The first quality bitrate.

PresentationTimeRange

The presentation time range, this is asset related and not recommended for Account Filter.

Name Type Description
endTimestamp

integer

The absolute end time boundary.

forceEndTimestamp

boolean

The indicator of forcing existing of end time stamp.

liveBackoffDuration

integer

The relative to end right edge.

presentationWindowDuration

integer

The relative to end sliding window.

startTimestamp

integer

The absolute start time boundary.

timescale

integer

The time scale of time stamps.

systemData

Metadata pertaining to creation and last modification of the resource.

Name Type Description
createdAt

string

The timestamp of resource creation (UTC).

createdBy

string

The identity that created the resource.

createdByType

createdByType

The type of identity that created the resource.

lastModifiedAt

string

The timestamp of resource last modification (UTC)

lastModifiedBy

string

The identity that last modified the resource.

lastModifiedByType

createdByType

The type of identity that last modified the resource.