Share via


Server DevOps Audit Settings - Create Or Update

서버의 DevOps 감사 설정을 만들거나 업데이트합니다.

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

URI 매개 변수

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

string

devops 감사 설정의 이름입니다. 항상 '기본값'이어야 합니다.

resourceGroupName
path True

string

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

serverName
path True

string

서버의 이름입니다.

subscriptionId
path True

string

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

api-version
query True

string

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

요청 본문

Name 필수 형식 Description
properties.state True

BlobAuditingPolicyState

감사 상태를 지정합니다. 상태가 Enabled이면 storageEndpoint 또는 isAzureMonitorTargetEnabled가 필요합니다.

properties.isAzureMonitorTargetEnabled

boolean

DevOps 감사 이벤트가 Azure Monitor로 전송되는지 여부를 지정합니다. Azure Monitor에 이벤트를 보내려면 'State'를 'Enabled'로, 'IsAzureMonitorTargetEnabled'를 true로 지정합니다.

REST API를 사용하여 DevOps 감사를 구성하는 경우 master 데이터베이스에서 'DevOpsOperationsAudit' 진단 로그 범주가 있는 진단 설정도 만들어야 합니다.

진단 설정 URI 형식: PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/master/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview

자세한 내용은 진단 설정 REST API 또는 진단 설정 PowerShell을 참조하세요.

properties.storageAccountAccessKey

string

감사 스토리지 계정의 식별자 키를 지정합니다. 상태가 Enabled이고 storageEndpoint가 지정된 경우 storageAccountAccessKey를 지정하지 않으면 SQL Server 시스템 할당 관리 ID를 사용하여 스토리지에 액세스합니다. 관리 ID 인증을 사용하기 위한 필수 구성 요소:

  1. AAD(Azure Active Directory)에서 시스템 할당 관리 ID를 SQL Server 할당합니다.
  2. 서버 ID에 'Storage Blob 데이터 기여자' RBAC 역할을 추가하여 스토리지 계정에 SQL Server ID 액세스 권한을 부여합니다. 자세한 내용은 관리 ID 인증을 사용하여 스토리지에 대한 감사를 참조하세요.
properties.storageAccountSubscriptionId

string

Blob Storage 구독 ID를 지정합니다.

properties.storageEndpoint

string

