{
  "swagger": "2.0",
  "schemes": [
    "https"
  ],
  "host": "azure.local",
  "info": {
    "description": "This Swagger was generated by the API Framework.",
    "title": "Azure Media Services",
    "version": "2018-03-30-preview",
    "x-apisguru-categories": [
      "cloud"
    ],
    "x-logo": {
      "url": "https://api.apis.guru/v2/cache/logo/https_assets.onestore.ms_cdnfiles_onestorerolling-1606-01000_shell_v3_images_logo_microsoft.png"
    },
    "x-origin": [
      {
        "format": "swagger",
        "url": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/mediaservices/resource-manager/Microsoft.Media/preview/2018-03-30-preview/Accounts.json",
        "version": "2.0"
      }
    ],
    "x-preferred": false,
    "x-providerName": "azure.com",
    "x-serviceName": "mediaservices-Accounts",
    "x-tags": [
      "Azure",
      "Microsoft"
    ]
  },
  "consumes": [
    "application/json"
  ],
  "produces": [
    "application/json"
  ],
  "securityDefinitions": {
    "azure_auth": {
      "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
      "description": "Azure Active Directory OAuth2 Flow",
      "flow": "implicit",
      "scopes": {
        "user_impersonation": "Impersonate your user account"
      },
      "type": "oauth2"
    }
  },
  "parameters": {
    "ApiVersion": {
      "description": "The Version of the API to be used with the client request.",
      "in": "query",
      "name": "api-version",
      "required": true,
      "type": "string"
    },
    "ResourceGroupName": {
      "description": "The name of the resource group within the Azure subscription.",
      "in": "path",
      "name": "resourceGroupName",
      "required": true,
      "type": "string",
      "x-ms-parameter-location": "method"
    },
    "SubscriptionId": {
      "description": "The unique identifier for a Microsoft Azure subscription.",
      "in": "path",
      "name": "subscriptionId",
      "required": true,
      "type": "string"
    }
  },
  "paths": {
    "/providers/Microsoft.Media/operations": {
      "get": {
        "description": "Lists all the Media Services operations.",
        "operationId": "Operations_List",
        "parameters": [
          {
            "$ref": "#/parameters/ApiVersion"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/OperationCollection"
            }
          },
          "default": {
            "description": "Detailed error information.",
            "schema": {
              "description": "The API error.",
              "properties": {
                "error": {
                  "description": "Information about an error.",
                  "properties": {
                    "code": {
                      "description": "A language-independent error name.",
                      "type": "string"
                    },
                    "details": {
                      "description": "The error details.",
                      "items": {
                        "$ref": "#/definitions/ODataError"
                      },
                      "type": "array"
                    },
                    "message": {
                      "description": "The error message.",
                      "type": "string"
                    },
                    "target": {
                      "description": "The target of the error (for example, the name of the property in error).",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              },
              "type": "object"
            }
          }
        },
        "summary": "List Operations",
        "x-ms-examples": {
          "List Operations": {
            "parameters": {
              "api-version": "2018-03-30-preview",
              "resourceGroupName": "contoso",
              "subscriptionId": "00000000-0000-0000-0000-000000000000"
            },
            "responses": {
              "200": {
                "body": {
                  "value": [
                    {
                      "display": {
                        "description": "Registers the subscription for the Media Services resource provider and enables the creation of Media Services accounts",
                        "operation": "Registers the Media Services Resource Provider",
                        "provider": "Microsoft Media Services",
                        "resource": "Microsoft Media Services"
                      },
                      "name": "Microsoft.Media/register/action"
                    },
                    {
                      "display": {
                        "description": "Checks if a Media Services account name is available",
                        "operation": "Check Name Availability",
                        "provider": "Microsoft Media Services",
                        "resource": "Microsoft Media Services"
                      },
                      "name": "Microsoft.Media/checknameavailability/action"
                    },
                    {
                      "display": {
                        "description": "Read any Media Services Account",
                        "operation": "Read Media Services Account",
                        "provider": "Microsoft Media Services",
                        "resource": "Available Operations"
                      },
                      "name": "Microsoft.Media/operations/read"
                    },
                    {
                      "display": {
                        "description": "Read any Media Services Account",
                        "operation": "Read Media Services Account",
                        "provider": "Microsoft Media Services",
                        "resource": "Media Services Account"
                      },
                      "name": "Microsoft.Media/mediaservices/read"
                    },
                    {
                      "display": {
                        "description": "Create or Update any Media Services Account",
                        "operation": "Create or Update Media Services Account",
                        "provider": "Microsoft Media Services",
                        "resource": "Media Services Account"
                      },
                      "name": "Microsoft.Media/mediaservices/write"
                    },
                    {
                      "display": {
                        "description": "Delete any Media Services Account",
                        "operation": "Delete Media Services Account",
                        "provider": "Microsoft Media Services",
                        "resource": "Media Services Account"
                      },
                      "name": "Microsoft.Media/mediaservices/delete"
                    },
                    {
                      "display": {
                        "description": "Read any Asset",
                        "operation": "Read Asset",
                        "provider": "Microsoft Media Services",
                        "resource": "Asset"
                      },
                      "name": "Microsoft.Media/mediaservices/assets/read"
                    },
                    {
                      "display": {
                        "description": "Create or Update any Asset",
                        "operation": "Create or Update Asset",
                        "provider": "Microsoft Media Services",
                        "resource": "Asset"
                      },
                      "name": "Microsoft.Media/mediaservices/assets/write"
                    },
                    {
                      "display": {
                        "description": "Delete any Asset",
                        "operation": "Delete Asset",
                        "provider": "Microsoft Media Services",
                        "resource": "Asset"
                      },
                      "name": "Microsoft.Media/mediaservices/assets/delete"
                    },
                    {
                      "display": {
                        "description": "List Asset Container SAS URLs",
                        "operation": "List Asset Container SAS URLs",
                        "provider": "Microsoft Media Services",
                        "resource": "Asset"
                      },
                      "name": "Microsoft.Media/mediaservices/assets/listContainerSas/action"
                    },
                    {
                      "display": {
                        "description": "Get Asset Encryption Key",
                        "operation": "Get Asset Encryption Key",
                        "provider": "Microsoft Media Services",
                        "resource": "Asset"
                      },
                      "name": "Microsoft.Media/mediaservices/assets/getEncryptionKey/action"
                    },
                    {
                      "display": {
                        "description": "Read any Streaming Policy",
                        "operation": "Read Streaming Policy",
                        "provider": "Microsoft Media Services",
                        "resource": "Streaming Policy"
                      },
                      "name": "Microsoft.Media/mediaservices/streamingPolicies/read"
                    },
                    {
                      "display": {
                        "description": "Create or Update any Streaming Policy",
                        "operation": "Create or Update Streaming Policy",
                        "provider": "Microsoft Media Services",
                        "resource": "Streaming Policy"
                      },
                      "name": "Microsoft.Media/mediaservices/streamingPolicies/write"
                    },
                    {
                      "display": {
                        "description": "Delete any Streaming Policy",
                        "operation": "Delete Streaming Policy",
                        "provider": "Microsoft Media Services",
                        "resource": "Streaming Policy"
                      },
                      "name": "Microsoft.Media/mediaservices/streamingPolicies/delete"
                    },
                    {
                      "display": {
                        "description": "Read any Streaming Locator",
                        "operation": "Read Streaming Locator",
                        "provider": "Microsoft Media Services",
                        "resource": "Streaming Locator"
                      },
                      "name": "Microsoft.Media/mediaservices/streamingLocators/read"
                    },
                    {
                      "display": {
                        "description": "Create or Update any Streaming Locator",
                        "operation": "Create or Update Streaming Locator",
                        "provider": "Microsoft Media Services",
                        "resource": "Streaming Locator"
                      },
                      "name": "Microsoft.Media/mediaservices/streamingLocators/write"
                    },
                    {
                      "display": {
                        "description": "Delete any Streaming Locator",
                        "operation": "Delete Streaming Locator",
                        "provider": "Microsoft Media Services",
                        "resource": "Streaming Locator"
                      },
                      "name": "Microsoft.Media/mediaservices/streamingLocators/delete"
                    },
                    {
                      "display": {
                        "description": "List Content Keys",
                        "operation": "List Content Keys",
                        "provider": "Microsoft Media Services",
                        "resource": "Streaming Locator"
                      },
                      "name": "Microsoft.Media/mediaservices/streamingLocators/listContentKeys/action"
                    },
                    {
                      "display": {
                        "description": "List Paths",
                        "operation": "List Paths",
                        "provider": "Microsoft Media Services",
                        "resource": "Streaming Locator"
                      },
                      "name": "Microsoft.Media/mediaservices/streamingLocators/listPaths/action"
                    },
                    {
                      "display": {
                        "description": "Read any Content Key Policy",
                        "operation": "Read Content Key Policy",
                        "provider": "Microsoft Media Services",
                        "resource": "Content Key Policy"
                      },
                      "name": "Microsoft.Media/mediaservices/contentKeyPolicies/read"
                    },
                    {
                      "display": {
                        "description": "Create or Update any Content Key Policy",
                        "operation": "Create or Update Content Key Policy",
                        "provider": "Microsoft Media Services",
                        "resource": "Content Key Policy"
                      },
                      "name": "Microsoft.Media/mediaservices/contentKeyPolicies/write"
                    },
                    {
                      "display": {
                        "description": "Delete any Content Key Policy",
                        "operation": "Delete Content Key Policy",
                        "provider": "Microsoft Media Services",
                        "resource": "Content Key Policy"
                      },
                      "name": "Microsoft.Media/mediaservices/contentKeyPolicies/delete"
                    },
                    {
                      "display": {
                        "description": "Get Policy Properties With Secrets",
                        "operation": "Get Policy Properties With Secrets",
                        "provider": "Microsoft Media Services",
                        "resource": "Content Key Policy"
                      },
                      "name": "Microsoft.Media/mediaservices/contentKeyPolicies/getPolicyPropertiesWithSecrets/action"
                    },
                    {
                      "display": {
                        "description": "Read any Transform",
                        "operation": "Read Transform",
                        "provider": "Microsoft Media Services",
                        "resource": "Transform"
                      },
                      "name": "Microsoft.Media/mediaservices/transforms/read"
                    },
                    {
                      "display": {
                        "description": "Create or Update any Transform",
                        "operation": "Create or Update Transform",
                        "provider": "Microsoft Media Services",
                        "resource": "Transform"
                      },
                      "name": "Microsoft.Media/mediaservices/transforms/write"
                    },
                    {
                      "display": {
                        "description": "Delete any Transform",
                        "operation": "Delete Transform",
                        "provider": "Microsoft Media Services",
                        "resource": "Transform"
                      },
                      "name": "Microsoft.Media/mediaservices/transforms/delete"
                    },
                    {
                      "display": {
                        "description": "Read any Job",
                        "operation": "Read Job",
                        "provider": "Microsoft Media Services",
                        "resource": "Job"
                      },
                      "name": "Microsoft.Media/mediaservices/transforms/jobs/read"
                    },
                    {
                      "display": {
                        "description": "Create or Update any Job",
                        "operation": "Create or Update Job",
                        "provider": "Microsoft Media Services",
                        "resource": "Job"
                      },
                      "name": "Microsoft.Media/mediaservices/transforms/jobs/write"
                    },
                    {
                      "display": {
                        "description": "Delete any Job",
                        "operation": "Delete Job",
                        "provider": "Microsoft Media Services",
                        "resource": "Job"
                      },
                      "name": "Microsoft.Media/mediaservices/transforms/jobs/delete"
                    },
                    {
                      "display": {
                        "description": "Cancel Job",
                        "operation": "Cancel Job",
                        "provider": "Microsoft Media Services",
                        "resource": "Job"
                      },
                      "name": "Microsoft.Media/mediaservices/transforms/jobs/cancelJob/action"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-ms-pageable": {
          "nextLinkName": "@odata.nextLink"
        }
      }
    },
    "/subscriptions/{subscriptionId}/providers/Microsoft.Media/locations/{locationName}/checkNameAvailability": {
      "post": {
        "description": "Checks whether the Media Service resource name is available.",
        "operationId": "Locations_CheckNameAvailability",
        "parameters": [
          {
            "$ref": "#/parameters/SubscriptionId"
          },
          {
            "in": "path",
            "name": "locationName",
            "required": true,
            "type": "string"
          },
          {
            "description": "The request parameters",
            "in": "body",
            "name": "parameters",
            "required": true,
            "schema": {
              "$ref": "#/definitions/CheckNameAvailabilityInput"
            }
          },
          {
            "$ref": "#/parameters/ApiVersion"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/EntityNameAvailabilityCheckOutput"
            }
          },
          "default": {
            "description": "Detailed error information.",
            "schema": {
              "description": "The API error.",
              "properties": {
                "error": {
                  "description": "Information about an error.",
                  "properties": {
                    "code": {
                      "description": "A language-independent error name.",
                      "type": "string"
                    },
                    "details": {
                      "description": "The error details.",
                      "items": {
                        "$ref": "#/definitions/ODataError"
                      },
                      "type": "array"
                    },
                    "message": {
                      "description": "The error message.",
                      "type": "string"
                    },
                    "target": {
                      "description": "The target of the error (for example, the name of the property in error).",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              },
              "type": "object"
            }
          }
        },
        "summary": "Check Name Availability",
        "x-ms-examples": {
          "Check Name Availability": {
            "parameters": {
              "api-version": "2018-03-30-preview",
              "locationName": "japaneast",
              "parameters": {
                "name": "contosonew",
                "type": "Microsoft.Media/MediaService"
              },
              "subscriptionId": "00000000-0000-0000-0000-000000000000"
            },
            "responses": {
              "200": {
                "body": {
                  "message": "",
                  "nameAvailable": true,
                  "reason": "None"
                }
              }
            }
          }
        }
      }
    },
    "/subscriptions/{subscriptionId}/providers/Microsoft.Media/mediaservices": {
      "get": {
        "description": "List Media Services accounts in the subscription.",
        "operationId": "Mediaservices_ListBySubscription",
        "parameters": [
          {
            "$ref": "#/parameters/SubscriptionId"
          },
          {
            "$ref": "#/parameters/ApiVersion"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/SubscriptionMediaServiceCollection"
            }
          },
          "default": {
            "description": "Detailed error information.",
            "schema": {
              "description": "The API error.",
              "properties": {
                "error": {
                  "description": "Information about an error.",
                  "properties": {
                    "code": {
                      "description": "A language-independent error name.",
                      "type": "string"
                    },
                    "details": {
                      "description": "The error details.",
                      "items": {
                        "$ref": "#/definitions/ODataError"
                      },
                      "type": "array"
                    },
                    "message": {
                      "description": "The error message.",
                      "type": "string"
                    },
                    "target": {
                      "description": "The target of the error (for example, the name of the property in error).",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              },
              "type": "object"
            }
          }
        },
        "summary": "List Media Services accounts",
        "x-ms-examples": {
          "List all Media Services accounts": {
            "parameters": {
              "api-version": "2018-03-30-preview",
              "resourceGroupName": "contoso",
              "subscriptionId": "00000000-0000-0000-0000-000000000000"
            },
            "responses": {
              "200": {
                "body": {
                  "value": [
                    {
                      "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosotv",
                      "location": "South Central US",
                      "name": "contosotv",
                      "properties": {
                        "mediaServiceId": "6ac94f91-283c-4492-85a7-57976928c17d",
                        "storageAccounts": [
                          {
                            "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Storage/storageAccounts/contosotvstore",
                            "type": "Primary"
                          }
                        ]
                      },
                      "tags": {
                        "key1": "value1",
                        "key2": "value2"
                      },
                      "type": "Microsoft.Media/mediaservices"
                    },
                    {
                      "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomovies",
                      "location": "South Central US",
                      "name": "contosomovies",
                      "properties": {
                        "mediaServiceId": "72681c0f-9dd1-4f1c-95c9-8a8d7d31c4ee",
                        "storageAccounts": [
                          {
                            "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Storage/storageAccounts/contosomoviesstore",
                            "type": "Primary"
                          }
                        ]
                      },
                      "tags": {
                        "key1": "value1",
                        "key2": "value2"
                      },
                      "type": "Microsoft.Media/mediaservices"
                    },
                    {
                      "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/fabrikamnews",
                      "location": "East US",
                      "name": "fabrikamnews",
                      "properties": {
                        "mediaServiceId": "d96036f9-4e37-491d-8c29-5bc53a29dfcd",
                        "storageAccounts": [
                          {
                            "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/fabrikam/providers/Microsoft.Storage/storageAccounts/fabrikamnewsstore",
                            "type": "Primary"
                          }
                        ]
                      },
                      "tags": {
                        "key1": "value1",
                        "key2": "value2"
                      },
                      "type": "Microsoft.Media/mediaservices"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-ms-pageable": {
          "nextLinkName": "@odata.nextLink"
        }
      }
    },
    "/subscriptions/{subscriptionId}/providers/Microsoft.Media/mediaservices/{accountName}": {
      "get": {
        "description": "Get the details of a Media Services account",
        "operationId": "Mediaservices_GetBySubscription",
        "parameters": [
          {
            "$ref": "#/parameters/SubscriptionId"
          },
          {
            "description": "The Media Services account name.",
            "in": "path",
            "name": "accountName",
            "required": true,
            "type": "string"
          },
          {
            "$ref": "#/parameters/ApiVersion"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/SubscriptionMediaService"
            }
          },
          "default": {
            "description": "Detailed error information.",
            "schema": {
              "description": "The API error.",
              "properties": {
                "error": {
                  "description": "Information about an error.",
                  "properties": {
                    "code": {
                      "description": "A language-independent error name.",
                      "type": "string"
                    },
                    "details": {
                      "description": "The error details.",
                      "items": {
                        "$ref": "#/definitions/ODataError"
                      },
                      "type": "array"
                    },
                    "message": {
                      "description": "The error message.",
                      "type": "string"
                    },
                    "target": {
                      "description": "The target of the error (for example, the name of the property in error).",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              },
              "type": "object"
            }
          }
        },
        "summary": "Get a Media Services account",
        "x-ms-examples": {
          "Get a Media Services account by name": {
            "parameters": {
              "accountName": "contososports",
              "api-version": "2018-03-30-preview",
              "resourceGroupName": "contoso",
              "subscriptionId": "00000000-0000-0000-0000-000000000000"
            },
            "responses": {
              "200": {
                "body": {
                  "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contososports",
                  "location": "South Central US",
                  "name": "contososports",
                  "properties": {
                    "mediaServiceId": "42bea25f-1aa9-4f7a-82af-5a417592f22d",
                    "storageAccounts": [
                      {
                        "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Storage/storageAccounts/contososportsstore",
                        "type": "Primary"
                      }
                    ]
                  },
                  "tags": {
                    "key1": "value1",
                    "key2": "value2"
                  },
                  "type": "Microsoft.Media/mediaservices"
                }
              }
            }
          }
        }
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices": {
      "get": {
        "description": "List Media Services accounts in the resource group",
        "operationId": "Mediaservices_List",
        "parameters": [
          {
            "$ref": "#/parameters/SubscriptionId"
          },
          {
            "$ref": "#/parameters/ResourceGroupName"
          },
          {
            "$ref": "#/parameters/ApiVersion"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/MediaServiceCollection"
            }
          },
          "default": {
            "description": "Detailed error information.",
            "schema": {
              "description": "The API error.",
              "properties": {
                "error": {
                  "description": "Information about an error.",
                  "properties": {
                    "code": {
                      "description": "A language-independent error name.",
                      "type": "string"
                    },
                    "details": {
                      "description": "The error details.",
                      "items": {
                        "$ref": "#/definitions/ODataError"
                      },
                      "type": "array"
                    },
                    "message": {
                      "description": "The error message.",
                      "type": "string"
                    },
                    "target": {
                      "description": "The target of the error (for example, the name of the property in error).",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              },
              "type": "object"
            }
          }
        },
        "summary": "List Media Services accounts",
        "x-ms-examples": {
          "List all Media Services accounts": {
            "parameters": {
              "api-version": "2018-03-30-preview",
              "resourceGroupName": "contoso",
              "subscriptionId": "00000000-0000-0000-0000-000000000000"
            },
            "responses": {
              "200": {
                "body": {
                  "value": [
                    {
                      "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosotv",
                      "location": "South Central US",
                      "name": "contosotv",
                      "properties": {
                        "mediaServiceId": "6ac94f91-283c-4492-85a7-57976928c17d",
                        "storageAccounts": [
                          {
                            "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Storage/storageAccounts/contosotvstore",
                            "type": "Primary"
                          }
                        ]
                      },
                      "tags": {
                        "key1": "value1",
                        "key2": "value2"
                      },
                      "type": "Microsoft.Media/mediaservices"
                    },
                    {
                      "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomovies",
                      "location": "South Central US",
                      "name": "contosomovies",
                      "properties": {
                        "mediaServiceId": "72681c0f-9dd1-4f1c-95c9-8a8d7d31c4ee",
                        "storageAccounts": [
                          {
                            "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Storage/storageAccounts/contosomoviesstore",
                            "type": "Primary"
                          }
                        ]
                      },
                      "tags": {
                        "key1": "value1",
                        "key2": "value2"
                      },
                      "type": "Microsoft.Media/mediaservices"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-ms-pageable": {
          "nextLinkName": "@odata.nextLink"
        }
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}": {
      "delete": {
        "description": "Deletes a Media Services account",
        "operationId": "Mediaservices_Delete",
        "parameters": [
          {
            "$ref": "#/parameters/SubscriptionId"
          },
          {
            "$ref": "#/parameters/ResourceGroupName"
          },
          {
            "description": "The Media Services account name.",
            "in": "path",
            "name": "accountName",
            "required": true,
            "type": "string"
          },
          {
            "$ref": "#/parameters/ApiVersion"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "default": {
            "description": "Detailed error information.",
            "schema": {
              "description": "The API error.",
              "properties": {
                "error": {
                  "description": "Information about an error.",
                  "properties": {
                    "code": {
                      "description": "A language-independent error name.",
                      "type": "string"
                    },
                    "details": {
                      "description": "The error details.",
                      "items": {
                        "$ref": "#/definitions/ODataError"
                      },
                      "type": "array"
                    },
                    "message": {
                      "description": "The error message.",
                      "type": "string"
                    },
                    "target": {
                      "description": "The target of the error (for example, the name of the property in error).",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              },
              "type": "object"
            }
          }
        },
        "summary": "Delete a Media Services account.",
        "x-ms-examples": {
          "Delete a Media Services account": {
            "parameters": {
              "accountName": "contososports",
              "api-version": "2018-03-30-preview",
              "resourceGroupName": "contoso",
              "subscriptionId": "00000000-0000-0000-0000-000000000000"
            },
            "responses": {
              "200": {}
            }
          }
        }
      },
      "get": {
        "description": "Get the details of a Media Services account",
        "operationId": "Mediaservices_Get",
        "parameters": [
          {
            "$ref": "#/parameters/SubscriptionId"
          },
          {
            "$ref": "#/parameters/ResourceGroupName"
          },
          {
            "description": "The Media Services account name.",
            "in": "path",
            "name": "accountName",
            "required": true,
            "type": "string"
          },
          {
            "$ref": "#/parameters/ApiVersion"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/MediaService"
            }
          },
          "default": {
            "description": "Detailed error information.",
            "schema": {
              "description": "The API error.",
              "properties": {
                "error": {
                  "description": "Information about an error.",
                  "properties": {
                    "code": {
                      "description": "A language-independent error name.",
                      "type": "string"
                    },
                    "details": {
                      "description": "The error details.",
                      "items": {
                        "$ref": "#/definitions/ODataError"
                      },
                      "type": "array"
                    },
                    "message": {
                      "description": "The error message.",
                      "type": "string"
                    },
                    "target": {
                      "description": "The target of the error (for example, the name of the property in error).",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              },
              "type": "object"
            }
          }
        },
        "summary": "Get a Media Services account",
        "x-ms-examples": {
          "Get a Media Services account by name": {
            "parameters": {
              "accountName": "contosotv",
              "api-version": "2018-03-30-preview",
              "resourceGroupName": "contoso",
              "subscriptionId": "00000000-0000-0000-0000-000000000000"
            },
            "responses": {
              "200": {
                "body": {
                  "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosotv",
                  "location": "South Central US",
                  "name": "contosotv",
                  "properties": {
                    "mediaServiceId": "6ac94f91-283c-4492-85a7-57976928c17d",
                    "storageAccounts": [
                      {
                        "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Storage/storageAccounts/contosotvstore",
                        "type": "Primary"
                      }
                    ]
                  },
                  "tags": {
                    "key1": "value1",
                    "key2": "value2"
                  },
                  "type": "Microsoft.Media/mediaservices"
                }
              }
            }
          }
        }
      },
      "patch": {
        "description": "Updates an existing Media Services account",
        "operationId": "Mediaservices_Update",
        "parameters": [
          {
            "$ref": "#/parameters/SubscriptionId"
          },
          {
            "$ref": "#/parameters/ResourceGroupName"
          },
          {
            "description": "The Media Services account name.",
            "in": "path",
            "name": "accountName",
            "required": true,
            "type": "string"
          },
          {
            "description": "The request parameters",
            "in": "body",
            "name": "parameters",
            "required": true,
            "schema": {
              "$ref": "#/definitions/MediaService"
            }
          },
          {
            "$ref": "#/parameters/ApiVersion"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/MediaService"
            }
          },
          "default": {
            "description": "Detailed error information.",
            "schema": {
              "description": "The API error.",
              "properties": {
                "error": {
                  "description": "Information about an error.",
                  "properties": {
                    "code": {
                      "description": "A language-independent error name.",
                      "type": "string"
                    },
                    "details": {
                      "description": "The error details.",
                      "items": {
                        "$ref": "#/definitions/ODataError"
                      },
                      "type": "array"
                    },
                    "message": {
                      "description": "The error message.",
                      "type": "string"
                    },
                    "target": {
                      "description": "The target of the error (for example, the name of the property in error).",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              },
              "type": "object"
            }
          }
        },
        "summary": "Update a Media Services account",
        "x-ms-examples": {
          "Update a Media Services accounts": {
            "parameters": {
              "accountName": "contososports",
              "api-version": "2018-03-30-preview",
              "parameters": {
                "tags": {
                  "key1": "value3"
                }
              },
              "resourceGroupName": "contoso",
              "subscriptionId": "00000000-0000-0000-0000-000000000000"
            },
            "responses": {
              "200": {
                "body": {
                  "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contososports",
                  "location": "South Central US",
                  "name": "contososports",
                  "properties": {
                    "mediaServiceId": "42bea25f-1aa9-4f7a-82af-5a417592f22d",
                    "storageAccounts": [
                      {
                        "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Storage/storageAccounts/contososportsstore",
                        "type": "Primary"
                      }
                    ]
                  },
                  "tags": {
                    "key1": "value3"
                  },
                  "type": "Microsoft.Media/mediaservices"
                }
              }
            }
          }
        }
      },
      "put": {
        "description": "Creates or updates a Media Services account",
        "operationId": "Mediaservices_CreateOrUpdate",
        "parameters": [
          {
            "$ref": "#/parameters/SubscriptionId"
          },
          {
            "$ref": "#/parameters/ResourceGroupName"
          },
          {
            "description": "The Media Services account name.",
            "in": "path",
            "name": "accountName",
            "required": true,
            "type": "string"
          },
          {
            "description": "The request parameters",
            "in": "body",
            "name": "parameters",
            "required": true,
            "schema": {
              "$ref": "#/definitions/MediaService"
            }
          },
          {
            "$ref": "#/parameters/ApiVersion"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/MediaService"
            }
          },
          "201": {
            "description": "Created",
            "schema": {
              "$ref": "#/definitions/MediaService"
            }
          },
          "default": {
            "description": "Detailed error information.",
            "schema": {
              "description": "The API error.",
              "properties": {
                "error": {
                  "description": "Information about an error.",
                  "properties": {
                    "code": {
                      "description": "A language-independent error name.",
                      "type": "string"
                    },
                    "details": {
                      "description": "The error details.",
                      "items": {
                        "$ref": "#/definitions/ODataError"
                      },
                      "type": "array"
                    },
                    "message": {
                      "description": "The error message.",
                      "type": "string"
                    },
                    "target": {
                      "description": "The target of the error (for example, the name of the property in error).",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              },
              "type": "object"
            }
          }
        },
        "summary": "Create or update a Media Services account",
        "x-ms-examples": {
          "Create a Media Services account": {
            "parameters": {
              "accountName": "contososports",
              "api-version": "2018-03-30-preview",
              "parameters": {
                "location": "South Central US",
                "properties": {
                  "storageAccounts": [
                    {
                      "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Storage/storageAccounts/contososportsstore",
                      "type": "Primary"
                    }
                  ]
                },
                "tags": {
                  "key1": "value1",
                  "key2": "value2"
                }
              },
              "resourceGroupName": "contoso",
              "subscriptionId": "00000000-0000-0000-0000-000000000000"
            },
            "responses": {
              "200": {
                "body": {
                  "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contososports",
                  "location": "South Central US",
                  "name": "contososports",
                  "properties": {
                    "mediaServiceId": "42bea25f-1aa9-4f7a-82af-5a417592f22d",
                    "storageAccounts": [
                      {
                        "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Storage/storageAccounts/contososportsstore",
                        "type": "Primary"
                      }
                    ]
                  },
                  "tags": {
                    "key1": "value1",
                    "key2": "value2"
                  },
                  "type": "Microsoft.Media/mediaservices"
                }
              },
              "201": {
                "body": {
                  "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contososports",
                  "location": "South Central US",
                  "name": "contososports",
                  "properties": {
                    "mediaServiceId": "42bea25f-1aa9-4f7a-82af-5a417592f22d",
                    "storageAccounts": [
                      {
                        "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Storage/storageAccounts/contososportsstore",
                        "type": "Primary"
                      }
                    ]
                  },
                  "tags": {
                    "key1": "value1",
                    "key2": "value2"
                  },
                  "type": "Microsoft.Media/mediaservices"
                }
              }
            }
          }
        }
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/syncStorageKeys": {
      "post": {
        "description": "Synchronizes storage account keys for a storage account associated with the Media Service account.",
        "operationId": "Mediaservices_SyncStorageKeys",
        "parameters": [
          {
            "$ref": "#/parameters/SubscriptionId"
          },
          {
            "$ref": "#/parameters/ResourceGroupName"
          },
          {
            "description": "The Media Services account name.",
            "in": "path",
            "name": "accountName",
            "required": true,
            "type": "string"
          },
          {
            "description": "The request parameters",
            "in": "body",
            "name": "parameters",
            "required": true,
            "schema": {
              "$ref": "#/definitions/SyncStorageKeysInput"
            }
          },
          {
            "$ref": "#/parameters/ApiVersion"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "default": {
            "description": "Detailed error information.",
            "schema": {
              "description": "The API error.",
              "properties": {
                "error": {
                  "description": "Information about an error.",
                  "properties": {
                    "code": {
                      "description": "A language-independent error name.",
                      "type": "string"
                    },
                    "details": {
                      "description": "The error details.",
                      "items": {
                        "$ref": "#/definitions/ODataError"
                      },
                      "type": "array"
                    },
                    "message": {
                      "description": "The error message.",
                      "type": "string"
                    },
                    "target": {
                      "description": "The target of the error (for example, the name of the property in error).",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              },
              "type": "object"
            }
          }
        },
        "summary": "Synchronizes Storage Account Keys",
        "x-ms-examples": {
          "Synchronizes Storage Account Keys": {
            "parameters": {
              "accountName": "contososports",
              "api-version": "2018-03-30-preview",
              "parameters": {
                "id": "contososportsstore"
              },
              "resourceGroupName": "contoso",
              "subscriptionId": "00000000-0000-0000-0000-000000000000"
            },
            "responses": {
              "200": {}
            }
          }
        }
      }
    }
  },
  "definitions": {
    "CheckNameAvailabilityInput": {
      "description": "The input to the check name availability request.",
      "properties": {
        "name": {
          "description": "The account name.",
          "type": "string"
        },
        "type": {
          "description": "The account type. For a Media Services account, this should be 'MediaServices'.",
          "type": "string"
        }
      },
      "type": "object"
    },
    "EntityNameAvailabilityCheckOutput": {
      "description": "The response from the check name availability request.",
      "properties": {
        "message": {
          "description": "Specifies the detailed reason if the name is not available.",
          "type": "string"
        },
        "nameAvailable": {
          "description": "Specifies if the name is available.",
          "type": "boolean"
        },
        "reason": {
          "description": "Specifies the reason if the name is not available.",
          "type": "string"
        }
      },
      "required": [
        "nameAvailable"
      ],
      "type": "object"
    },
    "Location": {
      "properties": {
        "name": {
          "type": "string"
        }
      },
      "required": [
        "name"
      ],
      "type": "object"
    },
    "MediaService": {
      "allOf": [
        {
          "allOf": [
            {
              "description": "The core properties of ARM resources.",
              "properties": {
                "id": {
                  "description": "Fully qualified resource ID for the resource.",
                  "readOnly": true,
                  "type": "string"
                },
                "name": {
                  "description": "The name of the resource.",
                  "readOnly": true,
                  "type": "string"
                },
                "type": {
                  "description": "The type of the resource.",
                  "readOnly": true,
                  "type": "string"
                }
              },
              "x-ms-azure-resource": true
            }
          ],
          "description": "The resource model definition for a ARM tracked resource.",
          "properties": {
            "location": {
              "description": "The Azure Region of the resource.",
              "type": "string",
              "x-ms-mutability": [
                "read",
                "create"
              ]
            },
            "tags": {
              "additionalProperties": {
                "type": "string"
              },
              "description": "Resource tags.",
              "type": "object",
              "x-ms-mutability": [
                "read",
                "create",
                "update"
              ]
            }
          }
        }
      ],
      "description": "A Media Services account.",
      "properties": {
        "properties": {
          "$ref": "#/definitions/MediaServiceProperties",
          "description": "The resource properties.",
          "x-ms-client-flatten": true
        }
      },
      "type": "object"
    },
    "MediaServiceCollection": {
      "description": "A collection of MediaService items.",
      "properties": {
        "@odata.nextLink": {
          "description": "A link to the next page of the collection (when the collection contains too many results to return in one response).",
          "type": "string"
        },
        "value": {
          "description": "A collection of MediaService items.",
          "items": {
            "$ref": "#/definitions/MediaService"
          },
          "type": "array"
        }
      },
      "type": "object"
    },
    "MediaServiceProperties": {
      "description": "Properties of the Media Services account.",
      "properties": {
        "mediaServiceId": {
          "description": "The Media Services account ID.",
          "format": "uuid",
          "readOnly": true,
          "type": "string",
          "x-nullable": false
        },
        "storageAccounts": {
          "description": "The storage accounts for this resource.",
          "items": {
            "$ref": "#/definitions/StorageAccount"
          },
          "type": "array"
        }
      },
      "type": "object"
    },
    "ODataError": {},
    "Operation": {
      "description": "An operation.",
      "properties": {
        "display": {
          "$ref": "#/definitions/OperationDisplay",
          "description": "The operation display name."
        },
        "name": {
          "description": "The operation name.",
          "type": "string"
        }
      },
      "required": [
        "name"
      ],
      "type": "object"
    },
    "OperationCollection": {
      "description": "A collection of Operation items.",
      "properties": {
        "@odata.nextLink": {
          "description": "A link to the next page of the collection (when the collection contains too many results to return in one response).",
          "type": "string"
        },
        "value": {
          "description": "A collection of Operation items.",
          "items": {
            "$ref": "#/definitions/Operation"
          },
          "type": "array"
        }
      },
      "type": "object"
    },
    "OperationDisplay": {
      "description": "Operation details.",
      "properties": {
        "description": {
          "description": "The operation description.",
          "type": "string"
        },
        "operation": {
          "description": "The operation type.",
          "type": "string"
        },
        "provider": {
          "description": "The service provider.",
          "type": "string"
        },
        "resource": {
          "description": "Resource on which the operation is performed.",
          "type": "string"
        }
      },
      "type": "object"
    },
    "Provider": {
      "description": "A resource provider.",
      "properties": {
        "providerName": {
          "description": "The provider name.",
          "type": "string"
        }
      },
      "required": [
        "providerName"
      ],
      "type": "object"
    },
    "StorageAccount": {
      "description": "The storage account details.",
      "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.",
          "type": "string"
        },
        "type": {
          "description": "The type of the storage account.",
          "enum": [
            "Primary",
            "Secondary"
          ],
          "type": "string",
          "x-ms-enum": {
            "modelAsExtensible": true,
            "name": "StorageAccountType",
            "values": [
              {
                "description": "The primary storage account for the Media Services account.",
                "value": "Primary"
              },
              {
                "description": "A secondary storage account for the Media Services account.",
                "value": "Secondary"
              }
            ]
          }
        }
      },
      "required": [
        "type"
      ],
      "type": "object"
    },
    "SubscriptionMediaService": {
      "allOf": [
        {
          "allOf": [
            {
              "description": "The core properties of ARM resources.",
              "properties": {
                "id": {
                  "description": "Fully qualified resource ID for the resource.",
                  "readOnly": true,
                  "type": "string"
                },
                "name": {
                  "description": "The name of the resource.",
                  "readOnly": true,
                  "type": "string"
                },
                "type": {
                  "description": "The type of the resource.",
                  "readOnly": true,
                  "type": "string"
                }
              },
              "x-ms-azure-resource": true
            }
          ],
          "description": "The resource model definition for a ARM tracked resource.",
          "properties": {
            "location": {
              "description": "The Azure Region of the resource.",
              "type": "string",
              "x-ms-mutability": [
                "read",
                "create"
              ]
            },
            "tags": {
              "additionalProperties": {
                "type": "string"
              },
              "description": "Resource tags.",
              "type": "object",
              "x-ms-mutability": [
                "read",
                "create",
                "update"
              ]
            }
          }
        }
      ],
      "description": "A Media Services account.",
      "properties": {
        "properties": {
          "$ref": "#/definitions/MediaServiceProperties",
          "description": "The resource properties.",
          "x-ms-client-flatten": true
        }
      },
      "type": "object"
    },
    "SubscriptionMediaServiceCollection": {
      "description": "A collection of SubscriptionMediaService items.",
      "properties": {
        "@odata.nextLink": {
          "description": "A link to the next page of the collection (when the collection contains too many results to return in one response).",
          "type": "string"
        },
        "value": {
          "description": "A collection of SubscriptionMediaService items.",
          "items": {
            "$ref": "#/definitions/SubscriptionMediaService"
          },
          "type": "array"
        }
      },
      "type": "object"
    },
    "SyncStorageKeysInput": {
      "description": "The input to the sync storage keys request.",
      "properties": {
        "id": {
          "description": "The ID of the storage account resource.",
          "type": "string"
        }
      },
      "type": "object"
    }
  }
}