Share via


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=2023-08-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

ErrorResponse

*** 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=2023-08-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

Name Description
ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

SqlAgentConfiguration

A recoverable managed database resource.

SqlAgentState

The state of Sql Agent.

ErrorAdditionalInfo

The resource management error additional info.

Name Type Description
info

object

The additional info.

type

string

The additional info type.

ErrorDetail

The error detail.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorDetail[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorResponse

Error response

Name Type Description
error

ErrorDetail

The error object.

SqlAgentConfiguration

A recoverable managed database resource.

Name Type Description
id

string

Resource ID.

name

string

Resource name.

properties.state

SqlAgentState

The state of Sql Agent.

type

string

Resource type.

SqlAgentState

The state of Sql Agent.

Value Description
Enabled
Disabled