diff --git a/sdk/mediaservices/arm-mediaservices/CHANGELOG.md b/sdk/mediaservices/arm-mediaservices/CHANGELOG.md index 03d047782f7f..cf9cfdd17a5d 100644 --- a/sdk/mediaservices/arm-mediaservices/CHANGELOG.md +++ b/sdk/mediaservices/arm-mediaservices/CHANGELOG.md @@ -1,15 +1,39 @@ # Release History + +## 13.0.0 (2022-07-21) + +**Features** -## 12.0.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed + - Added operation LiveEvents.asyncOperation + - Added operation LiveEvents.operationLocation + - Added operation LiveOutputs.asyncOperation + - Added operation LiveOutputs.operationLocation + - Added operation StreamingEndpoints.asyncOperation + - Added operation StreamingEndpoints.operationLocation + - Added Interface AsyncOperationErrorDetail + - Added Interface AsyncOperationResult + - Added Interface LiveEventsAsyncOperationOptionalParams + - Added Interface LiveEventsOperationLocationOptionalParams + - Added Interface LiveOutputsAsyncOperationOptionalParams + - Added Interface LiveOutputsOperationLocationOptionalParams + - Added Interface StreamingEndpointsAsyncOperationOptionalParams + - Added Interface StreamingEndpointsOperationLocationOptionalParams + - Added Type Alias AsyncOperationStatus + - Added Type Alias LiveEventsAsyncOperationResponse + - Added Type Alias LiveEventsOperationLocationResponse + - Added Type Alias LiveOutputsAsyncOperationResponse + - Added Type Alias LiveOutputsOperationLocationResponse + - Added Type Alias StreamingEndpointsAsyncOperationResponse + - Added Type Alias StreamingEndpointsOperationLocationResponse + - Type Alias LiveOutput has a new parameter rewindWindowLength + - Added Enum KnownAsyncOperationStatus -### Other Changes +**Breaking Changes** + - Interface AzureMediaServicesOptionalParams no longer has parameter apiVersion + - Class AzureMediaServices no longer has parameter apiVersion + + ## 12.0.0 (2022-06-24) **Features** diff --git a/sdk/mediaservices/arm-mediaservices/_meta.json b/sdk/mediaservices/arm-mediaservices/_meta.json index 0f0882b1c440..0bc15868801b 100644 --- a/sdk/mediaservices/arm-mediaservices/_meta.json +++ b/sdk/mediaservices/arm-mediaservices/_meta.json @@ -1,8 +1,8 @@ { - "commit": "d8dd0de9c27c21a3802a780fbef2844fcbbb4daa", + "commit": "0ec9d39bde7a7dfde52d7f9d0fce8b4843e598ad", "readme": "specification/mediaservices/resource-manager/readme.md", - "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\mediaservices\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-beta.20", + "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/mediaservices/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.19.20220425.1", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.3.2", - "use": "@autorest/typescript@6.0.0-beta.20" + "release_tool": "@azure-tools/js-sdk-release-tools@2.4.0", + "use": "@autorest/typescript@6.0.0-alpha.19.20220425.1" } \ No newline at end of file diff --git a/sdk/mediaservices/arm-mediaservices/package.json b/sdk/mediaservices/arm-mediaservices/package.json index 452e852fb208..bed46cb2a1c6 100644 --- a/sdk/mediaservices/arm-mediaservices/package.json +++ b/sdk/mediaservices/arm-mediaservices/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for AzureMediaServices.", - "version": "12.0.1", + "version": "13.0.0", "engines": { "node": ">=12.0.0" }, @@ -43,11 +43,8 @@ "@azure-tools/test-recorder": "^2.0.0", "@azure-tools/test-credential": "^1.0.0", "mocha": "^7.1.1", - "@types/chai": "^4.2.8", - "chai": "^4.2.0", "cross-env": "^7.0.2", - "@azure/dev-tool": "^1.0.0", - "@azure/arm-storage": "^17.2.1" + "@azure/dev-tool": "^1.0.0" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/mediaservices/arm-mediaservices", "repository": { @@ -112,4 +109,4 @@ ] }, "autoPublish": true -} +} \ No newline at end of file diff --git a/sdk/mediaservices/arm-mediaservices/review/arm-mediaservices.api.md b/sdk/mediaservices/arm-mediaservices/review/arm-mediaservices.api.md index 97f5f31f5e51..b66bccf0805d 100644 --- a/sdk/mediaservices/arm-mediaservices/review/arm-mediaservices.api.md +++ b/sdk/mediaservices/arm-mediaservices/review/arm-mediaservices.api.md @@ -359,6 +359,23 @@ export interface AssetTrackOperationStatus { status: string; } +// @public +export interface AsyncOperationErrorDetail { + code?: string; + message?: string; + target?: string; +} + +// @public +export interface AsyncOperationResult { + error?: AsyncOperationErrorDetail; + name?: string; + status?: AsyncOperationStatus; +} + +// @public +export type AsyncOperationStatus = string; + // @public export type AttributeFilter = string; @@ -417,8 +434,6 @@ export class AzureMediaServices extends coreClient.ServiceClient { // (undocumented) accountFilters: AccountFilters; // (undocumented) - apiVersion: string; - // (undocumented) assetFilters: AssetFilters; // (undocumented) assets: Assets; @@ -465,7 +480,6 @@ export class AzureMediaServices extends coreClient.ServiceClient { // @public export interface AzureMediaServicesOptionalParams extends coreClient.ServiceClientOptions { $host?: string; - apiVersion?: string; endpoint?: string; } @@ -1357,6 +1371,16 @@ export enum KnownAssetStorageEncryptionFormat { None = "None" } +// @public +export enum KnownAsyncOperationStatus { + // (undocumented) + Failed = "Failed", + // (undocumented) + InProgress = "InProgress", + // (undocumented) + Succeeded = "Succeeded" +} + // @public export enum KnownAttributeFilter { All = "All", @@ -1933,6 +1957,7 @@ export type LiveEventResourceState = string; // @public export interface LiveEvents { + asyncOperation(resourceGroupName: string, accountName: string, operationId: string, options?: LiveEventsAsyncOperationOptionalParams): Promise; beginAllocate(resourceGroupName: string, accountName: string, liveEventName: string, options?: LiveEventsAllocateOptionalParams): Promise, void>>; beginAllocateAndWait(resourceGroupName: string, accountName: string, liveEventName: string, options?: LiveEventsAllocateOptionalParams): Promise; beginCreate(resourceGroupName: string, accountName: string, liveEventName: string, parameters: LiveEvent, options?: LiveEventsCreateOptionalParams): Promise, LiveEventsCreateResponse>>; @@ -1949,6 +1974,7 @@ export interface LiveEvents { beginUpdateAndWait(resourceGroupName: string, accountName: string, liveEventName: string, parameters: LiveEvent, options?: LiveEventsUpdateOptionalParams): Promise; get(resourceGroupName: string, accountName: string, liveEventName: string, options?: LiveEventsGetOptionalParams): Promise; list(resourceGroupName: string, accountName: string, options?: LiveEventsListOptionalParams): PagedAsyncIterableIterator; + operationLocation(resourceGroupName: string, accountName: string, liveEventName: string, operationId: string, options?: LiveEventsOperationLocationOptionalParams): Promise; } // @public @@ -1957,6 +1983,13 @@ export interface LiveEventsAllocateOptionalParams extends coreClient.OperationOp updateIntervalInMs?: number; } +// @public +export interface LiveEventsAsyncOperationOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type LiveEventsAsyncOperationResponse = AsyncOperationResult; + // @public export interface LiveEventsCreateOptionalParams extends coreClient.OperationOptions { autoStart?: boolean; @@ -1994,6 +2027,13 @@ export interface LiveEventsListOptionalParams extends coreClient.OperationOption // @public export type LiveEventsListResponse = LiveEventListResult; +// @public +export interface LiveEventsOperationLocationOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type LiveEventsOperationLocationResponse = LiveEvent; + // @public export interface LiveEventsResetOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -2034,6 +2074,7 @@ export type LiveOutput = ProxyResource & { description?: string; assetName?: string; archiveWindowLength?: string; + rewindWindowLength?: string; manifestName?: string; hls?: Hls; outputSnapTime?: number; @@ -2055,14 +2096,23 @@ export type LiveOutputResourceState = string; // @public export interface LiveOutputs { + asyncOperation(resourceGroupName: string, accountName: string, operationId: string, options?: LiveOutputsAsyncOperationOptionalParams): Promise; beginCreate(resourceGroupName: string, accountName: string, liveEventName: string, liveOutputName: string, parameters: LiveOutput, options?: LiveOutputsCreateOptionalParams): Promise, LiveOutputsCreateResponse>>; beginCreateAndWait(resourceGroupName: string, accountName: string, liveEventName: string, liveOutputName: string, parameters: LiveOutput, options?: LiveOutputsCreateOptionalParams): Promise; beginDelete(resourceGroupName: string, accountName: string, liveEventName: string, liveOutputName: string, options?: LiveOutputsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, accountName: string, liveEventName: string, liveOutputName: string, options?: LiveOutputsDeleteOptionalParams): Promise; get(resourceGroupName: string, accountName: string, liveEventName: string, liveOutputName: string, options?: LiveOutputsGetOptionalParams): Promise; list(resourceGroupName: string, accountName: string, liveEventName: string, options?: LiveOutputsListOptionalParams): PagedAsyncIterableIterator; + operationLocation(resourceGroupName: string, accountName: string, liveEventName: string, liveOutputName: string, operationId: string, options?: LiveOutputsOperationLocationOptionalParams): Promise; } +// @public +export interface LiveOutputsAsyncOperationOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type LiveOutputsAsyncOperationResponse = AsyncOperationResult; + // @public export interface LiveOutputsCreateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -2099,6 +2149,13 @@ export interface LiveOutputsListOptionalParams extends coreClient.OperationOptio // @public export type LiveOutputsListResponse = LiveOutputListResult; +// @public +export interface LiveOutputsOperationLocationOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type LiveOutputsOperationLocationResponse = LiveOutput; + // @public export interface Locations { checkNameAvailability(locationName: string, parameters: CheckNameAvailabilityInput, options?: LocationsCheckNameAvailabilityOptionalParams): Promise; @@ -2450,7 +2507,7 @@ export type PngImage = Image_2 & { }; // @public -export type PngLayer = Layer; +export type PngLayer = Layer & {}; // @public export interface PresentationTimeRange { @@ -2589,7 +2646,7 @@ export interface Properties { export type ProvisioningState = string; // @public -export type ProxyResource = Resource; +export type ProxyResource = Resource & {}; // @public export type PublicNetworkAccess = string; @@ -2720,6 +2777,7 @@ export type StreamingEndpointResourceState = string; // @public export interface StreamingEndpoints { + asyncOperation(resourceGroupName: string, accountName: string, operationId: string, options?: StreamingEndpointsAsyncOperationOptionalParams): Promise; beginCreate(resourceGroupName: string, accountName: string, streamingEndpointName: string, parameters: StreamingEndpoint, options?: StreamingEndpointsCreateOptionalParams): Promise, StreamingEndpointsCreateResponse>>; beginCreateAndWait(resourceGroupName: string, accountName: string, streamingEndpointName: string, parameters: StreamingEndpoint, options?: StreamingEndpointsCreateOptionalParams): Promise; beginDelete(resourceGroupName: string, accountName: string, streamingEndpointName: string, options?: StreamingEndpointsDeleteOptionalParams): Promise, void>>; @@ -2734,9 +2792,17 @@ export interface StreamingEndpoints { beginUpdateAndWait(resourceGroupName: string, accountName: string, streamingEndpointName: string, parameters: StreamingEndpoint, options?: StreamingEndpointsUpdateOptionalParams): Promise; get(resourceGroupName: string, accountName: string, streamingEndpointName: string, options?: StreamingEndpointsGetOptionalParams): Promise; list(resourceGroupName: string, accountName: string, options?: StreamingEndpointsListOptionalParams): PagedAsyncIterableIterator; + operationLocation(resourceGroupName: string, accountName: string, streamingEndpointName: string, operationId: string, options?: StreamingEndpointsOperationLocationOptionalParams): Promise; skus(resourceGroupName: string, accountName: string, streamingEndpointName: string, options?: StreamingEndpointsSkusOptionalParams): Promise; } +// @public +export interface StreamingEndpointsAsyncOperationOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type StreamingEndpointsAsyncOperationResponse = AsyncOperationResult; + // @public export interface StreamingEndpointsCreateOptionalParams extends coreClient.OperationOptions { autoStart?: boolean; @@ -2779,6 +2845,13 @@ export interface StreamingEndpointsListOptionalParams extends coreClient.Operati // @public export type StreamingEndpointsListResponse = StreamingEndpointListResult; +// @public +export interface StreamingEndpointsOperationLocationOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type StreamingEndpointsOperationLocationResponse = StreamingEndpoint; + // @public export interface StreamingEndpointsScaleOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; diff --git a/sdk/mediaservices/arm-mediaservices/src/azureMediaServices.ts b/sdk/mediaservices/arm-mediaservices/src/azureMediaServices.ts index 6f68d9ea8512..8d86745e5235 100644 --- a/sdk/mediaservices/arm-mediaservices/src/azureMediaServices.ts +++ b/sdk/mediaservices/arm-mediaservices/src/azureMediaServices.ts @@ -8,11 +8,6 @@ import * as coreClient from "@azure/core-client"; import * as coreRestPipeline from "@azure/core-rest-pipeline"; -import { - PipelineRequest, - PipelineResponse, - SendRequest -} from "@azure/core-rest-pipeline"; import * as coreAuth from "@azure/core-auth"; import { AccountFiltersImpl, @@ -65,7 +60,6 @@ import { AzureMediaServicesOptionalParams } from "./models"; export class AzureMediaServices extends coreClient.ServiceClient { $host: string; subscriptionId: string; - apiVersion: string; /** * Initializes a new instance of the AzureMediaServices class. @@ -94,7 +88,7 @@ export class AzureMediaServices extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-mediaservices/12.0.1`; + const packageDetails = `azsdk-js-arm-mediaservices/13.0.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -141,7 +135,6 @@ export class AzureMediaServices extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2021-11-01"; this.accountFilters = new AccountFiltersImpl(this); this.operations = new OperationsImpl(this); this.mediaservices = new MediaservicesImpl(this); @@ -167,35 +160,6 @@ export class AzureMediaServices extends coreClient.ServiceClient { this.liveEvents = new LiveEventsImpl(this); this.liveOutputs = new LiveOutputsImpl(this); this.streamingEndpoints = new StreamingEndpointsImpl(this); - this.addCustomApiVersionPolicy(options.apiVersion); - } - - /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */ - private addCustomApiVersionPolicy(apiVersion?: string) { - if (!apiVersion) { - return; - } - const apiVersionPolicy = { - name: "CustomApiVersionPolicy", - async sendRequest( - request: PipelineRequest, - next: SendRequest - ): Promise { - const param = request.url.split("?"); - if (param.length > 1) { - const newParams = param[1].split("&").map((item) => { - if (item.indexOf("api-version") > -1) { - return item.replace(/(?<==).*$/, apiVersion); - } else { - return item; - } - }); - request.url = param[0] + "?" + newParams.join("&"); - } - return next(request); - } - }; - this.pipeline.addPolicy(apiVersionPolicy); } accountFilters: AccountFilters; diff --git a/sdk/mediaservices/arm-mediaservices/src/models/index.ts b/sdk/mediaservices/arm-mediaservices/src/models/index.ts index f024fd3da52d..19b8916438f8 100644 --- a/sdk/mediaservices/arm-mediaservices/src/models/index.ts +++ b/sdk/mediaservices/arm-mediaservices/src/models/index.ts @@ -1248,6 +1248,26 @@ export interface LiveEventActionInput { removeOutputsOnStop?: boolean; } +/** The status of an async operation. */ +export interface AsyncOperationResult { + /** The error object */ + error?: AsyncOperationErrorDetail; + /** Operation Id of the async operation. */ + name?: string; + /** Operation status of the async operation. */ + status?: AsyncOperationStatus; +} + +/** The error detail of an async operation result. */ +export interface AsyncOperationErrorDetail { + /** The error code. */ + code?: string; + /** The error message. */ + message?: string; + /** Id of the entity on which the operation is performed. */ + target?: string; +} + /** The LiveOutput list result. */ export interface LiveOutputListResult { /** The result of the List LiveOutput operation. */ @@ -1603,7 +1623,7 @@ export interface ClipTime { } /** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ -export type ProxyResource = Resource; +export type ProxyResource = Resource & {}; /** The Private Endpoint Connection resource. */ export type PrivateEndpointConnection = Resource & { @@ -1967,7 +1987,7 @@ export type JpgLayer = Layer & { }; /** Describes the settings to produce a PNG image from the input video. */ -export type PngLayer = Layer; +export type PngLayer = Layer & {}; /** A TrackSelection to select audio tracks. */ export type AudioTrackDescriptor = TrackDescriptor & { @@ -2305,6 +2325,8 @@ export type LiveOutput = ProxyResource & { assetName?: string; /** ISO 8601 time between 1 minute to 25 hours to indicate the maximum content length that can be archived in the asset for this live output. This also sets the maximum content length for the rewind window. For example, use PT1H30M to indicate 1 hour and 30 minutes of archive window. */ archiveWindowLength?: string; + /** ISO 8601 time between 1 minute to the duration of archiveWindowLength to control seek-able window length during Live. The service won't use this property once LiveOutput stops. The archived VOD will have full content with original ArchiveWindowLength. For example, use PT1H30M to indicate 1 hour and 30 minutes of rewind window length. Service will use implicit default value 30m only if Live Event enables LL. */ + rewindWindowLength?: string; /** The manifest file name. If not provided, the service will generate one automatically. */ manifestName?: string; /** HTTP Live Streaming (HLS) packing setting for the live output. */ @@ -3435,6 +3457,24 @@ export enum KnownStreamOptionsFlag { */ export type StreamOptionsFlag = string; +/** Known values of {@link AsyncOperationStatus} that the service accepts. */ +export enum KnownAsyncOperationStatus { + Succeeded = "Succeeded", + Failed = "Failed", + InProgress = "InProgress" +} + +/** + * Defines values for AsyncOperationStatus. \ + * {@link KnownAsyncOperationStatus} can be used interchangeably with AsyncOperationStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded** \ + * **Failed** \ + * **InProgress** + */ +export type AsyncOperationStatus = string; + /** Known values of {@link LiveOutputResourceState} that the service accepts. */ export enum KnownLiveOutputResourceState { /** Live output is being created. No content is archived in the asset until the live output is in running state. */ @@ -4863,6 +4903,20 @@ export interface LiveEventsResetOptionalParams resumeFrom?: string; } +/** Optional parameters. */ +export interface LiveEventsAsyncOperationOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the asyncOperation operation. */ +export type LiveEventsAsyncOperationResponse = AsyncOperationResult; + +/** Optional parameters. */ +export interface LiveEventsOperationLocationOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the operationLocation operation. */ +export type LiveEventsOperationLocationResponse = LiveEvent; + /** Optional parameters. */ export interface LiveEventsListNextOptionalParams extends coreClient.OperationOptions {} @@ -4905,6 +4959,20 @@ export interface LiveOutputsDeleteOptionalParams resumeFrom?: string; } +/** Optional parameters. */ +export interface LiveOutputsAsyncOperationOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the asyncOperation operation. */ +export type LiveOutputsAsyncOperationResponse = AsyncOperationResult; + +/** Optional parameters. */ +export interface LiveOutputsOperationLocationOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the operationLocation operation. */ +export type LiveOutputsOperationLocationResponse = LiveOutput; + /** Optional parameters. */ export interface LiveOutputsListNextOptionalParams extends coreClient.OperationOptions {} @@ -4995,6 +5063,20 @@ export interface StreamingEndpointsScaleOptionalParams resumeFrom?: string; } +/** Optional parameters. */ +export interface StreamingEndpointsAsyncOperationOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the asyncOperation operation. */ +export type StreamingEndpointsAsyncOperationResponse = AsyncOperationResult; + +/** Optional parameters. */ +export interface StreamingEndpointsOperationLocationOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the operationLocation operation. */ +export type StreamingEndpointsOperationLocationResponse = StreamingEndpoint; + /** Optional parameters. */ export interface StreamingEndpointsListNextOptionalParams extends coreClient.OperationOptions {} @@ -5007,8 +5089,6 @@ export interface AzureMediaServicesOptionalParams extends coreClient.ServiceClientOptions { /** server parameter */ $host?: string; - /** Api Version */ - apiVersion?: string; /** Overrides client endpoint. */ endpoint?: string; } diff --git a/sdk/mediaservices/arm-mediaservices/src/models/mappers.ts b/sdk/mediaservices/arm-mediaservices/src/models/mappers.ts index a04d29222e82..1bd7b860a534 100644 --- a/sdk/mediaservices/arm-mediaservices/src/models/mappers.ts +++ b/sdk/mediaservices/arm-mediaservices/src/models/mappers.ts @@ -3016,6 +3016,61 @@ export const LiveEventActionInput: coreClient.CompositeMapper = { } }; +export const AsyncOperationResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AsyncOperationResult", + modelProperties: { + error: { + serializedName: "error", + type: { + name: "Composite", + className: "AsyncOperationErrorDetail" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + }, + status: { + serializedName: "status", + type: { + name: "String" + } + } + } + } +}; + +export const AsyncOperationErrorDetail: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AsyncOperationErrorDetail", + modelProperties: { + code: { + serializedName: "code", + type: { + name: "String" + } + }, + message: { + serializedName: "message", + type: { + name: "String" + } + }, + target: { + serializedName: "target", + type: { + name: "String" + } + } + } + } +}; + export const LiveOutputListResult: coreClient.CompositeMapper = { type: { name: "Composite", @@ -5781,6 +5836,12 @@ export const LiveOutput: coreClient.CompositeMapper = { name: "TimeSpan" } }, + rewindWindowLength: { + serializedName: "properties.rewindWindowLength", + type: { + name: "TimeSpan" + } + }, manifestName: { serializedName: "properties.manifestName", type: { diff --git a/sdk/mediaservices/arm-mediaservices/src/models/parameters.ts b/sdk/mediaservices/arm-mediaservices/src/models/parameters.ts index 4e65ba76b313..24153624345f 100644 --- a/sdk/mediaservices/arm-mediaservices/src/models/parameters.ts +++ b/sdk/mediaservices/arm-mediaservices/src/models/parameters.ts @@ -359,6 +359,18 @@ export const parameters15: OperationParameter = { mapper: StreamingLocatorMapper }; +export const apiVersion1: OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + defaultValue: "2022-08-01", + isConstant: true, + serializedName: "api-version", + type: { + name: "String" + } + } +}; + export const liveEventName: OperationURLParameter = { parameterPath: "liveEventName", mapper: { @@ -395,6 +407,20 @@ export const parameters17: OperationParameter = { mapper: LiveEventActionInputMapper }; +export const operationId1: OperationURLParameter = { + parameterPath: "operationId", + mapper: { + constraints: { + MinLength: 1 + }, + serializedName: "operationId", + required: true, + type: { + name: "String" + } + } +}; + export const liveOutputName: OperationURLParameter = { parameterPath: "liveOutputName", mapper: { diff --git a/sdk/mediaservices/arm-mediaservices/src/operations/liveEvents.ts b/sdk/mediaservices/arm-mediaservices/src/operations/liveEvents.ts index 47bfef514b6f..365bcfd9b4b3 100644 --- a/sdk/mediaservices/arm-mediaservices/src/operations/liveEvents.ts +++ b/sdk/mediaservices/arm-mediaservices/src/operations/liveEvents.ts @@ -31,6 +31,10 @@ import { LiveEventActionInput, LiveEventsStopOptionalParams, LiveEventsResetOptionalParams, + LiveEventsAsyncOperationOptionalParams, + LiveEventsAsyncOperationResponse, + LiveEventsOperationLocationOptionalParams, + LiveEventsOperationLocationResponse, LiveEventsListNextResponse } from "../models"; @@ -782,6 +786,46 @@ export class LiveEventsImpl implements LiveEvents { return poller.pollUntilDone(); } + /** + * Get a live event operation status. + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param operationId The ID of an ongoing async operation. + * @param options The options parameters. + */ + asyncOperation( + resourceGroupName: string, + accountName: string, + operationId: string, + options?: LiveEventsAsyncOperationOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, operationId, options }, + asyncOperationOperationSpec + ); + } + + /** + * Get a live event operation status. + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param liveEventName The name of the live event, maximum length is 32. + * @param operationId The ID of an ongoing async operation. + * @param options The options parameters. + */ + operationLocation( + resourceGroupName: string, + accountName: string, + liveEventName: string, + operationId: string, + options?: LiveEventsOperationLocationOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, liveEventName, operationId, options }, + operationLocationOperationSpec + ); + } + /** * ListNext * @param resourceGroupName The name of the resource group within the Azure subscription. @@ -816,7 +860,7 @@ const listOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -838,7 +882,7 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -871,7 +915,7 @@ const createOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.parameters16, - queryParameters: [Parameters.apiVersion, Parameters.autoStart], + queryParameters: [Parameters.apiVersion1, Parameters.autoStart], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -905,7 +949,7 @@ const updateOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.parameters16, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -930,7 +974,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -954,7 +998,7 @@ const allocateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -978,7 +1022,7 @@ const startOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -1003,7 +1047,7 @@ const stopOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.parameters17, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -1028,7 +1072,7 @@ const resetOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -1039,6 +1083,54 @@ const resetOperationSpec: coreClient.OperationSpec = { headerParameters: [Parameters.accept], serializer }; +const asyncOperationOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/liveEventOperations/{operationId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AsyncOperationResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion1], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.operationId1 + ], + headerParameters: [Parameters.accept], + serializer +}; +const operationLocationOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/liveEvents/{liveEventName}/operationLocations/{operationId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.LiveEvent + }, + 202: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion1], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.liveEventName, + Parameters.operationId1 + ], + headerParameters: [Parameters.accept], + serializer +}; const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", @@ -1050,7 +1142,7 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/mediaservices/arm-mediaservices/src/operations/liveOutputs.ts b/sdk/mediaservices/arm-mediaservices/src/operations/liveOutputs.ts index 10f8f2e860de..816ff5f9638b 100644 --- a/sdk/mediaservices/arm-mediaservices/src/operations/liveOutputs.ts +++ b/sdk/mediaservices/arm-mediaservices/src/operations/liveOutputs.ts @@ -24,6 +24,10 @@ import { LiveOutputsCreateOptionalParams, LiveOutputsCreateResponse, LiveOutputsDeleteOptionalParams, + LiveOutputsAsyncOperationOptionalParams, + LiveOutputsAsyncOperationResponse, + LiveOutputsOperationLocationOptionalParams, + LiveOutputsOperationLocationResponse, LiveOutputsListNextResponse } from "../models"; @@ -375,6 +379,55 @@ export class LiveOutputsImpl implements LiveOutputs { return poller.pollUntilDone(); } + /** + * Get a Live Output operation status. + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param operationId The ID of an ongoing async operation. + * @param options The options parameters. + */ + asyncOperation( + resourceGroupName: string, + accountName: string, + operationId: string, + options?: LiveOutputsAsyncOperationOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, operationId, options }, + asyncOperationOperationSpec + ); + } + + /** + * Get a Live Output operation status. + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param liveEventName The name of the live event, maximum length is 32. + * @param liveOutputName The name of the live output. + * @param operationId The ID of an ongoing async operation. + * @param options The options parameters. + */ + operationLocation( + resourceGroupName: string, + accountName: string, + liveEventName: string, + liveOutputName: string, + operationId: string, + options?: LiveOutputsOperationLocationOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + liveEventName, + liveOutputName, + operationId, + options + }, + operationLocationOperationSpec + ); + } + /** * ListNext * @param resourceGroupName The name of the resource group within the Azure subscription. @@ -411,7 +464,7 @@ const listOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -434,7 +487,7 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -468,7 +521,7 @@ const createOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.parameters18, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -494,13 +547,62 @@ const deleteOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.liveEventName, + Parameters.liveOutputName + ], + headerParameters: [Parameters.accept], + serializer +}; +const asyncOperationOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/liveOutputOperations/{operationId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AsyncOperationResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion1], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.operationId1 + ], + headerParameters: [Parameters.accept], + serializer +}; +const operationLocationOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/liveEvents/{liveEventName}/liveOutputs/{liveOutputName}/operationLocations/{operationId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.LiveOutput + }, + 202: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.liveEventName, + Parameters.operationId1, Parameters.liveOutputName ], headerParameters: [Parameters.accept], @@ -517,7 +619,7 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/mediaservices/arm-mediaservices/src/operations/streamingEndpoints.ts b/sdk/mediaservices/arm-mediaservices/src/operations/streamingEndpoints.ts index 1534c2b904f8..25aa50f41a60 100644 --- a/sdk/mediaservices/arm-mediaservices/src/operations/streamingEndpoints.ts +++ b/sdk/mediaservices/arm-mediaservices/src/operations/streamingEndpoints.ts @@ -32,6 +32,10 @@ import { StreamingEndpointsStopOptionalParams, StreamingEntityScaleUnit, StreamingEndpointsScaleOptionalParams, + StreamingEndpointsAsyncOperationOptionalParams, + StreamingEndpointsAsyncOperationResponse, + StreamingEndpointsOperationLocationOptionalParams, + StreamingEndpointsOperationLocationResponse, StreamingEndpointsListNextResponse } from "../models"; @@ -727,6 +731,52 @@ export class StreamingEndpointsImpl implements StreamingEndpoints { return poller.pollUntilDone(); } + /** + * Get a streaming endpoint operation status. + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param operationId The ID of an ongoing async operation. + * @param options The options parameters. + */ + asyncOperation( + resourceGroupName: string, + accountName: string, + operationId: string, + options?: StreamingEndpointsAsyncOperationOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, operationId, options }, + asyncOperationOperationSpec + ); + } + + /** + * Get a streaming endpoint operation status. + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param streamingEndpointName The name of the streaming endpoint, maximum length is 24. + * @param operationId The ID of an ongoing async operation. + * @param options The options parameters. + */ + operationLocation( + resourceGroupName: string, + accountName: string, + streamingEndpointName: string, + operationId: string, + options?: StreamingEndpointsOperationLocationOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + streamingEndpointName, + operationId, + options + }, + operationLocationOperationSpec + ); + } + /** * ListNext * @param resourceGroupName The name of the resource group within the Azure subscription. @@ -761,7 +811,7 @@ const listOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -783,7 +833,7 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -816,7 +866,7 @@ const createOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.parameters19, - queryParameters: [Parameters.apiVersion, Parameters.autoStart], + queryParameters: [Parameters.apiVersion1, Parameters.autoStart], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -850,7 +900,7 @@ const updateOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.parameters19, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -875,7 +925,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -898,7 +948,7 @@ const skusOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -922,7 +972,7 @@ const startOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -946,7 +996,7 @@ const stopOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -971,7 +1021,7 @@ const scaleOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.parameters20, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -983,6 +1033,54 @@ const scaleOperationSpec: coreClient.OperationSpec = { mediaType: "json", serializer }; +const asyncOperationOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/streamingEndpointOperations/{operationId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AsyncOperationResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion1], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.operationId1 + ], + headerParameters: [Parameters.accept], + serializer +}; +const operationLocationOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/streamingEndpoints/{streamingEndpointName}/operationLocations/{operationId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.StreamingEndpoint + }, + 202: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion1], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.operationId1, + Parameters.streamingEndpointName + ], + headerParameters: [Parameters.accept], + serializer +}; const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", @@ -994,7 +1092,7 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/mediaservices/arm-mediaservices/src/operationsInterfaces/liveEvents.ts b/sdk/mediaservices/arm-mediaservices/src/operationsInterfaces/liveEvents.ts index 3e9b55628cff..610dcbc60708 100644 --- a/sdk/mediaservices/arm-mediaservices/src/operationsInterfaces/liveEvents.ts +++ b/sdk/mediaservices/arm-mediaservices/src/operationsInterfaces/liveEvents.ts @@ -22,7 +22,11 @@ import { LiveEventsStartOptionalParams, LiveEventActionInput, LiveEventsStopOptionalParams, - LiveEventsResetOptionalParams + LiveEventsResetOptionalParams, + LiveEventsAsyncOperationOptionalParams, + LiveEventsAsyncOperationResponse, + LiveEventsOperationLocationOptionalParams, + LiveEventsOperationLocationResponse } from "../models"; /// @@ -262,4 +266,32 @@ export interface LiveEvents { liveEventName: string, options?: LiveEventsResetOptionalParams ): Promise; + /** + * Get a live event operation status. + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param operationId The ID of an ongoing async operation. + * @param options The options parameters. + */ + asyncOperation( + resourceGroupName: string, + accountName: string, + operationId: string, + options?: LiveEventsAsyncOperationOptionalParams + ): Promise; + /** + * Get a live event operation status. + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param liveEventName The name of the live event, maximum length is 32. + * @param operationId The ID of an ongoing async operation. + * @param options The options parameters. + */ + operationLocation( + resourceGroupName: string, + accountName: string, + liveEventName: string, + operationId: string, + options?: LiveEventsOperationLocationOptionalParams + ): Promise; } diff --git a/sdk/mediaservices/arm-mediaservices/src/operationsInterfaces/liveOutputs.ts b/sdk/mediaservices/arm-mediaservices/src/operationsInterfaces/liveOutputs.ts index 47b6ad8a5695..4ef2307fd9cf 100644 --- a/sdk/mediaservices/arm-mediaservices/src/operationsInterfaces/liveOutputs.ts +++ b/sdk/mediaservices/arm-mediaservices/src/operationsInterfaces/liveOutputs.ts @@ -15,7 +15,11 @@ import { LiveOutputsGetResponse, LiveOutputsCreateOptionalParams, LiveOutputsCreateResponse, - LiveOutputsDeleteOptionalParams + LiveOutputsDeleteOptionalParams, + LiveOutputsAsyncOperationOptionalParams, + LiveOutputsAsyncOperationResponse, + LiveOutputsOperationLocationOptionalParams, + LiveOutputsOperationLocationResponse } from "../models"; /// @@ -120,4 +124,34 @@ export interface LiveOutputs { liveOutputName: string, options?: LiveOutputsDeleteOptionalParams ): Promise; + /** + * Get a Live Output operation status. + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param operationId The ID of an ongoing async operation. + * @param options The options parameters. + */ + asyncOperation( + resourceGroupName: string, + accountName: string, + operationId: string, + options?: LiveOutputsAsyncOperationOptionalParams + ): Promise; + /** + * Get a Live Output operation status. + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param liveEventName The name of the live event, maximum length is 32. + * @param liveOutputName The name of the live output. + * @param operationId The ID of an ongoing async operation. + * @param options The options parameters. + */ + operationLocation( + resourceGroupName: string, + accountName: string, + liveEventName: string, + liveOutputName: string, + operationId: string, + options?: LiveOutputsOperationLocationOptionalParams + ): Promise; } diff --git a/sdk/mediaservices/arm-mediaservices/src/operationsInterfaces/streamingEndpoints.ts b/sdk/mediaservices/arm-mediaservices/src/operationsInterfaces/streamingEndpoints.ts index e0a55177ba9f..69aa3fbefd21 100644 --- a/sdk/mediaservices/arm-mediaservices/src/operationsInterfaces/streamingEndpoints.ts +++ b/sdk/mediaservices/arm-mediaservices/src/operationsInterfaces/streamingEndpoints.ts @@ -23,7 +23,11 @@ import { StreamingEndpointsStartOptionalParams, StreamingEndpointsStopOptionalParams, StreamingEntityScaleUnit, - StreamingEndpointsScaleOptionalParams + StreamingEndpointsScaleOptionalParams, + StreamingEndpointsAsyncOperationOptionalParams, + StreamingEndpointsAsyncOperationResponse, + StreamingEndpointsOperationLocationOptionalParams, + StreamingEndpointsOperationLocationResponse } from "../models"; /// @@ -244,4 +248,32 @@ export interface StreamingEndpoints { parameters: StreamingEntityScaleUnit, options?: StreamingEndpointsScaleOptionalParams ): Promise; + /** + * Get a streaming endpoint operation status. + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param operationId The ID of an ongoing async operation. + * @param options The options parameters. + */ + asyncOperation( + resourceGroupName: string, + accountName: string, + operationId: string, + options?: StreamingEndpointsAsyncOperationOptionalParams + ): Promise; + /** + * Get a streaming endpoint operation status. + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param streamingEndpointName The name of the streaming endpoint, maximum length is 24. + * @param operationId The ID of an ongoing async operation. + * @param options The options parameters. + */ + operationLocation( + resourceGroupName: string, + accountName: string, + streamingEndpointName: string, + operationId: string, + options?: StreamingEndpointsOperationLocationOptionalParams + ): Promise; } diff --git a/sdk/mediaservices/arm-mediaservices/test/sampleTest.ts b/sdk/mediaservices/arm-mediaservices/test/sampleTest.ts new file mode 100644 index 000000000000..25aeb3ebcc36 --- /dev/null +++ b/sdk/mediaservices/arm-mediaservices/test/sampleTest.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + Recorder, + RecorderStartOptions, + env +} from "@azure-tools/test-recorder"; +import { assert } from "chai"; +import { Context } from "mocha"; + +const replaceableVariables: Record = { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id" +}; + +const recorderOptions: RecorderStartOptions = { + envSetupForPlayback: replaceableVariables +}; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async function(this: Context) { + recorder = new Recorder(this.currentTest); + await recorder.start(recorderOptions); + }); + + afterEach(async function() { + await recorder.stop(); + }); + + it("sample test", async function() { + console.log("Hi, I'm a test!"); + }); +});