Job Agents - Create Or Update

작업 에이전트를 만들거나 업데이트합니다.

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}?api-version=2021-11-01

URI 매개 변수

Name In(다음 안에) 필수 형식 Description
jobAgentName
path True

string

만들거나 업데이트할 작업 에이전트의 이름입니다.

resourceGroupName
path True

string

리소스를 포함하는 리소스 그룹의 이름입니다. Azure 리소스 관리자 API 또는 포털에서 이 값을 가져올 수 있습니다.

serverName
path True

string

서버의 이름입니다.

subscriptionId
path True

string

Azure 구독을 식별하는 구독 ID입니다.

api-version
query True

string

요청에 사용할 API 버전입니다.

요청 본문

Name 필수 형식 Description
location True

string

리소스 위치.

properties.databaseId True

string

작업 메타데이터를 저장할 데이터베이스의 리소스 ID입니다.

sku

Sku

SKU의 이름 및 계층입니다.

tags

object

리소스 태그.

응답

Name 형식 Description
200 OK

JobAgent

작업 에이전트를 업데이트했습니다.

201 Created

JobAgent

작업 에이전트를 만들었습니다.

202 Accepted

수락됨

Other Status Codes

오류 응답: ***

  • 400 InvalidResourceRequestBody - 요청 본문의 리소스 또는 리소스 속성이 비어 있거나 잘못되었습니다.

  • 400 MissingSkuName - Sku 이름이 필요합니다.

  • 400 InvalidDatabaseResourceId - 잘못된 데이터베이스 리소스 식별자입니다.

  • 400 MismatchingSubscriptionWithUrl - 제공된 구독이 URL의 구독과 일치하지 않습니다.

  • 400 MismatchingResourceGroupNameWithUrl - 제공된 리소스 그룹 이름이 URL의 이름과 일치하지 않습니다.

  • 400 MismatchingServerNameWithUrl - 제공된 서버 이름이 URL의 이름과 일치하지 않습니다.

  • 400 JobAgentDatabaseEditionUnsupported - 지정된 데이터베이스의 서비스 수준 목표는 작업 에이전트 데이터베이스로 사용할 수 없습니다.

  • 400 JobAgentDatabaseSecondary - 작업 에이전트를 지역 보조 데이터베이스에 연결할 수 없습니다.

  • 400 JobAgentDatabaseAlreadyLinked - 지정된 데이터베이스가 이미 다른 작업 에이전트에 연결되어 있습니다.

  • 400 DatabaseDoesNotExist - 요청된 데이터베이스를 찾을 수 없습니다.

  • 400 CannotUseReservedDatabaseName - 이 작업에서 예약된 데이터베이스 이름을 사용할 수 없습니다.

  • 400 JobAgentExceededQuota - 할당량을 초과하므로 작업 에이전트를 만들 수 없습니다.

  • 400 JobAgentAlreadyExists - 작업 에이전트가 서버에 이미 있습니다.

  • 404 SubscriptionDoesNotHaveServer - 요청된 서버를 찾을 수 없습니다.

  • 404 ServerNotInSubscriptionResourceGroup - 지정된 서버가 지정된 리소스 그룹 및 구독에 없습니다.

  • 404 PropertyChangeUnsupported - 속성을 수정할 수 없습니다.

  • 404 SubscriptionNotFound - 요청된 구독을 찾을 수 없습니다.

  • 404 OperationIdNotFound - ID가 있는 작업이 없습니다.

  • 409 ServerDisabled - 서버를 사용할 수 없습니다.

  • 409 OperationCancelled - 사용자가 작업을 취소했습니다.

  • 409 OperationInterrupted - 동일한 리소스의 다른 작업에 의해 중단되었으므로 리소스에 대한 작업을 완료할 수 없습니다.

  • 429 SubscriptionTooManyCreateUpdateRequests - 사용 가능한 리소스에서 처리할 수 있는 최대 요청을 초과하는 요청입니다.

  • 429 SubscriptionTooManyRequests - 사용 가능한 리소스에서 처리할 수 있는 최대 요청을 초과하는 요청입니다.

  • 500 OperationTimedOut - 작업 시간이 초과되고 자동으로 롤백됩니다. 작업을 다시 시도하세요.

  • 503 TooManyRequests - 사용 가능한 리소스에서 처리할 수 있는 최대 요청을 초과하는 요청입니다.

예제

Create or update a job agent

Sample Request

PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1?api-version=2021-11-01

{
  "location": "southeastasia",
  "properties": {
    "databaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/databases/db1"
  }
}

Sample Response

{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1",
  "name": "agent1",
  "type": "Microsoft.Sql/servers/jobAgents",
  "location": "southeastasia",
  "sku": {
    "name": "Agent",
    "capacity": 100
  },
  "properties": {
    "databaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/databases/db1"
  }
}
{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1",
  "name": "agent1",
  "type": "Microsoft.Sql/servers/jobAgents",
  "location": "southeastasia",
  "sku": {
    "name": "Agent",
    "capacity": 100
  },
  "properties": {
    "databaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/databases/db1"
  }
}

정의

Name Description
JobAgent

Azure SQL 작업 에이전트입니다.

JobAgentState

작업 에이전트의 상태입니다.

Sku

ARM 리소스 SKU입니다.

JobAgent

Azure SQL 작업 에이전트입니다.

Name 형식 Description
id

string

리소스 ID입니다.

location

string

리소스 위치.

name

string

리소스 이름입니다.

properties.databaseId

string

작업 메타데이터를 저장할 데이터베이스의 리소스 ID입니다.

properties.state

JobAgentState

작업 에이전트의 상태입니다.

sku

Sku

SKU의 이름 및 계층입니다.

tags

object

리소스 태그.

type

string

리소스 종류.

JobAgentState

작업 에이전트의 상태입니다.

Name 형식 Description
Creating

string

Deleting

string

Disabled

string

Ready

string

Updating

string

Sku

ARM 리소스 SKU입니다.

Name 형식 Description
capacity

integer

특정 SKU의 용량입니다.

family

string

서비스에 동일한 SKU에 대해 여러 세대의 하드웨어가 있는 경우 여기에서 캡처할 수 있습니다.

name

string

SKU의 이름(일반적으로 문자 + 숫자 코드(예: P3)입니다.

size

string

특정 SKU의 크기

tier

string

특정 SKU의 계층 또는 버전(예: Basic, Premium)입니다.