Get Azure Resources Excluded from Azure SQL Backup Policy

In this article

    You can get Azure resources excluded from a backup policy with the specified ID.

    Request

    To retrieve information on excluded Azure resources, send the HTTP GET request to the /policies/{policyId}/excludedItems endpoint. {policyId} is a system ID assigned to the backup policy in the Veeam Backup for Microsoft Azure REST API.

    HTTP Request

    GET https://<hostname>/api/v3/policies/{policyId}/excludedItems

    Query Parameters

    To control the amount and order of data in the response, you can use Offset, Limit, NameSearchPattern and the following query parameters.

    Request Headers

    The request contains the following headers.

    Header

    Required

    Value

    Description

    Authorization

    Required

    Bearer <Access-Token>

    Authenticates a client who sends the request to the server. Must contain the access token for the current logon session in the Bearer <Access-Token> format.

    Response

    The server returns the following response to the client.

    Response Codes

    A successfully completed operation returns a response code 200 (OK).

    Response Headers

    The response to this request contains the following headers. The response may also include additional standard HTTP headers.

    Header

    Value

    Description

    Content-length

    integer

    Identifies the length of the response body message, in bytes.

    Content-type

    • application/json
    • application/problem+json

    Identifies the media type of the response body message.

    Response Body

    In the response body, Veeam Backup for Microsoft Azure returns a list of all Azure resources excluded from the backup policy with the specified ID. The Policyv3 schema is used for the collection representation.

    Get Azure Resources Excluded from Azure SQL Backup PolicyExample

    The following request returns information on all Azure resources excluded from a backup policy with the ID 406c92ee-7d88-47ab-9c35-d4099d137396.

    Request:

    GET https://51.11.247.127/api/v3/policies/406c92ee-7d88-47ab-9c35-d4099d137396/excludedItems

     

    Request Header:

    Authorization: Bearer <Access-Token>

     

    Response:

    200

     

    Response Body:

    {

     "offset": 0,

     "limit": 200,

     "totalCount": 1,

     "results": [

       {

         "database": {

           "id": "5fom7tmdwcpdao7cp543rhwqbssjcrqym1nmrycfoyzc7459ab7o",

           "resourceId": "/subscriptions/254321a2-220d-45c9-92dd-82b6d5a3a78f/resourcegroups/res_uk/providers/microsoft.sql/servers/uk-sqlserver/databases/sql_db",

           "name": "database_backup",

           "serverName": "sqlserver003",

           "serverId": "4kioybm4csays31p54ygwssoshscit5p1zhmq57cue1contybfcy",

           "resourceGroupName": "res_uk",

           "sizeInMb": 32768,

           "subscriptionId": "254321a2-220d-45c9-92dd-82b6d5a3a78f",

           "regionId": "uksouth",

           "hasElasticPool": false,

           "status": "Online",

           "databaseType": "Unmanaged",

           "_embeddedResources": {

             "subscription": {

               "id": "254321a2-220d-45c9-92dd-82b6d5a3a78f",

               "environment": "Global",

               "tenantId": "53438793-c913-4a51-8485-d33056db7b9b",

               "tenantName": "Veeam Software Group GmbH",

               "name": "Enterprise - Dept",

               "status": "Active",

               "_links": {

                 "self": {

                   "href": "https://51.11.247.127/api/v3/cloudInfrastructure/subscriptions/254321a2-220d-45c9-92dd-82b6d5a3a78f"

                 },

                 "storageaccounts": {

                   "href": "https://51.11.247.127/api/v3/cloudInfrastructure/storageAccounts?subscriptionId=254321a2-220d-45c9-92dd-82b6d5a3a78f&repositoryCompatible=False&vhdCompatible=False"

                 }

               }

             },

             "region": {

               "id": "uksouth",

               "name": "UK South"

             },

             "resourceGroup": {

               "id": "6k9q3biyjy5nm543uzkng5skd56e91agxi81gwru4hfecdd6a9my",

               "resourceId": "/subscriptions/254321a2-220d-45c9-92dd-82b6d5a3a78f/resourcegroups/res_uk",

               "name": "res_uk",

               "azureEnvironment": "Global",

               "subscriptionId": "243221a2-220d-45c9-92dd-82b6d5a3a78f",

               "regionId": "uksouth",

               "_links": {

                 "subscription": {

                   "href": "https://51.11.247.127/api/v3/cloudInfrastructure/subscriptions/243221a2-220d-45c9-92dd-82b6d5a3a78f"

                 },

                 "self": {

                   "href": "https://51.11.247.127/api/v3/cloudInfrastructure/resourceGroups/6k9q3biyjy5nm174uzkng5skd56e91agxi81gwru4hfecdd6a9my"

                 }

               }

             },

             "server": {

               "id": "4kioybm4csays31p43ygwssoshscit5p1zhmq57cue1contybfcy",

               "name": "sqlServer",

               "resourceId": "/subscriptions/253421a2-220d-45c9-92dd-82b6d5a3a78f/resourcegroups/jf_uk/providers/microsoft.sql/servers/sqlServer",

               "subscriptionId": "280921a2-220d-45c9-92dd-82b6d5a3a78f",

               "regionId": "uksouth",

               "serverType": "Unmanaged",

               "_links": {

                 "self": {

                   "href": "https://51.11.247.127/api/v3/cloudInfrastructure/sqlServers/4kioybm4csays31p85ygwssoshscit5p1zhmq57cue1contybfcy"

                 }

               }

             }

           },

           "_links": {

             "self": {

               "href": "https://51.11.247.127/api/v3/databases/5fom7hgfwcpdao4cp693rhwqbssjcrqym1nmrycfoyzc7459ab7o?expand=Subscription&expand=ResourceGroup&expand=Region&expand=Server"

             }

           }

         }

       }

     ],

     "_links": {

       "self": {

         "href": "https://51.11.247.127/api/v3/policies/sql/b432762c-938d-41a5-8fff-1bcf11de66fb/excludedItems?offset=0&limit=200"

       }

     }

    }