Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sdk/mediaservices/arm-mediaservices/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2019 Microsoft
Copyright (c) 2020 Microsoft

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion sdk/mediaservices/arm-mediaservices/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@azure/arm-mediaservices",
"author": "Microsoft Corporation",
"description": "AzureMediaServices Library with typescript type definitions for node.js and browser.",
"version": "7.1.0",
"version": "7.2.0",
"dependencies": {
"@azure/ms-rest-azure-js": "^2.0.1",
"@azure/ms-rest-js": "^2.0.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import * as msRest from "@azure/ms-rest-js";
import * as msRestAzure from "@azure/ms-rest-azure-js";

const packageName = "@azure/arm-mediaservices";
const packageVersion = "7.1.0";
const packageVersion = "7.2.0";

export class AzureMediaServicesContext extends msRestAzure.AzureServiceClient {
credentials: msRest.ServiceClientCredentials;
Expand All @@ -37,7 +37,7 @@ export class AzureMediaServicesContext extends msRestAzure.AzureServiceClient {
if (!options) {
options = {};
}
if(!options.userAgent) {
if (!options.userAgent) {
const defaultUserAgent = msRestAzure.getDefaultUserAgentValue();
options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`;
}
Expand All @@ -52,10 +52,10 @@ export class AzureMediaServicesContext extends msRestAzure.AzureServiceClient {
this.credentials = credentials;
this.subscriptionId = subscriptionId;

if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) {
if (options.acceptLanguage !== null && options.acceptLanguage !== undefined) {
this.acceptLanguage = options.acceptLanguage;
}
if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) {
if (options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) {
this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout;
}
}
Expand Down
78 changes: 78 additions & 0 deletions sdk/mediaservices/arm-mediaservices/src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,64 @@ export interface MediaService extends TrackedResource {
storageAccounts?: StorageAccount[];
}

/**
* An interface representing ListEdgePoliciesInput.
*/
export interface ListEdgePoliciesInput {
/**
* Unique identifier of the edge device.
*/
deviceId?: string;
}

/**
* An interface representing EdgeUsageDataEventHub.
*/
export interface EdgeUsageDataEventHub {
/**
* Name of the Event Hub where usage will be reported.
*/
name?: string;
/**
* Namespace of the Event Hub where usage will be reported.
*/
namespace?: string;
/**
* SAS token needed to interact with Event Hub.
*/
token?: string;
}

/**
* An interface representing EdgeUsageDataCollectionPolicy.
*/
export interface EdgeUsageDataCollectionPolicy {
/**
* Usage data collection frequency in ISO 8601 duration format e.g. PT10M , PT5H.
*/
dataCollectionFrequency?: string;
/**
* Usage data reporting frequency in ISO 8601 duration format e.g. PT10M , PT5H.
*/
dataReportingFrequency?: string;
/**
* Maximum time for which the functionality of the device will not be hampered for not reporting
* the usage data.
*/
maxAllowedUnreportedUsageDuration?: string;
/**
* Details of Event Hub where the usage will be reported.
*/
eventHubDetails?: EdgeUsageDataEventHub;
}

/**
* An interface representing EdgePolicies.
*/
export interface EdgePolicies {
usageDataCollectionPolicy?: EdgeUsageDataCollectionPolicy;
}

/**
* A Media Services account.
*/
Expand Down Expand Up @@ -4400,6 +4458,26 @@ export type MediaservicesUpdateResponse = MediaService & {
};
};

/**
* Contains response data for the listEdgePolicies operation.
*/
export type MediaservicesListEdgePoliciesResponse = EdgePolicies & {
/**
* The underlying HTTP response.
*/
_response: msRest.HttpResponse & {
/**
* The response body as text (string format)
*/
bodyAsText: string;

/**
* The response body as parsed JSON or XML
*/
parsedBody: EdgePolicies;
};
};

/**
* Contains response data for the listBySubscription operation.
*/
Expand Down
96 changes: 96 additions & 0 deletions sdk/mediaservices/arm-mediaservices/src/models/mappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,102 @@ export const MediaService: msRest.CompositeMapper = {
}
};

export const ListEdgePoliciesInput: msRest.CompositeMapper = {
serializedName: "ListEdgePoliciesInput",
type: {
name: "Composite",
className: "ListEdgePoliciesInput",
modelProperties: {
deviceId: {
serializedName: "deviceId",
type: {
name: "String"
}
}
}
}
};

export const EdgeUsageDataEventHub: msRest.CompositeMapper = {
serializedName: "EdgeUsageDataEventHub",
type: {
name: "Composite",
className: "EdgeUsageDataEventHub",
modelProperties: {
name: {
serializedName: "name",
type: {
name: "String"
}
},
namespace: {
serializedName: "namespace",
type: {
name: "String"
}
},
token: {
serializedName: "token",
type: {
name: "String"
}
}
}
}
};

export const EdgeUsageDataCollectionPolicy: msRest.CompositeMapper = {
serializedName: "EdgeUsageDataCollectionPolicy",
type: {
name: "Composite",
className: "EdgeUsageDataCollectionPolicy",
modelProperties: {
dataCollectionFrequency: {
serializedName: "dataCollectionFrequency",
type: {
name: "String"
}
},
dataReportingFrequency: {
serializedName: "dataReportingFrequency",
type: {
name: "String"
}
},
maxAllowedUnreportedUsageDuration: {
serializedName: "maxAllowedUnreportedUsageDuration",
type: {
name: "String"
}
},
eventHubDetails: {
serializedName: "eventHubDetails",
type: {
name: "Composite",
className: "EdgeUsageDataEventHub"
}
}
}
}
};

export const EdgePolicies: msRest.CompositeMapper = {
serializedName: "EdgePolicies",
type: {
name: "Composite",
className: "EdgePolicies",
modelProperties: {
usageDataCollectionPolicy: {
serializedName: "usageDataCollectionPolicy",
type: {
name: "Composite",
className: "EdgeUsageDataCollectionPolicy"
}
}
}
}
};

export const SubscriptionMediaService: msRest.CompositeMapper = {
serializedName: "SubscriptionMediaService",
type: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ export {
CrossSiteAccessPolicies,
DefaultKey,
Deinterlace,
EdgePolicies,
EdgeUsageDataCollectionPolicy,
EdgeUsageDataEventHub,
EnabledProtocols,
EnvelopeEncryption,
FaceDetectorPreset,
Expand Down Expand Up @@ -85,6 +88,7 @@ export {
JpgImage,
JpgLayer,
Layer,
ListEdgePoliciesInput,
LiveEvent,
LiveEventEncoding,
LiveEventEndpoint,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,43 @@ export class Mediaservices {
callback);
}

/**
* List the media edge policies associated with the Media Services account.
* @summary List the media edge policies associated with the Media Services account.
* @param resourceGroupName The name of the resource group within the Azure subscription.
* @param accountName The Media Services account name.
* @param parameters The request parameters
* @param [options] The optional parameters
* @returns Promise<Models.MediaservicesListEdgePoliciesResponse>
*/
listEdgePolicies(resourceGroupName: string, accountName: string, parameters: Models.ListEdgePoliciesInput, options?: msRest.RequestOptionsBase): Promise<Models.MediaservicesListEdgePoliciesResponse>;
/**
* @param resourceGroupName The name of the resource group within the Azure subscription.
* @param accountName The Media Services account name.
* @param parameters The request parameters
* @param callback The callback
*/
listEdgePolicies(resourceGroupName: string, accountName: string, parameters: Models.ListEdgePoliciesInput, callback: msRest.ServiceCallback<Models.EdgePolicies>): void;
/**
* @param resourceGroupName The name of the resource group within the Azure subscription.
* @param accountName The Media Services account name.
* @param parameters The request parameters
* @param options The optional parameters
* @param callback The callback
*/
listEdgePolicies(resourceGroupName: string, accountName: string, parameters: Models.ListEdgePoliciesInput, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.EdgePolicies>): void;
listEdgePolicies(resourceGroupName: string, accountName: string, parameters: Models.ListEdgePoliciesInput, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.EdgePolicies>, callback?: msRest.ServiceCallback<Models.EdgePolicies>): Promise<Models.MediaservicesListEdgePoliciesResponse> {
return this.client.sendOperationRequest(
{
resourceGroupName,
accountName,
parameters,
options
},
listEdgePoliciesOperationSpec,
callback) as Promise<Models.MediaservicesListEdgePoliciesResponse>;
}

/**
* List Media Services accounts in the subscription.
* @summary List Media Services accounts
Expand Down Expand Up @@ -517,6 +554,38 @@ const syncStorageKeysOperationSpec: msRest.OperationSpec = {
serializer
};

const listEdgePoliciesOperationSpec: msRest.OperationSpec = {
httpMethod: "POST",
path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/listEdgePolicies",
urlParameters: [
Parameters.subscriptionId,
Parameters.resourceGroupName,
Parameters.accountName
],
queryParameters: [
Parameters.apiVersion
],
headerParameters: [
Parameters.acceptLanguage
],
requestBody: {
parameterPath: "parameters",
mapper: {
...Mappers.ListEdgePoliciesInput,
required: true
}
},
responses: {
200: {
bodyMapper: Mappers.EdgePolicies
},
default: {
bodyMapper: Mappers.ApiError
}
},
serializer
};

const listBySubscriptionOperationSpec: msRest.OperationSpec = {
httpMethod: "GET",
path: "subscriptions/{subscriptionId}/providers/Microsoft.Media/mediaservices",
Expand Down