Sql Agent - Get

Gets current instance sql agent configuration.

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/sqlAgent/current?api-version=2021-11-01

URI Parameters

Name In Required Type Description
managedInstanceName
path True

string

The name of the managed instance.

resourceGroupName
path True

string

The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.

subscriptionId
path True

string

The subscription ID that identifies an Azure subscription.

api-version
query True

string

The API version to use for the request.

Responses

Name Type Description
200 OK

SqlAgentConfiguration

Successfully retrieved current sql agent configuration.

Other Status Codes

*** Error Responses: ***

  • 400 SqlAgentManagedServerNotFound - User tried to configure sql agent of unknown managed instance.

Examples

Gets current instance sql agent configuration.

Sample request

GET https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/sqlAgent/current?api-version=2021-11-01

Sample response

{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/sqlAgent/current",
  "name": "current",
  "type": "Microsoft.Sql/managedInstances/sqlAgent",
  "properties": {
    "state": "Enabled"
  }
}

Definitions

SqlAgentConfiguration

A recoverable managed database resource.

Name Type Description
id

string

Resource ID.

name

string

Resource name.

properties.state enum:
  • Disabled
  • Enabled

The state of Sql Agent.

type

string

Resource type.