إشعار
يتطلب الوصول إلى هذه الصفحة تخويلاً. يمكنك محاولة تسجيل الدخول أو تغيير الدلائل.
يتطلب الوصول إلى هذه الصفحة تخويلاً. يمكنك محاولة تغيير الدلائل.
لتمكين مفتاح للاستخدام مع عمليات التشفير في Azure Key Vault، استخدم أسلوب updateKeyProperties لفئة SecretClient .
تمكين مفتاح
لتمكين مفتاح في Azure Key Vault، استخدم أسلوب updateKeyProperties لفئة KeyClient .
const properties = await keyClient.updateKeyProperties(
keyName,
version, // optional, remove to update the latest version
{ enabled: true }
);
راجع مثال خصائص مفتاح التحديث للحصول على مثال التعليمات البرمجية الكامل.
تعطيل مفتاح جديد
لتعطيل مفتاح جديد، استخدم أسلوب createKey واستخدم createKeyOptions لتعطيل المفتاح.
const keyVaultKey = await keyClient.createKey(keyName, keyType, { enabled: false });
تعطيل مفتاح موجود
لتعطيل مفتاح في Azure Key Vault، استخدم أسلوب updateKeyProperties لفئة KeyClient .
const properties = await keyClient.updateKeyProperties(
keyName,
version, // optional, remove to update the latest version
{ enabled: false }
);
راجع مثال خصائص مفتاح التحديث للحصول على مثال التعليمات البرمجية الكامل.