From 1a3a8ff1d85cddc5d26b94d197f910f26a4ff429 Mon Sep 17 00:00:00 2001 From: Brian Blum Date: Thu, 3 Nov 2016 09:04:58 -0700 Subject: [PATCH 1/7] Improve doc with examples and external references Change summary tags to description tags. Add proper text to reponse code descriptions Add examples for responses. --- .../2015-10-01/swagger/media.json | 486 ++++++++++-------- 1 file changed, 277 insertions(+), 209 deletions(-) diff --git a/arm-mediaservices/2015-10-01/swagger/media.json b/arm-mediaservices/2015-10-01/swagger/media.json index 21bdb2ed2437..7add411df4b1 100644 --- a/arm-mediaservices/2015-10-01/swagger/media.json +++ b/arm-mediaservices/2015-10-01/swagger/media.json @@ -36,21 +36,10 @@ "paths": { "/subscriptions/{subscriptionId}/providers/Microsoft.Media/CheckNameAvailability": { "post": { - "summary": "Check whether the Media Service resource name is available. The name must be globally unique.", "operationId": "MediaService_CheckNameAvailability", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/CheckNameAvailabilityOutput" - } - }, - "default": { - "description": "Detailed error information.", - "schema": { - "$ref": "#/definitions/ApiError" - } - } + "description": "Checks whether the Media Service resource name is available. The name must be globally unique.", + "externalDocs": { + "url": "https://aka.ms/media-manage" }, "parameters": [ { @@ -67,14 +56,50 @@ "schema": { "$ref": "#/definitions/CheckNameAvailabilityInput" } + } + ], + "responses": { + "200": { + "description": "Success. Returns details about whether or not a Media Service resource name is available.", + "schema": { + "$ref": "#/definitions/CheckNameAvailabilityOutput" + }, + "examples": { + "value": [ + { + "nameAvailable": true, + "reason": null, + "message": null + }, + { + "nameAvailable": false, + "reason": "AlreadyExists", + "message": "Already in use by another Media Service instance. Please try again with a name that is not likely to be in use." + }, + { + "nameAvailable": false, + "reason": "Invalid", + "message": "The media service name should be between 3 and 24 characters and may contain only lowercase letters and numbers." + } + ] + } + }, + "default": { + "description": "CheckNameAvailability of a Media Service failed.", + "schema": { + "$ref": "#/definitions/ApiError" + } } - ] + } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices": { "get": { - "summary": "List all of the Media Services in a resource group.", "operationId": "MediaService_ListByResourceGroup", + "description": "Lists all of the Media Services in a resource group.", + "externalDocs": { + "url": "https://aka.ms/media-manage" + }, "parameters": [ { "$ref": "#/parameters/subscriptionIdParameter" @@ -83,22 +108,40 @@ "$ref": "#/parameters/apiVersionParameter" }, { - "name": "resourceGroupName", - "description": "Name of the resource group within the Azure subscription.", - "in": "path", - "required": true, - "type": "string" + "$ref": "#/parameters/resourceGroupNameParameter" } ], "responses": { "200": { - "description": "OK", + "description": "Success. Returns a list of all of the Media Services accounts in a resource group.", "schema": { "$ref": "#/definitions/MediaServiceCollection" + }, + "examples": { + "id": "/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.Media/mediaServices/{name}", + "name": "{name}", + "type": "Microsoft.Media/mediaServices", + "location": "{location}", + "tags":{ + }, + "properties":{ + "apiEndpoints":[ + { + "majorVersion": "{rest-api-version}", + "endpoint": "https://{rest-endpoint}/api/" + } + ], + "storageAccounts":[ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.Storage/storageAccounts/{storage-account-name}", + "isPrimary": "true | false" + } + ] + } } }, "default": { - "description": "Detailed error information.", + "description": "List Media Services failed.", "schema": { "$ref": "#/definitions/ApiError" } @@ -111,21 +154,10 @@ }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{mediaServiceName}": { "get": { - "summary": "Get a Media Service.", "operationId": "MediaService_Get", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/MediaService" - } - }, - "default": { - "description": "Detailed error information.", - "schema": { - "$ref": "#/definitions/ApiError" - } - } + "description": "Gets a Media Service.", + "externalDocs": { + "url": "https://aka.ms/media-manage" }, "parameters": [ { @@ -135,46 +167,54 @@ "$ref": "#/parameters/apiVersionParameter" }, { - "name": "resourceGroupName", - "description": "Name of the resource group within the Azure subscription.", - "in": "path", - "required": true, - "type": "string" + "$ref": "#/parameters/resourceGroupNameParameter" }, { - "name": "mediaServiceName", - "description": "Name of the Media Service.", - "in": "path", - "required": true, - "type": "string", - "pattern": "^[a-z0-9]", - "minLength": 3, - "maxLength": 24 + "$ref": "#/parameters/mediaResourceNameParameter" } - ] - }, - "put": { - "summary": "Create a Media Service.", - "operationId": "MediaService_Create", + ], "responses": { "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/MediaService" - } - }, - "201": { - "description": "Created", + "description": "Success. Returns the details of the Media Services account.", "schema": { "$ref": "#/definitions/MediaService" + }, + "examples" : { + "id": "/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.Media/mediaServices/{name}", + "name": "{name}", + "type": "Microsoft.Media/mediaServices", + "location": "{location}", + "tags":{ + }, + "properties":{ + "apiEndpoints":[ + { + "majorVersion": "{rest-api-version}", + "endpoint": "https://{rest-endpoint}/api/" + } + ], + "storageAccounts":[ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.Storage/storageAccounts/{storage-account-name}", + "isPrimary": "true | false" + } + ] + } } }, "default": { - "description": "Detailed error information.", + "description": "Get Media Services failed.", "schema": { "$ref": "#/definitions/ApiError" } } + } + }, + "put": { + "description": "Creates a Media Service.", + "operationId": "MediaService_Create", + "externalDocs": { + "url": "https://aka.ms/media-manage" }, "parameters": [ { @@ -184,21 +224,10 @@ "$ref": "#/parameters/apiVersionParameter" }, { - "name": "resourceGroupName", - "description": "Name of the resource group within the Azure subscription.", - "in": "path", - "required": true, - "type": "string" + "$ref": "#/parameters/resourceGroupNameParameter" }, { - "name": "mediaServiceName", - "description": "Name of the Media Service.", - "in": "path", - "required": true, - "type": "string", - "pattern": "^[a-z0-9]", - "minLength": 3, - "maxLength": 24 + "$ref": "#/parameters/mediaResourceNameParameter" }, { "name": "MediaService", @@ -209,21 +238,49 @@ "$ref": "#/definitions/MediaService" } } - ] - }, - "delete": { - "summary": "Delete a Media Service.", - "operationId": "MediaService_Delete", + ], "responses": { - "200": { - "description": "OK" + "201": { + "description": "Success. Returns the new Media Services account.", + "schema": { + "$ref": "#/definitions/MediaService" + }, + "examples" : { + "id": "/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.Media/mediaServices/{name}", + "name": "{name}", + "type": "Microsoft.Media/mediaServices", + "location": "{location}", + "tags": { + }, + "properties":{ + "apiEndpoints":[ + { + "majorVersion": "{rest-api-version}", + "endpoint": "https://{rest-endpoint}/api/" + } + ], + "storageAccounts":[ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.Storage/storageAccounts/{storage-account-name}", + "isPrimary": "true | false" + } + ] + } + } }, "default": { - "description": "Detailed error information.", + "description": "Create Media Services failed.", "schema": { "$ref": "#/definitions/ApiError" } } + } + }, + "delete": { + "operationId": "MediaService_Delete", + "description": "Deletes a Media Service.", + "externalDocs": { + "url": "https://aka.ms/media-manage" }, "parameters": [ { @@ -233,40 +290,32 @@ "$ref": "#/parameters/apiVersionParameter" }, { - "name": "resourceGroupName", - "description": "Name of the resource group within the Azure subscription.", - "in": "path", - "required": true, - "type": "string" + "$ref": "#/parameters/resourceGroupNameParameter" }, { - "name": "mediaServiceName", - "description": "Name of the Media Service.", - "in": "path", - "required": true, - "type": "string", - "pattern": "^[a-z0-9]", - "minLength": 3, - "maxLength": 24 + "$ref": "#/parameters/mediaResourceNameParameter" } - ] - }, - "patch": { - "summary": "Update a Media Service.", - "operationId": "MediaService_Update", + ], "responses": { "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/MediaService" - } + "description": "Success. The Media Services account was deleted." + }, + "204": { + "description": "No Content. The account name does not exist." }, "default": { - "description": "Detailed error information.", + "description": "Delete Media Services failed.", "schema": { "$ref": "#/definitions/ApiError" } } + } + }, + "patch": { + "operationId": "MediaService_Update", + "description": "Updates a Media Service.", + "externalDocs": { + "url": "https://aka.ms/media-manage" }, "parameters": [ { @@ -276,21 +325,10 @@ "$ref": "#/parameters/apiVersionParameter" }, { - "name": "resourceGroupName", - "description": "Name of the resource group within the Azure subscription.", - "in": "path", - "required": true, - "type": "string" + "$ref": "#/parameters/resourceGroupNameParameter" }, { - "name": "mediaServiceName", - "description": "Name of the Media Service.", - "in": "path", - "required": true, - "type": "string", - "pattern": "^[a-z0-9]", - "minLength": 3, - "maxLength": 24 + "$ref": "#/parameters/mediaResourceNameParameter" }, { "name": "MediaService", @@ -301,29 +339,51 @@ "$ref": "#/definitions/MediaService" } } - ] - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{mediaServiceName}/regenerateKey": { - "post": { - "summary": "Regenerate the key for a Media Service.", - "operationId": "MediaService_RegenerateKey", + ], "responses": { "200": { - "description": "OK", + "description": "Success. The Media Services account was updated.", "schema": { - "$ref": "#/definitions/RegenerateKeyOutput" + "$ref": "#/definitions/MediaService" + }, + "examples" : { + "id": "/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.Media/mediaServices/{name}", + "name": "{name}", + "type": "Microsoft.Media/mediaServices", + "location": "{location}", + "tags":{ + }, + "properties":{ + "apiEndpoints":[ + { + "majorVersion": "{rest-api-version}", + "endpoint": "https://{rest-endpoint}/api/" + } + ], + "storageAccounts":[ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.Storage/storageAccounts/{storage-account-name}", + "isPrimary": "true | false" + } + ] + } } }, - "202": { - "description": "Accepted" - }, "default": { - "description": "Detailed error information.", + "description": "Update Media Services failed.", "schema": { "$ref": "#/definitions/ApiError" } } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{mediaServiceName}/regenerateKey": { + "post": { + "operationId": "MediaService_RegenerateKey", + "description": "Regenerates the key for a Media Service.", + "externalDocs": { + "url": "https://aka.ms/media-manage" }, "parameters": [ { @@ -333,21 +393,10 @@ "$ref": "#/parameters/apiVersionParameter" }, { - "name": "resourceGroupName", - "description": "Name of the resource group within the Azure subscription.", - "in": "path", - "required": true, - "type": "string" + "$ref": "#/parameters/resourceGroupNameParameter" }, { - "name": "mediaServiceName", - "description": "Name of the Media Service.", - "in": "path", - "required": true, - "type": "string", - "pattern": "^[a-z0-9]", - "minLength": 3, - "maxLength": 24 + "$ref": "#/parameters/mediaResourceNameParameter" }, { "name": "RegenerateKeyInput", @@ -358,29 +407,32 @@ "$ref": "#/definitions/RegenerateKeyInput" } } - ] - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{mediaServiceName}/listKeys": { - "post": { - "summary": "List the keys for a Media Service.", - "operationId": "MediaService_ListKeys", + ], "responses": { "200": { - "description": "OK", + "description": "Success. The Media Services key specified in the input was regenerated.", "schema": { - "$ref": "#/definitions/ServiceKeys" + "$ref": "#/definitions/RegenerateKeyOutput" + }, + "examples": { + "key": "{key}" } }, - "202": { - "description": "Accepted" - }, "default": { - "description": "Detailed error information.", + "description": "Regenerate Media Service key failed.", "schema": { "$ref": "#/definitions/ApiError" } } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{mediaServiceName}/listKeys": { + "post": { + "operationId": "MediaService_ListKeys", + "description": "Lists the keys for a Media Service.", + "externalDocs": { + "url": "https://aka.ms/media-manage" }, "parameters": [ { @@ -390,45 +442,41 @@ "$ref": "#/parameters/apiVersionParameter" }, { - "name": "resourceGroupName", - "description": "Name of the resource group within the Azure subscription.", - "in": "path", - "required": true, - "type": "string" + "$ref": "#/parameters/resourceGroupNameParameter" }, { - "name": "mediaServiceName", - "description": "Name of the Media Service.", - "in": "path", - "required": true, - "type": "string", - "pattern": "^[a-z0-9]", - "minLength": 3, - "maxLength": 24 + "$ref": "#/parameters/mediaResourceNameParameter" } - ] - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{mediaServiceName}/syncStorageKeys": { - "post": { - "summary": "Synchronize the keys for a storage account to the Media Service.", - "operationId": "MediaService_SyncStorageKeys", + ], "responses": { "200": { - "description": "OK", + "description": "Success. The keys for the Media Services account were listed.", "schema": { - "$ref": "#/definitions/MediaService" + "$ref": "#/definitions/ServiceKeys" + }, + "examples":{ + "primaryAuthEndpoint": "{primary-auth-endpoint}", + "secondaryAuthEndpoint": "{secondaryAuthEndpoint}", + "primaryKey": "{primaryKey}", + "secondaryKey": "{secondaryKey}", + "scope": "{scope}" } }, - "202": { - "description": "Accepted" - }, "default": { - "description": "Detailed error information.", + "description": "List Media Service keys failed.", "schema": { "$ref": "#/definitions/ApiError" } } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{mediaServiceName}/syncStorageKeys": { + "post": { + "operationId": "MediaService_SyncStorageKeys", + "description": "Synchronizes the keys for a storage account to the Media Service.", + "externalDocs": { + "url": "https://aka.ms/media-manage" }, "parameters": [ { @@ -438,21 +486,10 @@ "$ref": "#/parameters/apiVersionParameter" }, { - "name": "resourceGroupName", - "description": "Name of the resource group within the Azure subscription.", - "in": "path", - "required": true, - "type": "string" + "$ref": "#/parameters/resourceGroupNameParameter" }, { - "name": "mediaServiceName", - "description": "Name of the Media Service.", - "in": "path", - "required": true, - "type": "string", - "pattern": "^[a-z0-9]", - "minLength": 3, - "maxLength": 24 + "$ref": "#/parameters/mediaResourceNameParameter" }, { "name": "SyncStorageKeysInput", @@ -463,13 +500,25 @@ "$ref": "#/definitions/SyncStorageKeysInput" } } - ] + ], + "responses": { + "200": { + "description": "Success. The keys for the storage account were synchronized." + }, + "default": { + "description": "Synch Media Service storage keys failed.", + "schema": { + "$ref": "#/definitions/ApiError" + } + } + } } } }, "definitions": { "ApiEndpoint": { "description": "The properties for a Media Services REST API endpoint.", + "readOnly": true, "properties": { "endpoint": { "description": "The Media Services REST endpoint.", @@ -482,7 +531,7 @@ } }, "ApiError": { - "description": "The error returned from a failed Media Services REST API call.", + "description": "The error returned from a failed Media Services REST API call.", "properties": { "code": { "description": "Error code.", @@ -499,7 +548,7 @@ "required": [ "name", "type" - ], + ], "properties": { "name": { "description": "The name of the resource. A name must be globally unique.", @@ -509,13 +558,12 @@ "maxLength": 24 }, "type": { - "description": "Specifies the type of the resource.", "$ref": "#/definitions/ResourceType" } } }, "ResourceType": { - "description": "Type of MediaService resource used in CheckNameAvailability.", + "description": "Type of MediaService resource.", "readOnly": true, "enum": [ "mediaservices" @@ -581,7 +629,7 @@ "description": "The additional properties of a Media Service resource.", "properties": { "apiEndpoints": { - "description": "The Media Services REST API endpoints for this resource.", + "description": "Readonly property that lists the Media Services REST API endpoints for this resource. If supplied on a PUT or PATCH, the value will be ignored.", "type": "array", "items": { "$ref": "#/definitions/ApiEndpoint" @@ -604,14 +652,17 @@ "type": "string", "enum": [ "Primary", - "Secondary" + "Secondary" ], "x-ms-enum": { "name": "KeyType", "modelAsString": false } } - } + }, + "required": [ + "keyType" + ] }, "RegenerateKeyOutput": { "description": "The response body for a RegenerateKey API.", @@ -718,17 +769,34 @@ "parameters": { "subscriptionIdParameter": { "name": "subscriptionId", - "in": "path", "description": "Azure subscription id.", + "in": "path", "required": true, "type": "string" }, + "resourceGroupNameParameter": { + "name": "resourceGroupName", + "description": "Name of the resource group within the Azure subscription.", + "in": "path", + "required": true, + "type": "string" + }, + "mediaResourceNameParameter": { + "name": "mediaServiceName", + "description": "Name of the Media Service.", + "in": "path", + "required": true, + "type": "string", + "pattern": "^[a-z0-9]", + "minLength": 3, + "maxLength": 24 + }, "apiVersionParameter": { "name": "api-version", + "description": "Version of the API to be used with the client request. Current version is 2015-10-01", "in": "query", "required": true, - "type": "string", - "description": "Version of the API to be used with the client request. Current version is 2015-10-01" + "type": "string" } } } From fe5d6886e31125a72d655c7d22aa64e9f4605992 Mon Sep 17 00:00:00 2001 From: Brian Blum Date: Thu, 3 Nov 2016 15:59:12 -0700 Subject: [PATCH 2/7] Grammar changes Apply better grammar. --- arm-mediaservices/2015-10-01/swagger/media.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arm-mediaservices/2015-10-01/swagger/media.json b/arm-mediaservices/2015-10-01/swagger/media.json index 7add411df4b1..d980e67c99ef 100644 --- a/arm-mediaservices/2015-10-01/swagger/media.json +++ b/arm-mediaservices/2015-10-01/swagger/media.json @@ -60,7 +60,7 @@ ], "responses": { "200": { - "description": "Success. Returns details about whether or not a Media Service resource name is available.", + "description": "Success. Returns details about whether a Media Service resource name is available.", "schema": { "$ref": "#/definitions/CheckNameAvailabilityOutput" }, @@ -493,7 +493,7 @@ }, { "name": "SyncStorageKeysInput", - "description": "Properties needed to sycnronize the keys for a storage account to the Media Service.", + "description": "Properties needed to synchronize the keys for a storage account to the Media Service.", "in": "body", "required": true, "schema": { @@ -629,7 +629,7 @@ "description": "The additional properties of a Media Service resource.", "properties": { "apiEndpoints": { - "description": "Readonly property that lists the Media Services REST API endpoints for this resource. If supplied on a PUT or PATCH, the value will be ignored.", + "description": "Read-only property that lists the Media Services REST API endpoints for this resource. If supplied on a PUT or PATCH, the value will be ignored.", "type": "array", "items": { "$ref": "#/definitions/ApiEndpoint" From 3081faabdd70eb98d18fdb295a77e80e328363f9 Mon Sep 17 00:00:00 2001 From: Brian Blum Date: Mon, 7 Nov 2016 09:14:55 -0800 Subject: [PATCH 3/7] Sync storage key API Make the description clearer and mark the id as required --- arm-mediaservices/2015-10-01/swagger/media.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arm-mediaservices/2015-10-01/swagger/media.json b/arm-mediaservices/2015-10-01/swagger/media.json index d980e67c99ef..1247b8249faf 100644 --- a/arm-mediaservices/2015-10-01/swagger/media.json +++ b/arm-mediaservices/2015-10-01/swagger/media.json @@ -474,7 +474,7 @@ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{mediaServiceName}/syncStorageKeys": { "post": { "operationId": "MediaService_SyncStorageKeys", - "description": "Synchronizes the keys for a storage account to the Media Service.", + "description": "Synchronizes storage account keys for a storage account associated with the Media Service account.", "externalDocs": { "url": "https://aka.ms/media-manage" }, @@ -733,6 +733,9 @@ }, "SyncStorageKeysInput": { "description": "The request body for a SyncStorageKeys API.", + "required": [ + "id" + ], "properties": { "id": { "description": "The id of the storage account resource.", From 7dbe9b25b4c71f6c6ddb18b3b88683de2af39e62 Mon Sep 17 00:00:00 2001 From: Brian Blum Date: Tue, 8 Nov 2016 09:58:30 -0800 Subject: [PATCH 4/7] Add description for Resource linter caught missing description --- arm-mediaservices/2015-10-01/swagger/media.json | 1 + 1 file changed, 1 insertion(+) diff --git a/arm-mediaservices/2015-10-01/swagger/media.json b/arm-mediaservices/2015-10-01/swagger/media.json index 1247b8249faf..4d12276bf474 100644 --- a/arm-mediaservices/2015-10-01/swagger/media.json +++ b/arm-mediaservices/2015-10-01/swagger/media.json @@ -674,6 +674,7 @@ } }, "Resource": { + "description": "The Azure Resource Manager resource.", "properties": { "id": { "description": "The id of the resource.", From 1da1692331f4844441c6026fc8f0fd51bfff7fac Mon Sep 17 00:00:00 2001 From: Brian Blum Date: Wed, 9 Nov 2016 12:39:02 -0800 Subject: [PATCH 5/7] Review feedback --- .../2015-10-01/swagger/media.json | 250 ++++++++++-------- 1 file changed, 143 insertions(+), 107 deletions(-) diff --git a/arm-mediaservices/2015-10-01/swagger/media.json b/arm-mediaservices/2015-10-01/swagger/media.json index 4d12276bf474..e8148b498396 100644 --- a/arm-mediaservices/2015-10-01/swagger/media.json +++ b/arm-mediaservices/2015-10-01/swagger/media.json @@ -64,24 +64,26 @@ "schema": { "$ref": "#/definitions/CheckNameAvailabilityOutput" }, - "examples": { - "value": [ - { - "nameAvailable": true, - "reason": null, - "message": null - }, - { - "nameAvailable": false, - "reason": "AlreadyExists", - "message": "Already in use by another Media Service instance. Please try again with a name that is not likely to be in use." - }, - { - "nameAvailable": false, - "reason": "Invalid", - "message": "The media service name should be between 3 and 24 characters and may contain only lowercase letters and numbers." - } - ] + "examples": { + "application/json": { + "value": [ + { + "nameAvailable": true, + "reason": null, + "message": null + }, + { + "nameAvailable": false, + "reason": "AlreadyExists", + "message": "Already in use by another Media Service instance. Please try again with a name that is not likely to be in use." + }, + { + "nameAvailable": false, + "reason": "Invalid", + "message": "The media service name should be between 3 and 24 characters and may contain only lowercase letters and numbers." + } + ] + } } }, "default": { @@ -118,23 +120,28 @@ "$ref": "#/definitions/MediaServiceCollection" }, "examples": { - "id": "/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.Media/mediaServices/{name}", - "name": "{name}", - "type": "Microsoft.Media/mediaServices", - "location": "{location}", - "tags":{ - }, - "properties":{ - "apiEndpoints":[ - { - "majorVersion": "{rest-api-version}", - "endpoint": "https://{rest-endpoint}/api/" - } - ], - "storageAccounts":[ - { - "id": "/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.Storage/storageAccounts/{storage-account-name}", - "isPrimary": "true | false" + "application/json": { + "value": [ + { + "name": "{name}", + "id": "/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.Media/mediaServices/{name}", + "type": "Microsoft.Media/mediaServices", + "location": "{location}", + "tags":null, + "properties":{ + "apiEndpoints":[ + { + "majorVersion": "{rest-api-version}", + "endpoint": "https://{rest-endpoint}/api/" + } + ], + "storageAccounts":[ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.Storage/storageAccounts/{storage-account-name}", + "isPrimary": true + } + ] + } } ] } @@ -179,27 +186,28 @@ "schema": { "$ref": "#/definitions/MediaService" }, - "examples" : { - "id": "/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.Media/mediaServices/{name}", - "name": "{name}", - "type": "Microsoft.Media/mediaServices", - "location": "{location}", - "tags":{ - }, - "properties":{ - "apiEndpoints":[ - { - "majorVersion": "{rest-api-version}", - "endpoint": "https://{rest-endpoint}/api/" - } - ], - "storageAccounts":[ - { - "id": "/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.Storage/storageAccounts/{storage-account-name}", - "isPrimary": "true | false" - } - ] - } + "examples" : { + "application/json": { + "name": "{name}", + "id": "/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.Media/mediaServices/{name}", + "type": "Microsoft.Media/mediaServices", + "location": "{location}", + "tags":null, + "properties":{ + "apiEndpoints":[ + { + "majorVersion": "{rest-api-version}", + "endpoint": "https://{rest-endpoint}/api/" + } + ], + "storageAccounts":[ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.Storage/storageAccounts/{storage-account-name}", + "isPrimary": "true | false" + } + ] + } + } } }, "default": { @@ -245,27 +253,28 @@ "schema": { "$ref": "#/definitions/MediaService" }, - "examples" : { - "id": "/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.Media/mediaServices/{name}", - "name": "{name}", - "type": "Microsoft.Media/mediaServices", - "location": "{location}", - "tags": { - }, - "properties":{ - "apiEndpoints":[ - { - "majorVersion": "{rest-api-version}", - "endpoint": "https://{rest-endpoint}/api/" - } - ], - "storageAccounts":[ - { - "id": "/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.Storage/storageAccounts/{storage-account-name}", - "isPrimary": "true | false" - } - ] - } + "examples" : { + "application/json": { + "name": "{name}", + "id": "/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.Media/mediaServices/{name}", + "type": "Microsoft.Media/mediaServices", + "location": "{location}", + "tags":null, + "properties":{ + "apiEndpoints":[ + { + "majorVersion": "{rest-api-version}", + "endpoint": "https://{rest-endpoint}/api/" + } + ], + "storageAccounts":[ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.Storage/storageAccounts/{storage-account-name}", + "isPrimary": "true | false" + } + ] + } + } } }, "default": { @@ -346,26 +355,27 @@ "schema": { "$ref": "#/definitions/MediaService" }, - "examples" : { - "id": "/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.Media/mediaServices/{name}", - "name": "{name}", - "type": "Microsoft.Media/mediaServices", - "location": "{location}", - "tags":{ - }, - "properties":{ - "apiEndpoints":[ - { - "majorVersion": "{rest-api-version}", - "endpoint": "https://{rest-endpoint}/api/" - } - ], - "storageAccounts":[ - { - "id": "/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.Storage/storageAccounts/{storage-account-name}", - "isPrimary": "true | false" - } - ] + "examples" : { + "application/json": { + "name": "{name}", + "id": "/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.Media/mediaServices/{name}", + "type": "Microsoft.Media/mediaServices", + "location": "{location}", + "tags":null, + "properties":{ + "apiEndpoints":[ + { + "majorVersion": "{rest-api-version}", + "endpoint": "https://{rest-endpoint}/api/" + } + ], + "storageAccounts":[ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.Storage/storageAccounts/{storage-account-name}", + "isPrimary": "true | false" + } + ] + } } } }, @@ -415,7 +425,9 @@ "$ref": "#/definitions/RegenerateKeyOutput" }, "examples": { - "key": "{key}" + "application/json": { + "key": "{key}" + } } }, "default": { @@ -455,11 +467,13 @@ "$ref": "#/definitions/ServiceKeys" }, "examples":{ - "primaryAuthEndpoint": "{primary-auth-endpoint}", - "secondaryAuthEndpoint": "{secondaryAuthEndpoint}", - "primaryKey": "{primaryKey}", - "secondaryKey": "{secondaryKey}", - "scope": "{scope}" + "application/json": { + "primaryAuthEndpoint": "{primary-auth-endpoint}", + "secondaryAuthEndpoint": "{secondaryAuthEndpoint}", + "primaryKey": "{primaryKey}", + "secondaryKey": "{secondaryKey}", + "scope": "{scope}" + } } }, "default": { @@ -518,7 +532,6 @@ "definitions": { "ApiEndpoint": { "description": "The properties for a Media Services REST API endpoint.", - "readOnly": true, "properties": { "endpoint": { "description": "The Media Services REST endpoint.", @@ -558,8 +571,16 @@ "maxLength": 24 }, "type": { + "description": "The type of the resource - mediaservices.", "$ref": "#/definitions/ResourceType" } + }, + "example": { + "application/json": + { + "name":"{name}", + "type":"mediaservices" + } } }, "ResourceType": { @@ -603,6 +624,18 @@ "MediaService": { "description": "The properties of a Media Service resource.", "properties": { + "name": { + "description": "Then name of the Media Service resource.", + "type": "string" + }, + "id": { + "description": "The Azure Resource Manager identifier.", + "type": "string" + }, + "type": { + "description": "The type of the Media Service resource.", + "type": "string" + }, "properties": { "x-ms-client-flatten": true, "$ref": "#/definitions/MediaServiceProperties" @@ -630,6 +663,7 @@ "properties": { "apiEndpoints": { "description": "Read-only property that lists the Media Services REST API endpoints for this resource. If supplied on a PUT or PATCH, the value will be ignored.", + "readOnly": true, "type": "array", "items": { "$ref": "#/definitions/ApiEndpoint" @@ -773,7 +807,7 @@ "parameters": { "subscriptionIdParameter": { "name": "subscriptionId", - "description": "Azure subscription id.", + "description": "The unique identifier for a Microsoft Azure subscription.", "in": "path", "required": true, "type": "string" @@ -783,7 +817,8 @@ "description": "Name of the resource group within the Azure subscription.", "in": "path", "required": true, - "type": "string" + "type": "string", + "x-ms-parameter-location": "method" }, "mediaResourceNameParameter": { "name": "mediaServiceName", @@ -793,7 +828,8 @@ "type": "string", "pattern": "^[a-z0-9]", "minLength": 3, - "maxLength": 24 + "maxLength": 24, + "x-ms-parameter-location": "method" }, "apiVersionParameter": { "name": "api-version", From 4d7242f26d8e8f2e0978f34a979d0ba127b37d1b Mon Sep 17 00:00:00 2001 From: Brian Blum Date: Thu, 10 Nov 2016 12:42:02 -0800 Subject: [PATCH 6/7] Incorporate more review feedback and improve examples. --- .../2015-10-01/swagger/media.json | 175 +++++++++++------- 1 file changed, 111 insertions(+), 64 deletions(-) diff --git a/arm-mediaservices/2015-10-01/swagger/media.json b/arm-mediaservices/2015-10-01/swagger/media.json index e8148b498396..9c69f7d9eb9c 100644 --- a/arm-mediaservices/2015-10-01/swagger/media.json +++ b/arm-mediaservices/2015-10-01/swagger/media.json @@ -67,20 +67,10 @@ "examples": { "application/json": { "value": [ - { - "nameAvailable": true, - "reason": null, - "message": null - }, { - "nameAvailable": false, - "reason": "AlreadyExists", - "message": "Already in use by another Media Service instance. Please try again with a name that is not likely to be in use." - }, - { - "nameAvailable": false, - "reason": "Invalid", - "message": "The media service name should be between 3 and 24 characters and may contain only lowercase letters and numbers." + "NameAvailable": false, + "Reason": "AlreadyExists", + "Message": "Already in use by another Media Service instance. Please try again with a name that is not likely to be in use." } ] } @@ -123,21 +113,21 @@ "application/json": { "value": [ { - "name": "{name}", - "id": "/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.Media/mediaServices/{name}", - "type": "Microsoft.Media/mediaServices", - "location": "{location}", + "name": "contosomedia", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso-media/providers/Microsoft.Media/mediaservices/contosomedia", + "type": "Microsoft.Media/mediaservices", + "location": "West US", "tags":null, "properties":{ "apiEndpoints":[ { - "majorVersion": "{rest-api-version}", - "endpoint": "https://{rest-endpoint}/api/" + "endpoint": "https://wamsbayclus001rest-hs.cloudapp.net/api/", + "majorVersion": "2" } ], "storageAccounts":[ { - "id": "/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.Storage/storageAccounts/{storage-account-name}", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso-media/providers/Microsoft.Storage/storageAccounts/contosomedia", "isPrimary": true } ] @@ -188,22 +178,22 @@ }, "examples" : { "application/json": { - "name": "{name}", - "id": "/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.Media/mediaServices/{name}", - "type": "Microsoft.Media/mediaServices", - "location": "{location}", + "name": "contosomedia", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso-media/providers/Microsoft.Media/mediaservices/contosomedia", + "type": "Microsoft.Media/mediaservices", + "location": "West US", "tags":null, "properties":{ "apiEndpoints":[ { - "majorVersion": "{rest-api-version}", - "endpoint": "https://{rest-endpoint}/api/" + "endpoint": "https://wamsbayclus001rest-hs.cloudapp.net/api/", + "majorVersion": "2" } ], "storageAccounts":[ { - "id": "/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.Storage/storageAccounts/{storage-account-name}", - "isPrimary": "true | false" + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso-media/providers/Microsoft.Storage/storageAccounts/contosomedia", + "isPrimary": true } ] } @@ -255,22 +245,22 @@ }, "examples" : { "application/json": { - "name": "{name}", - "id": "/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.Media/mediaServices/{name}", - "type": "Microsoft.Media/mediaServices", - "location": "{location}", + "name": "contosomedia", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso-media/providers/Microsoft.Media/mediaservices/contosomedia", + "type": "Microsoft.Media/mediaservices", + "location": "West US", "tags":null, "properties":{ "apiEndpoints":[ { - "majorVersion": "{rest-api-version}", - "endpoint": "https://{rest-endpoint}/api/" + "endpoint": "https://wamsbayclus001rest-hs.cloudapp.net/api/", + "majorVersion": "2" } ], "storageAccounts":[ { - "id": "/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.Storage/storageAccounts/{storage-account-name}", - "isPrimary": "true | false" + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso-media/providers/Microsoft.Storage/storageAccounts/contosomedia", + "isPrimary": true } ] } @@ -357,22 +347,22 @@ }, "examples" : { "application/json": { - "name": "{name}", - "id": "/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.Media/mediaServices/{name}", - "type": "Microsoft.Media/mediaServices", - "location": "{location}", + "name": "contosomedia", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso-media/providers/Microsoft.Media/mediaservices/contosomedia", + "type": "Microsoft.Media/mediaservices", + "location": "West US", "tags":null, "properties":{ "apiEndpoints":[ { - "majorVersion": "{rest-api-version}", - "endpoint": "https://{rest-endpoint}/api/" + "endpoint": "https://wamsbayclus001rest-hs.cloudapp.net/api/", + "majorVersion": "2" } ], "storageAccounts":[ { - "id": "/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.Storage/storageAccounts/{storage-account-name}", - "isPrimary": "true | false" + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso-media/providers/Microsoft.Storage/storageAccounts/contosomedia", + "isPrimary": true } ] } @@ -391,7 +381,7 @@ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{mediaServiceName}/regenerateKey": { "post": { "operationId": "MediaService_RegenerateKey", - "description": "Regenerates the key for a Media Service.", + "description": "Regenerates a primary or secondary key for a Media Service.", "externalDocs": { "url": "https://aka.ms/media-manage" }, @@ -426,7 +416,7 @@ }, "examples": { "application/json": { - "key": "{key}" + "key": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=" } } }, @@ -468,11 +458,11 @@ }, "examples":{ "application/json": { - "primaryAuthEndpoint": "{primary-auth-endpoint}", - "secondaryAuthEndpoint": "{secondaryAuthEndpoint}", - "primaryKey": "{primaryKey}", - "secondaryKey": "{secondaryKey}", - "scope": "{scope}" + "primaryAuthEndpoint": "https://wamsprodglobal001acs.accesscontrol.windows.net/", + "secondaryAuthEndpoint": "https://wamsprodglobal002acs.accesscontrol.windows.net/", + "primaryKey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=", + "secondaryKey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=", + "scope": "urn:windowsazuremediaservices" } } }, @@ -532,6 +522,10 @@ "definitions": { "ApiEndpoint": { "description": "The properties for a Media Services REST API endpoint.", + "example": { + "endpoint":"https://wamsbayclus001rest-hs.cloudapp.net/api/", + "majorVersion":"2" + }, "properties": { "endpoint": { "description": "The Media Services REST endpoint.", @@ -545,6 +539,12 @@ }, "ApiError": { "description": "The error returned from a failed Media Services REST API call.", + "example": { + "error": { + "code": "BadRequest", + "message": "Name availability check is not supported for type Microsoft.Media/mediaservices." + } + }, "properties": { "code": { "description": "Error code.", @@ -558,6 +558,10 @@ }, "CheckNameAvailabilityInput": { "description": "The request body for CheckNameAvailability API.", + "example": { + "name":"contosomedia", + "type":"mediaservices" + }, "required": [ "name", "type" @@ -574,13 +578,6 @@ "description": "The type of the resource - mediaservices.", "$ref": "#/definitions/ResourceType" } - }, - "example": { - "application/json": - { - "name":"{name}", - "type":"mediaservices" - } } }, "ResourceType": { @@ -597,6 +594,25 @@ }, "CheckNameAvailabilityOutput": { "description": "The response body for CheckNameAvailability API.", + "example": { + "value": [ + { + "NameAvailable": true, + "Reason": null, + "Message": null + }, + { + "NameAvailable": false, + "Reason": "AlreadyExists", + "Message": "Already in use by another Media Service instance. Please try again with a name that is not likely to be in use." + }, + { + "NameAvailable": false, + "Reason": "Invalid", + "Message": "The media service name should be between 3 and 24 characters and may contain only lowercase letters and numbers." + } + ] + }, "properties": { "NameAvailable": { "description": "Specifies if the name is available.", @@ -623,6 +639,17 @@ }, "MediaService": { "description": "The properties of a Media Service resource.", + "example": { + "location": "West US", + "properties": { + "storageAccounts": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso-media/providers/Microsoft.Storage/storageAccounts/contosomedia", + "isPrimary": true + } + ] + } + }, "properties": { "name": { "description": "Then name of the Media Service resource.", @@ -680,6 +707,9 @@ }, "RegenerateKeyInput": { "description": "The request body for a RegenerateKey API.", + "example": { + "keyType": "Primary" + }, "properties": { "keyType": { "description": "The keyType indicating which key you want to regenerate, Primary or Secondary.", @@ -700,6 +730,9 @@ }, "RegenerateKeyOutput": { "description": "The response body for a RegenerateKey API.", + "example": { + "key": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=" + }, "properties": { "key": { "description": "The new value of either the primary or secondary key.", @@ -730,21 +763,28 @@ }, "ServiceKeys": { "description": "The response body for a ListKeys API.", + "example": { + "primaryAuthEndpoint": "https://wamsprodglobal001acs.accesscontrol.windows.net/", + "secondaryAuthEndpoint": "https://wamsprodglobal002acs.accesscontrol.windows.net/", + "primaryKey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=", + "secondaryKey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=", + "scope": "urn:windowsazuremediaservices" + }, "properties": { "primaryAuthEndpoint": { - "description": "The primary Authorization endpoint.", + "description": "The primary authorization endpoint.", "type": "string" }, "secondaryAuthEndpoint": { - "description": "The secondary Authorization endpoint.", + "description": "The secondary authorization endpoint.", "type": "string" }, "primaryKey": { - "description": "The primary resource.", + "description": "The primary key for the Media Service resource.", "type": "string" }, "secondaryKey": { - "description": "The secondary resource.", + "description": "The secondary key for the Media Service resource.", "type": "string" }, "scope": { @@ -755,19 +795,26 @@ }, "StorageAccount": { "description": "The properties of a storage account associated with this resource.", + "example": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso-media/providers/Microsoft.Storage/storageAccounts/contosomedia", + "isPrimary": true + }, "properties": { "id": { - "description": "The id of the storage account resource.", + "description": "The id of the storage account resource. Media Services relies on tables and queues as well as blobs, so the primary storage account must be a Standard Storage account (either Microsoft.ClassicStorage or Microsoft.Storage). Blob only storage accounts can be added as secondary storage accounts (isPrimary false).", "type": "string" }, "isPrimary": { - "description": "Is this storage account resource the primary storage account for the Media Service resource.", + "description": "Is this storage account resource the primary storage account for the Media Service resource. Blob only storage must set this to false.", "type": "boolean" } } }, "SyncStorageKeysInput": { "description": "The request body for a SyncStorageKeys API.", + "example": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso-media/providers/Microsoft.Storage/storageAccounts/contosomedia" + }, "required": [ "id" ], From 27aeb8bf538fb2846c4f71afa78a7304e182996e Mon Sep 17 00:00:00 2001 From: Brian Blum Date: Thu, 17 Nov 2016 07:36:36 -0800 Subject: [PATCH 7/7] Fix responses and examples and remove internal class definition --- .../2015-10-01/swagger/media.json | 87 +++++++------------ 1 file changed, 29 insertions(+), 58 deletions(-) diff --git a/arm-mediaservices/2015-10-01/swagger/media.json b/arm-mediaservices/2015-10-01/swagger/media.json index 9c69f7d9eb9c..249a30057bef 100644 --- a/arm-mediaservices/2015-10-01/swagger/media.json +++ b/arm-mediaservices/2015-10-01/swagger/media.json @@ -68,9 +68,9 @@ "application/json": { "value": [ { - "NameAvailable": false, - "Reason": "AlreadyExists", - "Message": "Already in use by another Media Service instance. Please try again with a name that is not likely to be in use." + "nameAvailable": false, + "reason": "AlreadyExists", + "message": "Already in use by another Media Service instance. Please try again with a name that is not likely to be in use." } ] } @@ -117,7 +117,6 @@ "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso-media/providers/Microsoft.Media/mediaservices/contosomedia", "type": "Microsoft.Media/mediaservices", "location": "West US", - "tags":null, "properties":{ "apiEndpoints":[ { @@ -182,7 +181,6 @@ "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso-media/providers/Microsoft.Media/mediaservices/contosomedia", "type": "Microsoft.Media/mediaservices", "location": "West US", - "tags":null, "properties":{ "apiEndpoints":[ { @@ -249,7 +247,6 @@ "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso-media/providers/Microsoft.Media/mediaservices/contosomedia", "type": "Microsoft.Media/mediaservices", "location": "West US", - "tags":null, "properties":{ "apiEndpoints":[ { @@ -351,7 +348,6 @@ "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso-media/providers/Microsoft.Media/mediaservices/contosomedia", "type": "Microsoft.Media/mediaservices", "location": "West US", - "tags":null, "properties":{ "apiEndpoints":[ { @@ -582,7 +578,6 @@ }, "ResourceType": { "description": "Type of MediaService resource.", - "readOnly": true, "enum": [ "mediaservices" ], @@ -597,28 +592,26 @@ "example": { "value": [ { - "NameAvailable": true, - "Reason": null, - "Message": null + "nameAvailable": true }, { - "NameAvailable": false, - "Reason": "AlreadyExists", - "Message": "Already in use by another Media Service instance. Please try again with a name that is not likely to be in use." + "nameAvailable": false, + "reason": "AlreadyExists", + "message": "Already in use by another Media Service instance. Please try again with a name that is not likely to be in use." }, { - "NameAvailable": false, - "Reason": "Invalid", - "Message": "The media service name should be between 3 and 24 characters and may contain only lowercase letters and numbers." + "nameAvailable": false, + "reason": "Invalid", + "message": "The media service name should be between 3 and 24 characters and may contain only lowercase letters and numbers." } ] }, "properties": { - "NameAvailable": { + "nameAvailable": { "description": "Specifies if the name is available.", "type": "boolean" }, - "Reason": { + "reason": { "description": "Specifies the reason if the name is not available.", "type": "string", "enum": [ @@ -631,7 +624,7 @@ "modelAsString": false } }, - "Message": { + "message": { "description": "Specifies the detailed reason if the name is not available.", "type": "string" } @@ -651,18 +644,6 @@ } }, "properties": { - "name": { - "description": "Then name of the Media Service resource.", - "type": "string" - }, - "id": { - "description": "The Azure Resource Manager identifier.", - "type": "string" - }, - "type": { - "description": "The type of the Media Service resource.", - "type": "string" - }, "properties": { "x-ms-client-flatten": true, "$ref": "#/definitions/MediaServiceProperties" @@ -670,7 +651,7 @@ }, "allOf": [ { - "$ref": "#/definitions/TrackedResource" + "$ref": "#/definitions/Resource" } ] }, @@ -757,6 +738,17 @@ "description": "The type of the resource", "readOnly": true, "type": "string" + }, + "location": { + "type": "string", + "description": "The geographic location of the resource. This must be one of the supported and registered Azure Geo Regions (for example, West US, East US, Southeast Asia, and so forth)." + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Tags to help categorize the resource in the Azure portal." } }, "x-ms-azure-resource": true @@ -799,6 +791,10 @@ "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso-media/providers/Microsoft.Storage/storageAccounts/contosomedia", "isPrimary": true }, + "required": [ + "id", + "isPrimary" + ], "properties": { "id": { "description": "The id of the storage account resource. Media Services relies on tables and queues as well as blobs, so the primary storage account must be a Standard Storage account (either Microsoft.ClassicStorage or Microsoft.Storage). Blob only storage accounts can be added as secondary storage accounts (isPrimary false).", @@ -824,31 +820,6 @@ "type": "string" } } - }, - "TrackedResource": { - "description": "ARM tracked resource", - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/Resource" - } - ], - "required": [ - "location" - ], - "properties": { - "location": { - "description": "The location of the resource.", - "type": "string" - }, - "tags": { - "description": "The tags of the resource.", - "type": "object", - "additionalProperties": { - "type": "string" - } - } - } } }, "parameters": {