Skip to content

Commit

Permalink
[AMS] update AMS stable version to include Edge list api (#9492)
Browse files Browse the repository at this point in the history
* [AMS] update AMS stable version to include Edge list api

* fix an example

* fix better descriptions.

* more descriptive description
  • Loading branch information
giakas authored May 22, 2020
1 parent 4a63e1a commit 4896021
Show file tree
Hide file tree
Showing 2 changed files with 135 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,61 @@
},
"type": "object"
},
"ListEdgePoliciesInput": {
"properties": {
"deviceId": {
"type": "string",
"description": "Unique identifier of the edge device."
}
},
"type": "object"
},
"EdgeUsageDataEventHub": {
"properties": {
"name": {
"type": "string",
"description": "Name of the Event Hub where usage will be reported."
},
"namespace": {
"type": "string",
"description": "Namespace of the Event Hub where usage will be reported."
},
"token": {
"type": "string",
"description": "SAS token needed to interact with Event Hub."
}
},
"type": "object"
},
"EdgeUsageDataCollectionPolicy": {
"properties": {
"dataCollectionFrequency": {
"type": "string",
"description": "Usage data collection frequency in ISO 8601 duration format e.g. PT10M , PT5H."
},
"dataReportingFrequency": {
"type": "string",
"description": "Usage data reporting frequency in ISO 8601 duration format e.g. PT10M , PT5H."
},
"maxAllowedUnreportedUsageDuration": {
"type": "string",
"description": "Maximum time for which the functionality of the device will not be hampered for not reporting the usage data."
},
"eventHubDetails": {
"$ref": "#/definitions/EdgeUsageDataEventHub",
"description": "Details of Event Hub where the usage will be reported."
}
},
"type": "object"
},
"EdgePolicies": {
"properties": {
"usageDataCollectionPolicy": {
"$ref": "#/definitions/EdgeUsageDataCollectionPolicy"
}
},
"type": "object"
},
"SubscriptionMediaService": {
"description": "A Media Services account.",
"allOf": [
Expand Down Expand Up @@ -767,6 +822,59 @@
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/listEdgePolicies": {
"post": {
"summary": "List the media edge policies associated with the Media Services account.",
"description": "List the media edge policies associated with the Media Services account.",
"operationId": "Mediaservices_ListEdgePolicies",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/EdgePolicies"
}
},
"default": {
"description": "Detailed error information.",
"schema": {
"$ref": "#/definitions/ApiError"
}
}
},
"parameters": [
{
"$ref": "#/parameters/SubscriptionId"
},
{
"$ref": "#/parameters/ResourceGroupName"
},
{
"name": "accountName",
"in": "path",
"required": true,
"type": "string",
"description": "The Media Services account name."
},
{
"name": "parameters",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/ListEdgePoliciesInput"
},
"description": "The request parameters"
},
{
"$ref": "#/parameters/ApiVersion"
}
],
"x-ms-examples": {
"List the media edge policies.": {
"$ref": "examples/accounts-list-media-edge-policies.json"
}
}
}
},
"/subscriptions/{subscriptionId}/providers/Microsoft.Media/locations/{locationName}/checkNameAvailability": {
"post": {
"summary": "Check Name Availability",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"parameters": {
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"resourceGroupName": "contoso",
"accountName": "contososports",
"api-version": "2018-07-01",
"parameters": {
"deviceId": "contosiothubhost_contosoiotdevice"
}
},
"responses": {
"200": {
"body": {
"usageDataCollectionPolicy": {
"dataCollectionFrequency": "PT10M",
"dataReportingFrequency": "PT1H",
"maxAllowedUnreportedUsageDuration": "PT36H",
"eventHubDetails": {
"name": "ams-x",
"namespace": "ams-y-1-1",
"token": "SharedAccessSignature sr=sb%3a%2f%2fams-x.servicebus.windows.net%2fams-y-1-1%2fPublishers%2f96a510a1-0565-492a-a67f-83d1aed1d1f6_SampleDeviceId&sig=signature_value%3d&se=1584073736&skn=EdgeUsageData"
}
}
}
}
}
}

0 comments on commit 4896021

Please sign in to comment.