Blob Storage 엔드포인트(예: https://MyAccount.blob.core.windows.net)를 지정합니다. 상태가 Enabled이면 storageEndpoint 또는 isAzureMonitorTargetEnabled가 필요합니다.

응답

Name 형식 Description
200 OK

ServerDevOpsAuditingSettings

DevOps 감사 설정을 업데이트했습니다.

202 Accepted

감사 DevOps 설정 업데이트가 진행 중입니다.

Other Status Codes

오류 응답: ***

  • 400 InvalidServerDevOpsAuditSettingsCreateRequest - 만들기 서버 DevOps 감사 정책 요청이 없거나 속성 개체가 없습니다.

  • 400 DataSecurityInvalidUserSuppliedParameter - 클라이언트에서 잘못된 매개 변수 값을 제공했습니다.

  • 400 InvalidServerDevOpsAuditSettingsName - 잘못된 서버 DevOps 정책 이름입니다.

  • 400 DevOpsAuditInvalidStorageAccountCredentials - 제공된 스토리지 계정 또는 액세스 키가 잘못되었습니다.

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

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

  • 409 ServerDevOpsAuditSettingsInProgress - 서버 DevOps 감사 설정이 이미 진행 중입니다.

예제

Update a server's DevOps audit settings with all params
Update a server's DevOps audit settings with minimal input

Update a server's DevOps audit settings with all params

Sample Request

PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/devAuditTestRG/providers/Microsoft.Sql/servers/devOpsAuditTestSvr/devOpsAuditingSettings/default?api-version=2021-11-01

{
  "properties": {
    "state": "Enabled",
    "storageAccountAccessKey": "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==",
    "storageEndpoint": "https://mystorage.blob.core.windows.net",
    "storageAccountSubscriptionId": "00000000-1234-0000-5678-000000000000",
    "isAzureMonitorTargetEnabled": true
  }
}

Sample Response

{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/devAuditTestRG/providers/Microsoft.Sql/servers/devOpsAuditTestSvr/devOpsAuditingSettings/default",
  "name": "default",
  "type": "Microsoft.Sql/servers/devOpsAuditingSettings",
  "properties": {
    "state": "Enabled",
    "storageEndpoint": "https://mystorage.blob.core.windows.net",
    "storageAccountSubscriptionId": "00000000-1234-0000-5678-000000000000",
    "isAzureMonitorTargetEnabled": true
  }
}

Update a server's DevOps audit settings with minimal input

Sample Request

PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/devAuditTestRG/providers/Microsoft.Sql/servers/devOpsAuditTestSvr/devOpsAuditingSettings/default?api-version=2021-11-01

{
  "properties": {
    "state": "Enabled",
    "storageAccountAccessKey": "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==",
    "storageEndpoint": "https://mystorage.blob.core.windows.net"
  }
}

Sample Response

{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/devAuditTestRG/providers/Microsoft.Sql/servers/devOpsAuditTestSvr/devOpsAuditingSettings/default",
  "name": "default",
  "type": "Microsoft.Sql/servers/devOpsAuditingSettings",
  "properties": {
    "state": "Enabled",
    "storageEndpoint": "https://mystorage.blob.core.windows.net",
    "storageAccountSubscriptionId": "00000000-1234-0000-5678-000000000000"
  }
}

정의

Name Description
BlobAuditingPolicyState

감사 상태를 지정합니다. 상태가 Enabled이면 storageEndpoint 또는 isAzureMonitorTargetEnabled가 필요합니다.

createdByType

리소스를 만든 ID 유형입니다.

ServerDevOpsAuditingSettings

서버 DevOps 감사 설정입니다.

systemData

리소스 만들기 및 마지막 수정과 관련된 메타데이터입니다.

BlobAuditingPolicyState

감사 상태를 지정합니다. 상태가 Enabled이면 storageEndpoint 또는 isAzureMonitorTargetEnabled가 필요합니다.

Name 형식 Description
Disabled

string

Enabled

string

createdByType

리소스를 만든 ID 유형입니다.

Name 형식 Description
Application

string

Key

string

ManagedIdentity

string

User

string

ServerDevOpsAuditingSettings

서버 DevOps 감사 설정입니다.

Name 형식 Description
id

string

리소스 ID입니다.

name

string

리소스 이름입니다.

properties.isAzureMonitorTargetEnabled

boolean

DevOps 감사 이벤트가 Azure Monitor로 전송되는지 여부를 지정합니다. Azure Monitor에 이벤트를 보내려면 'State'를 'Enabled'로, 'IsAzureMonitorTargetEnabled'를 true로 지정합니다.

REST API를 사용하여 DevOps 감사를 구성하는 경우 master 데이터베이스에서 'DevOpsOperationsAudit' 진단 로그 범주가 있는 진단 설정도 만들어야 합니다.

진단 설정 URI 형식: PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/master/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview

자세한 내용은 진단 설정 REST API 또는 진단 설정 PowerShell을 참조하세요.

properties.state

BlobAuditingPolicyState

감사 상태를 지정합니다. 상태가 Enabled이면 storageEndpoint 또는 isAzureMonitorTargetEnabled가 필요합니다.

properties.storageAccountAccessKey

string

감사 스토리지 계정의 식별자 키를 지정합니다. 상태가 Enabled이고 storageEndpoint가 지정된 경우 storageAccountAccessKey를 지정하지 않으면 SQL Server 시스템 할당 관리 ID를 사용하여 스토리지에 액세스합니다. 관리 ID 인증을 사용하기 위한 필수 구성 요소:

  1. AAD(Azure Active Directory)에서 시스템 할당 관리 ID를 SQL Server 할당합니다.
  2. 서버 ID에 'Storage Blob 데이터 기여자' RBAC 역할을 추가하여 스토리지 계정에 SQL Server ID 액세스 권한을 부여합니다. 자세한 내용은 관리 ID 인증을 사용하여 스토리지에 대한 감사를 참조하세요.
properties.storageAccountSubscriptionId

string

Blob Storage 구독 ID를 지정합니다.

properties.storageEndpoint

string

Blob Storage 엔드포인트(예: https://MyAccount.blob.core.windows.net)를 지정합니다. 상태가 Enabled이면 storageEndpoint 또는 isAzureMonitorTargetEnabled가 필요합니다.

systemData

systemData

ServerDevOpsAuditSettingsResource의 SystemData입니다.

type

string

리소스 종류.

systemData

리소스 만들기 및 마지막 수정과 관련된 메타데이터입니다.

Name 형식 Description
createdAt

string

UTC(리소스 만들기)의 타임스탬프입니다.

createdBy

string

리소스를 만든 ID입니다.

createdByType

createdByType

리소스를 만든 ID 유형입니다.

lastModifiedAt

string

리소스 마지막 수정의 타임스탬프(UTC)

lastModifiedBy

string

리소스를 마지막으로 수정한 ID입니다.

lastModifiedByType

createdByType

리소스를 마지막으로 수정한 ID 유형입니다.