Server Keys - Create Or Update

서버 키를 만들거나 업데이트합니다.

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

URI 매개 변수

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

string

작동할 서버 키의 이름(업데이트 또는 생성)입니다. 키 이름은 'vault_key_version' 형식이어야 합니다. 예를 들어 keyId가 https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion인 경우 서버 키 이름은 다음과 같이 형식이 지정되어야 합니다YourVaultName_YourKeyName_YourKeyVersion

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.serverKeyType True

ServerKeyType

'ServiceManaged', 'AzureKeyVault'와 같은 서버 키 형식입니다.

properties.uri

string

서버 키의 URI입니다. ServerKeyType이 AzureKeyVault인 경우 URI가 필요합니다. AKV URI는 'https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion' 형식이어야 합니다.

응답

Name 형식 Description
200 OK

ServerKey

서버 키를 업데이트했습니다.

201 Created

ServerKey

서버 키를 만들었습니다.

202 Accepted

수락됨

Other Status Codes

오류 응답: ***

  • 400 InvalidKeyName - 서버 키 이름에 잘못된 값이 지정되었습니다.

  • 400 InvalidKeyType - 서버 키 만들기 유형은 지원되지 않습니다.

  • 400 InvalidUpsertKeyType - 서비스에서 관리되는 서비스 관리 TDE 키입니다. 서비스 관리형 TDE 키는 사용자에 의한 만들기 또는 업데이트를 지원하지 않습니다.

  • 400 InvalidKeyUpsertRequest - 서버 키 만들기 요청이 없거나 속성 개체가 없습니다.

  • 400 SecurityAdalPrincipalCertExpiredError - Azure Key Vault 보안 주체 인증서가 만료되어 작업을 완료할 수 없습니다.

  • 400 AkvHostNotResolvingFromNode - AKV 호스트 ''는 서버 '{0}{1}'의 SQL에서 확인할 수 없습니다.

  • 400 SecurityInvalidAzureKeyVaultRecoveryLevel - 제공된 Key Vault URI가 잘못되었습니다.

  • 400 KeyMaterialNotFoundOnRemoteServer - 원격 서버는 TDE 보호기로 사용되는 키 자료에 액세스할 수 없습니다.

  • 400 AzureKeyVaultRsaKeyNotSupported - 제공된 키 자격 증명 모음은 지원되지 않는 RSA 키 크기 또는 키 형식을 사용합니다. 지원되는 RSA 키 크기는 2048 또는 3072이고 키 유형은 RSA 또는 RSA-HSM입니다.

  • 400 AzureKeyVaultKeyDisabled - Azure Key Vault 키가 비활성화되어 서버에서 작업을 완료할 수 없습니다.

  • 400 AzureKeyVaultInvalidExpirationDate - Azure Key Vault 키 만료 날짜가 잘못되어 작업을 완료할 수 없습니다.

  • 400 SameKeyUriNotFoundOnRemoteServer - 보조 서버에는 키 자동 회전이 사용하도록 설정된 주 서버의 암호화 보호기와 동일한 키 자격 증명 모음의 키 자료가 없습니다.

  • 400 SecurityAzureKeyVaultUrlNullOrEmpty - Azure Key Vault Uri가 null이거나 비어 있으므로 작업을 완료할 수 없습니다.

  • 400 SameKeyMaterialNotFoundOnRemoteServer - 보조 서버에 주 서버의 암호화 보호기의 키 자료가 없습니다.

  • 400 PerDatabaseCMKRestoreNotSupported - 데이터베이스 수준 CMK가 미리 보기로 구성된 경우 데이터베이스 복원이 지원되지 않습니다.

  • 400 AzureKeyVaultNoServerIdentity - 서버 ID가 올바르게 구성되지 않았습니다.

  • 400 PerDatabaseCMKHSNotSupported - 미리 보기의 데이터베이스 수준 CMK는 하이퍼스케일 버전에서 지원되지 않습니다.

  • 400 AzureKeyVaultInvalidUri - Azure Key Vault 잘못된 응답입니다. 유효한 Azure Key Vault URI를 사용하세요.

  • 400 AzureKeyVaultMissingPermissions - 서버에 Azure Key Vault 대한 필수 권한이 없습니다.

  • 400 UmiMissingAkvPermissions - 사용자가 제공한 PrimaryUserAssignedIdentityId가 제공된 KeyId에 액세스할 수 없습니다.

  • 400 AkvEndpointNotReachableFromNode - AKV 엔드포인트 ''는 서버 '{0}{1}'의 SQL에서 연결할 수 없습니다.

  • 400 SecurityAzureKeyVaultInvalidKeyName - 잘못된 서버 키 이름으로 인해 작업을 완료할 수 없습니다.

  • 400 AdalGenericError - Azure Active Directory 오류가 발생하여 작업을 완료할 수 없습니다.

  • 400 AdalServicePrincipalNotFound - Azure Active Directory 라이브러리 서비스 주체를 찾을 수 없음 오류가 발생하여 작업을 완료할 수 없습니다.

  • 400 AzureKeyVaultMalformedVaultUri - 제공된 Key Vault URI가 잘못되었습니다.

  • 400 SecurityAzureKeyVaultGeoChainError - BYOK(Azure Key Vault)를 사용하여 투명한 데이터 암호화를 사용하도록 설정할 때 보조 보조 데이터베이스(체인이라고 하는 프로세스)를 만드는 것은 지원되지 않습니다.

  • 400 PerDatabaseCMKDWNotSupported - 미리 보기의 데이터베이스 수준 CMK는 Datawarehouse 버전에서 지원되지 않습니다.

  • 400 SecurityAdalPrincipalCertExpiredError - Azure Key Vault 보안 주체 인증서가 만료되어 작업을 완료할 수 없습니다.

  • 400 AkvHostNotResolvingFromNode - AKV 호스트 ''는 서버 '{0}{1}'의 SQL에서 확인할 수 없습니다.

  • 400 SecurityInvalidAzureKeyVaultRecoveryLevel - 제공된 Key Vault URI가 잘못되었습니다.

  • 400 KeyMaterialNotFoundOnRemoteServer - 원격 서버는 TDE 보호기로 사용되는 키 자료에 액세스할 수 없습니다.

  • 400 AzureKeyVaultRsaKeyNotSupported - 제공된 키 자격 증명 모음은 지원되지 않는 RSA 키 크기 또는 키 형식을 사용합니다. 지원되는 RSA 키 크기는 2048 또는 3072이고 키 유형은 RSA 또는 RSA-HSM입니다.

  • 400 AzureKeyVaultKeyDisabled - Azure Key Vault 키가 비활성화되어 서버에서 작업을 완료할 수 없습니다.

  • 400 AzureKeyVaultInvalidExpirationDate - Azure Key Vault 키 만료 날짜가 잘못되어 작업을 완료할 수 없습니다.

  • 400 SameKeyUriNotFoundOnRemoteServer - 보조 서버에는 키 자동 회전이 사용하도록 설정된 주 서버의 암호화 보호기와 동일한 키 자격 증명 모음의 키 자료가 없습니다.

  • 400 SecurityAzureKeyVaultUrlNullOrEmpty - Azure Key Vault Uri가 null이거나 비어 있으므로 작업을 완료할 수 없습니다.

  • 400 SameKeyMaterialNotFoundOnRemoteServer - 보조 서버에 주 서버의 암호화 보호기의 키 자료가 없습니다.

  • 400 PerDatabaseCMKRestoreNotSupported - 데이터베이스 수준 CMK가 미리 보기로 구성된 경우 데이터베이스 복원이 지원되지 않습니다.

  • 400 AzureKeyVaultNoServerIdentity - 서버 ID가 올바르게 구성되지 않았습니다.

  • 400 PerDatabaseCMKHSNotSupported - 미리 보기의 데이터베이스 수준 CMK는 하이퍼스케일 버전에서 지원되지 않습니다.

  • 400 AzureKeyVaultInvalidUri - Azure Key Vault 잘못된 응답입니다. 유효한 Azure Key Vault URI를 사용하세요.

  • 400 AzureKeyVaultMissingPermissions - 서버에 Azure Key Vault 대한 필수 권한이 없습니다.

  • 400 UmiMissingAkvPermissions - 사용자가 제공한 PrimaryUserAssignedIdentityId가 제공된 KeyId에 액세스할 수 없습니다.

  • 400 AkvEndpointNotReachableFromNode - AKV 엔드포인트 ''는 서버 '{0}{1}'의 SQL에서 연결할 수 없습니다.

  • 400 SecurityAzureKeyVaultInvalidKeyName - 잘못된 서버 키 이름으로 인해 작업을 완료할 수 없습니다.

  • 400 AdalGenericError - Azure Active Directory 오류가 발생하여 작업을 완료할 수 없습니다.

  • 400 AdalServicePrincipalNotFound - Azure Active Directory 라이브러리 서비스 주체를 찾을 수 없음 오류가 발생하여 작업을 완료할 수 없습니다.

  • 400 AzureKeyVaultMalformedVaultUri - 제공된 Key Vault URI가 잘못되었습니다.

  • 400 SecurityAzureKeyVaultGeoChainError - BYOK(Azure Key Vault)를 사용하여 투명한 데이터 암호화를 사용하도록 설정할 때 보조 보조 데이터베이스(체인이라고 하는 프로세스)를 만드는 것은 지원되지 않습니다.

  • 400 PerDatabaseCMKDWNotSupported - 미리 보기의 데이터베이스 수준 CMK는 Datawarehouse 버전에서 지원되지 않습니다.

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

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

  • 404 ResourceNotFound - 요청된 리소스를 찾을 수 없습니다.

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

  • 409 ServerKeyNameAlreadyExists - 서버 키가 서버에 이미 있습니다.

  • 409 ServerKeyUriAlreadyExists - 서버 키 URI가 서버에 이미 있습니다.

  • 409 ServerKeyDoesNotExists - 서버 키가 없습니다.

  • 409 AzureKeyVaultKeyNameNotFound - Azure Key Vault 키 이름이 없으므로 작업을 완료할 수 없습니다.

  • 409 AzureKeyVaultKeyInUse - 현재 서버에서 키를 사용하고 있습니다.

  • 409 ServerKeyNameAlreadyExists - 서버 키가 서버에 이미 있습니다.

  • 409 ServerKeyUriAlreadyExists - 서버 키 URI가 서버에 이미 있습니다.

  • 409 ServerKeyDoesNotExists - 서버 키가 없습니다.

  • 409 AzureKeyVaultKeyNameNotFound - Azure Key Vault 키 이름이 없으므로 작업을 완료할 수 없습니다.

  • 409 AzureKeyVaultKeyInUse - 현재 서버에서 키를 사용하고 있습니다.

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

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

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

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

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

  • 503 AzureKeyVaultConnectionFailed - Azure Key Vault 연결 시도가 실패했기 때문에 서버에서 작업을 완료할 수 없습니다.

  • 503 AzureKeyVaultGenericConnectionError - Key Vault 정보를 검색하려고 할 때 오류가 발생하여 작업을 완료할 수 없습니다.

  • 503 AzureKeyVaultConnectionFailed - Azure Key Vault 연결 시도가 실패했기 때문에 서버에서 작업을 완료할 수 없습니다.

  • 503 AzureKeyVaultGenericConnectionError - Key Vault 정보를 검색하려고 할 때 오류가 발생하여 작업을 완료할 수 없습니다.

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

예제

Creates or updates a server key

Sample Request

PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/keys/someVault_someKey_01234567890123456789012345678901?api-version=2021-11-01

{
  "properties": {
    "serverKeyType": "AzureKeyVault",
    "uri": "https://someVault.vault.azure.net/keys/someKey/01234567890123456789012345678901"
  }
}

Sample Response

{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/keys/someVault_someKey_01234567890123456789012345678901",
  "name": "sqlcrudtest-4645",
  "type": "Microsoft.Sql/servers/keys",
  "location": "Japan East",
  "kind": "azurekeyvault",
  "properties": {
    "thumbprint": "00112233445566778899AABBCCDDEEFFAABBCCDD",
    "creationDate": "2020-11-15T00:00:00Z",
    "autoRotationEnabled": false
  }
}
{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/keys/someVault_someKey_01234567890123456789012345678901",
  "name": "sqlcrudtest-4645",
  "type": "Microsoft.Sql/servers/keys",
  "location": "Japan East",
  "kind": "azurekeyvault",
  "properties": {
    "thumbprint": "00112233445566778899AABBCCDDEEFFAABBCCDD",
    "creationDate": "2020-11-15T00:00:00Z",
    "autoRotationEnabled": false
  }
}

정의

Name Description
ServerKey

서버 키입니다.

ServerKeyType

'ServiceManaged', 'AzureKeyVault'와 같은 서버 키 형식입니다.

ServerKey

서버 키입니다.

Name 형식 Description
id

string

리소스 ID입니다.

kind

string

암호화 보호기의 종류입니다. Azure Portal 환경에 사용되는 메타데이터입니다.

location

string

리소스 위치.

name

string

리소스 이름입니다.

properties.autoRotationEnabled

boolean

키 자동 회전 옵트인 플래그입니다. true 또는 false입니다.

properties.creationDate

string

서버 키 생성 날짜입니다.

properties.serverKeyType

ServerKeyType

'ServiceManaged', 'AzureKeyVault'와 같은 서버 키 형식입니다.

properties.subregion

string

서버 키의 하위 구성입니다.

properties.thumbprint

string

서버 키의 지문입니다.

properties.uri

string

서버 키의 URI입니다. ServerKeyType이 AzureKeyVault인 경우 URI가 필요합니다. AKV URI는 'https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion' 형식이어야 합니다.

type

string

리소스 종류.

ServerKeyType

'ServiceManaged', 'AzureKeyVault'와 같은 서버 키 형식입니다.

Name 형식 Description
AzureKeyVault

string

ServiceManaged

string