import json

with open(r'c:\projects\myproject\azure-quiz\data\az-305\questions.json', 'r', encoding='utf-8') as f:
    data = json.load(f)

translations = {}

translations[101] = {
    "stem": "Bạn dự định sử dụng Azure SQL làm database platform. Bạn cần đề xuất Azure SQL product và service tier đáp ứng:\n• Tự động scale compute resources dựa trên workload demand.\n• Cung cấp per second billing.",
    "options": {},
    "explanation": "Azure SQL product: Single Azure SQL database - Hỗ trợ serverless compute tier.\n\nService tier: General Purpose - Serverless compute tier chỉ available trong General Purpose service tier, tự động scales compute và billing per second."
}

translations[102] = {
    "stem": "Bạn có Azure subscription. Bạn cần triển khai solution cung cấp point-in-time restore cho blobs trong storage accounts đã bật blob versioning và blob soft delete. Bạn nên tạo loại blob nào và enable gì cho accounts?",
    "options": {},
    "explanation": "Blob type: Block - Point-in-time restore chỉ hỗ trợ block blobs.\n\nEnable: The change feed - Change feed cần được enable để hỗ trợ point-in-time restore, theo dõi tất cả changes trên blobs."
}

translations[103] = {
    "stem": "Công ty Contoso, Ltd. có Azure subscription chứa:\n• Azure Synapse Analytics workspace tên contosoworkspace1\n• Azure Data Lake Storage account tên contosolake1\n• Azure SQL database tên contososql1\n\nProduct data được copy từ contososql1 tới contosolake1. Contoso có partner Fabrikam Inc. với VM tên FabrikamVM1 chạy SQL Server 2019 và Storage account tên fabrikamsa1.\n\nContoso dự định upload research data từ FabrikamVM1 tới contosolake1. Trong quá trình upload, data phải được transformed sang data formats của Contoso. Data trong contosolake1 sẽ được analyzed bằng contosoworkspace1.\n\nBạn cần đề xuất solution:\n• Upload và transform FabrikamVM1 research data.\n• Cung cấp Fabrikam restricted access tới snapshots của data trong contosoworkspace1.",
    "options": {},
    "explanation": "Upload và transform data: Azure Synapse pipelines - Synapse pipelines cung cấp khả năng ETL/ELT tích hợp sẵn trong workspace.\n\nCung cấp restricted access: Azure Data Share - Cho phép chia sẻ data snapshots với external organizations một cách an toàn và có kiểm soát."
}

translations[104] = {
    "stem": "Bạn đang thiết kế data pipeline sẽ tích hợp lượng lớn data từ nhiều on-premises Microsoft SQL Server databases vào analytics platform trong Azure. Pipeline bao gồm:\n• Database updates được export định kỳ vào staging area trong Azure Blob storage.\n• Data từ blob storage được cleansed và transformed bằng highly parallelized load process.\n• Transformed data được load vào data warehouse.\n• Mỗi batch updates được dùng để refresh OLAP model trong managed serving layer.\n• Managed serving layer được sử dụng bởi hàng ngàn end users.\n\nBạn cần implement data warehouse và serving layers.",
    "options": {},
    "explanation": "Data warehouse: Azure Synapse Analytics dedicated SQL pool - Massively parallel processing (MPP) data warehouse xử lý lượng lớn data, cung cấp scalable solution cho analytics.\n\nServing layer: Azure Analysis Services - Fully managed PaaS solution cho online analytical processing (OLAP) và data modelling, phù hợp cho serving analytical models tới hàng ngàn end users."
}

translations[105] = {
    "stem": "Bạn có Azure subscription. Bạn cần triển khai relational database. Giải pháp phải đáp ứng:\n• Hỗ trợ multiple read-only replicas.\n• Tự động load balance read-only requests across tất cả read-only replicas.\n• Giảm thiểu administrative effort.",
    "options": {},
    "explanation": "Service: Single Azure SQL database - Đáp ứng yêu cầu với ít administrative effort nhất.\n\nService tier: Hyperscale - Hỗ trợ tối đa 4 read-only replicas với automatic load balancing cho read requests."
}

translations[110] = {
    "stem": "Bạn cần triển khai resources để host stateless web app trong Azure subscription. Giải pháp phải đáp ứng:\n✑ Cung cấp access tới full .NET framework.\n✑ Cung cấp redundancy nếu Azure region fails.\n✑ Cấp cho administrators access tới operating system để cài đặt custom application dependencies.\nGiải pháp: Bạn triển khai hai Azure virtual machines tới hai Azure regions và tạo Azure Traffic Manager profile.\nĐiều này có đáp ứng mục tiêu không?",
    "options": {},
    "explanation": "Yes - Azure Traffic Manager là DNS-based traffic load balancer cho phép distribute traffic tới services across global Azure regions, cung cấp high availability và responsiveness. Hai VMs ở hai regions khác nhau đảm bảo redundancy, VMs cho phép access OS để cài dependencies."
}

translations[111] = {
    "stem": "Bạn cần triển khai resources để host stateless web app trong Azure subscription. Giải pháp phải đáp ứng:\n✑ Cung cấp access tới full .NET framework.\n✑ Cung cấp redundancy nếu Azure region fails.\n✑ Cấp cho administrators access tới operating system để cài đặt custom application dependencies.\nGiải pháp: Bạn triển khai hai Azure virtual machines tới hai Azure regions và triển khai Azure Application Gateway.\nĐiều này có đáp ứng mục tiêu không?",
    "options": {},
    "explanation": "No - Application Gateway chỉ balance traffic giữa VMs deployed trong cùng region. Cần tạo Azure Traffic Manager profile thay vì Application Gateway để hỗ trợ cross-region load balancing."
}

translations[112] = {
    "stem": "Bạn dự định tạo Azure Storage account sẽ host file shares. Shares sẽ được truy cập từ on-premises applications có nhiều transactions. Bạn cần đề xuất solution giảm thiểu latency khi truy cập file shares. Solution phải cung cấp highest level of resiliency cho selected storage tier.",
    "options": {},
    "explanation": "Storage tier: Premium - Premium file shares được backed bởi SSDs, cung cấp consistent high performance và low latency trong single-digit milliseconds cho hầu hết IO operations.\n\nRedundancy: Zone-redundant storage (ZRS) - Premium Azure file shares chỉ hỗ trợ LRS và ZRS. ZRS có resiliency cao hơn LRS vì copies data across 3 distinct storage clusters trong different availability zones."
}

translations[114] = {
    "stem": "Bạn cần đề xuất cấu hình Azure Storage account cho hai applications tên Application1 và Application2. Cấu hình phải đáp ứng:\n✑ Storage cho Application1 phải cung cấp highest transaction rates và lowest latency.\n✑ Storage cho Application2 phải cung cấp lowest storage costs per GB.\n✑ Storage cho cả hai phải available khi datacenter failure.\n✑ Storage cho cả hai phải optimized cho uploads và downloads.",
    "options": {},
    "explanation": "Application1: BlockBlobStorage với Premium performance và Zone-redundant storage (ZRS) - Premium cung cấp highest transaction rates và lowest latency. ZRS đảm bảo datacenter failure protection.\n\nApplication2: General purpose v2 với Standard performance, Cool access tier và Read-access geo-redundant storage (RA-GRS) - Cool tier có lowest GB storage prices. RA-GRS cung cấp datacenter failure protection với read access từ secondary region."
}

translations[115] = {
    "stem": "Bạn dự định phát triển app mới lưu business critical data. App phải đáp ứng:\n✑ Ngăn new data bị modified trong một năm.\n✑ Tối đa hóa data resiliency.\n✑ Giảm thiểu read latency.\nBạn nên đề xuất storage solution nào?",
    "options": {},
    "explanation": "Storage Account type: Premium block blobs - Cung cấp low read latency và hỗ trợ immutable storage.\n\nRedundancy: Zone-redundant storage (ZRS) - Resilient hơn LRS. RA-GRS resilient hơn nữa nhưng không phải option ở đây."
}

translations[117] = {
    "stem": "Bạn có on-premises file server lưu 2 TB data files. Bạn dự định move data files tới Azure Blob Storage trong West Europe Azure region. Bạn cần đề xuất storage account type và replication solution đáp ứng:\n✑ Available nếu single Azure datacenter fails.\n✑ Hỗ trợ storage tiers.\n✑ Giảm thiểu cost.",
    "options": {},
    "explanation": "Storage Account type: Standard general-purpose v2 - Đáp ứng requirements và minimizes costs, hỗ trợ storage tiers.\n\nRedundancy: Zone-redundant storage (ZRS) - Bảo vệ khỏi datacenter failure đồng thời minimizing costs (rẻ hơn GRS/RA-GRS)."
}

translations[118] = {
    "stem": "Bạn có Azure web app tên App1 và Azure key vault tên KV1. App1 lưu database connection strings trong KV1. App1 thực hiện các request types tới KV1: Get, List, Wrap, Delete, Unwrap, Backup, Decrypt, Encrypt.\n\nBạn đang đánh giá continuity of service cho App1. Bạn cần xác định nếu Azure region host KV1 becomes unavailable:\n✑ KV1 sẽ fail over tới đâu?\n✑ Trong failover, request type nào sẽ unavailable?",
    "options": {},
    "explanation": "KV1 fail over tới: Server trong paired region - Key vault contents được replicate tới secondary region cách ít nhất 150 miles trong cùng geography.\n\nRequest type unavailable trong failover: Delete - Trong failover, key vault ở read-only mode. Các requests được hỗ trợ bao gồm: List, Get, Encrypt, Decrypt, Wrap, Unwrap, Verify, Sign, Backup. Delete KHÔNG được hỗ trợ."
}

translations[119] = {
    "stem": "Công ty bạn xác định các mục tiêu business continuity và disaster recovery cho virtual machines host sales, finance và reporting applications trong on-premises data center:\n✑ Sales application phải có thể fail over tới second on-premises data center.\n✑ Reporting application phải recover point-in-time data ở daily granularity. RTO là 8 giờ.\n✑ Finance application yêu cầu data retained 7 năm. Khi disaster, application phải chạy từ Azure. RTO là 10 phút.\n\nBạn cần đề xuất services đáp ứng các objectives. Solution phải minimize costs.",
    "options": {},
    "explanation": "Sales: Azure Site Recovery only - Cung cấp replication và failover tới second site, RTO thường dưới 15 phút.\n\nFinance: Azure Site Recovery và Azure Backup - Site Recovery đảm bảo RTO 10 phút, Backup đảm bảo data retention 7 năm.\n\nReporting: Azure Backup only - Backup cung cấp point-in-time recovery với daily granularity, phù hợp RTO 8 giờ. Không cần Site Recovery vì RTO dài hơn."
}

translations[122] = {
    "stem": "Bạn cần triển khai resources để host stateless web app trong Azure subscription. Giải pháp phải đáp ứng:\n✑ Cung cấp access tới full .NET framework.\n✑ Cung cấp redundancy nếu Azure region fails.\n✑ Cấp administrators access tới OS để cài custom dependencies.\nGiải pháp: Bạn triển khai web app trong Isolated App Service plan.\nĐiều này có đáp ứng mục tiêu không?",
    "options": {},
    "explanation": "No - App Service (kể cả Isolated plan) không cấp administrators access tới operating system để cài custom dependencies. Cần sử dụng Azure Virtual Machines thay thế. Ngoài ra, single App Service plan trong một region không đảm bảo redundancy khi region fails."
}

translations[124] = {
    "stem": "Bạn có on-premises Microsoft SQL Server database tên SQL1. Bạn dự định migrate SQL1 tới Azure. Bạn cần đề xuất hosting solution cho SQL1 đáp ứng:\n• Hỗ trợ deployment multiple secondary, read-only replicas.\n• Hỗ trợ automatic replication giữa primary và secondary replicas.\n• Hỗ trợ failover giữa primary và secondary replicas trong 15-minute recovery time objective (RTO).",
    "options": {},
    "explanation": "Azure service: Azure SQL Managed Instance - Fully managed, hỗ trợ multiple secondary read-only replicas và automatic replication.\n\nReplication mechanism: Auto-failover groups - Cho phép tự động failover giữa primary và secondary replicas, hỗ trợ RTO trong 15 phút."
}

translations[125] = {
    "stem": "Bạn có hai on-premises Microsoft SQL Server 2017 instances host Always On availability group tên AG1. AG1 chứa single database tên DB1. Bạn có Azure subscription chứa VM tên VM1 chạy Linux với SQL Server 2019 instance. Bạn cần migrate DB1 tới VM1. Giải pháp phải minimize downtime trên DB1.",
    "options": {},
    "explanation": "Chuẩn bị migration bằng: Adding secondary replica vào AG1 - Thêm secondary replica cho phép migration trên replica trong khi primary vẫn available, minimizing downtime.\n\nThực hiện migration bằng: Azure Migrate - Công cụ centralized hub để assess và migrate on-premises servers, infrastructure, applications và data tới Azure."
}

translations[126] = {
    "stem": "Bạn đang xây dựng Azure web app sẽ lưu Personally Identifiable Information (PII) của employees. Bạn cần đề xuất Azure SQL Database solution cho web app đáp ứng:\n• Maintain availability khi single datacenter outage.\n• Hỗ trợ encryption cho specific columns chứa PII.\n• Tự động scale up trong payroll operations.\n• Giảm thiểu costs.",
    "options": {},
    "explanation": "Service tier và compute tier: General Purpose service tier và Serverless compute tier - Serverless auto-scales compute dựa trên workload activity, billing per second. General Purpose hỗ trợ zone redundancy.\n\nEncryption method: Always Encrypted - Tính năng bảo vệ sensitive data trong specific columns, data được mã hóa ở client-side, cloud administrators không thể xem plaintext."
}

translations[129] = {
    "stem": "Contoso.onmicrosoft.com chứa user tên User1. Bạn cần triển khai solution bảo vệ khỏi ransomware attacks. Solution phải đáp ứng:\n• Đảm bảo tất cả resources trong Sub1 được backed up bằng Azure Backup.\n• Yêu cầu User1 phải được gán role cho Sub2 trước khi user có thể thực hiện major changes tới backup configuration.\nBạn nên tạo gì trong mỗi subscription?",
    "options": {},
    "explanation": "Sub1: Recovery Services vault - Nơi lưu trữ backup data cho resources trong Sub1.\n\nSub2: Resource Guard - Cung cấp additional layer of protection cho critical backup operations, yêu cầu user có role trong subscription khác trước khi thực hiện destructive changes."
}

translations[130] = {
    "stem": "Bạn có 10 on-premises servers chạy Windows Server. Bạn cần thực hiện daily backups tới Recovery Services vault. Solution phải:\n• Back up tất cả files và folders trên servers.\n• Maintain 3 copies của backups trong Azure.\n• Giảm thiểu costs.",
    "options": {},
    "explanation": "Trên servers: Microsoft Azure Recovery Services (MARS) agent - MARS agent cho phép backup files và folders từ on-premises servers tới Azure Recovery Services vault.\n\nCho storage: Locally-redundant storage (LRS) - Duy trì 3 copies của data trong single datacenter, chi phí thấp nhất trong các redundancy options."
}

translations[131] = {
    "stem": "Bạn dự định triển khai containerized web-app sẽ host trong 5 Azure Kubernetes Service (AKS) clusters. Mỗi cluster host trong different Azure region. Bạn cần cung cấp access tới app từ internet. Solution phải:\n• Incoming HTTPS requests phải route tới cluster có lowest network latency.\n• HTTPS traffic tới individual pods phải route qua ingress controller.\n• Khi AKS cluster outage, failover time phải minimized.",
    "options": {},
    "explanation": "Global load balancing: Azure Front Door - Hỗ trợ HTTP(S) traffic, routing dựa trên latency, và fast failover.\n\nIngress controller: Azure Application Gateway - Application Gateway Ingress Controller (AGIC) là Kubernetes application cho phép AKS customers leverage Azure Application Gateway L7 load-balancer để expose cloud software ra Internet."
}

translations[132] = {
    "stem": "Bạn có Azure subscription. Bạn tạo storage account sẽ lưu documents. Bạn cần cấu hình storage account đáp ứng:\n• Đảm bảo retention policies được standardized across subscription.\n• Đảm bảo data có thể bị purged nếu bị copied tới unauthorized location.\nBạn nên enable hai settings nào?",
    "options": {},
    "explanation": "Recovery: Enable soft delete for blobs - Cho phép recover data đã bị deleted.\n\nTracking: Enable versioning for blobs - Theo dõi changes và cho phép restore previous versions, hỗ trợ phát hiện khi data bị copied tới unauthorized locations."
}

translations[133] = {
    "stem": "Bạn có Azure subscription. Bạn đang thiết kế solution cho containerized apps. Solution phải:\n• Tự động scale apps bằng cách tạo additional instances.\n• Giảm thiểu administrative effort để maintain nodes và clusters.\n• Đảm bảo containerized apps highly available across multiple availability zones.\n• Cung cấp central location cho lifecycle management và storage của container images.",
    "options": {},
    "explanation": "Chạy containerized apps: Azure Container Instances - Cung cấp fastest và simplest way để chạy container trong Azure mà không cần manage VMs hoặc adopt higher-level service.\n\nLifecycle management và storage container images: Azure Container Registry - Managed container registry service cho storing và managing container images và related artifacts."
}

translations[134] = {
    "stem": "Bạn dự định sử dụng Azure Storage để lưu data assets. Bạn cần xác định procedure để fail over general-purpose v2 account như một phần của disaster recovery plan. Solution phải:\n• Apps phải có thể access storage account sau failover.\n• Bạn phải có thể fail back storage account về original location.\n• Minimize downtime.\nBa actions nào bạn nên thực hiện theo thứ tự?",
    "options": {},
    "explanation": "Step 1: Trước failover, configure geo-redundant storage (GRS) replication cho storage account - GRS cần thiết để có copy ở secondary region.\n\nStep 2: Initiate failover - Kích hoạt failover khi primary region unavailable.\n\nStep 3: Sau failover, configure geo-redundant storage (GRS) replication cho storage account - Sau failover, account trở thành LRS. Cần reconfigure GRS để có thể fail back về sau."
}

translations[136] = {
    "stem": "Bạn có Azure subscription chứa storage account. Application đôi khi viết duplicate files vào storage account. Bạn có PowerShell script xác định và xóa duplicate files. Hiện tại script chạy thủ công sau approval từ operations manager.\n\nBạn cần đề xuất serverless solution thực hiện:\n✑ Chạy script mỗi giờ để xác định duplicate files tồn tại.\n✑ Gửi email notification tới operations manager yêu cầu approval để xóa.\n✑ Xử lý email response từ operations manager về việc approval.\n✑ Chạy script nếu deletion được approved.\nBạn nên bao gồm gì?",
    "options": {},
    "explanation": "Azure Logic Apps và Azure Functions - Logic Apps cung cấp scheduling (chạy mỗi giờ), email notifications và approval workflows. Azure Functions cho phép chạy PowerShell script code. Kết hợp cả hai tạo serverless solution hoàn chỉnh."
}

translations[138] = {
    "stem": "Bạn cần thiết kế solution thực thi custom C# code phản hồi event được route tới Azure Event Grid. Solution phải:\n✑ Code thực thi phải có thể access private IP address của Microsoft SQL Server instance chạy trên Azure virtual machine.\n✑ Giảm thiểu costs.",
    "options": {},
    "explanation": "Azure Functions trong Premium plan - Virtual network connectivity được bao gồm trong Premium plan, cho phép function access private IP addresses trong VNet. Premium plan rẻ hơn dedicated hosting nhưng vẫn hỗ trợ VNet integration."
}

translations[140] = {
    "stem": "Bạn có Azure subscription tên Subscription1 liên kết với hybrid Azure Active Directory (Azure AD) tenant. Bạn có on-premises datacenter KHÔNG có VPN connection tới Subscription1. Datacenter chứa computer tên Server1 có Microsoft SQL Server 2016 installed. Server1 bị ngăn truy cập internet.\n\nAzure logic app resource tên LogicApp1 cần write access tới database trên Server1. Bạn cần đề xuất solution cung cấp cho LogicApp1 khả năng access Server1.",
    "options": {},
    "explanation": "On-premises: On-premises data gateway - Cho logic apps trong global multi-tenant Azure kết nối tới on-premises SQL Server, cần on-premises data gateway installed trên local computer.\n\nAzure: Connection gateway resource - Tạo data gateway resource trong Azure để logic app sử dụng kết nối tới on-premises data gateway."
}

translations[141] = {
    "stem": "Công ty bạn phát triển web service deployed tới Azure virtual machine tên VM1. Web service cho phép API truy cập real-time data từ VM1. CTO gửi email: 'Developers đã deploy web service tới VM1. Testing cho thấy API accessible từ VM1 và VM2. Partners phải có thể connect tới API qua Internet. Partners sẽ dùng data này trong applications họ phát triển.'\n\nBạn deploy Azure API Management (APIM) service. Với mỗi phát biểu, chọn Yes nếu đúng, ngược lại chọn No.",
    "options": {},
    "explanation": "Box 1: Yes - API available cho partners qua internet vì APIM được deploy ở External mode với virtual network access type.\n\nBox 2: Yes - APIM instance có thể access real-time data từ VM1 vì cùng nằm trong virtual network.\n\nBox 3: No - VPN gateway KHÔNG bắt buộc cho partner access. Partners kết nối qua internet tới APIM public endpoint."
}

translations[142] = {
    "stem": "Công ty bạn có web app chạy trên Azure virtual machines. Bạn cần đảm bảo app được bảo vệ khỏi SQL injection attempts và sử dụng layer-7 load balancer. Solution phải minimize disruptions tới code của app. Bạn nên đề xuất gì?",
    "options": {},
    "explanation": "Azure service: Azure Application Gateway - Cung cấp layer-7 load balancing.\n\nFeature: Web Application Firewall (WAF) - WAF trên Application Gateway bảo vệ web applications khỏi các vulnerabilities theo OWASP Core Rule Set, bao gồm SQL injection protection."
}

translations[143] = {
    "stem": "Bạn đang thiết kế microservices architecture sẽ host trong Azure Kubernetes Service (AKS) cluster. Apps consume microservices sẽ host trên Azure virtual machines. VMs và AKS cluster cùng virtual network.\n\nBạn cần thiết kế solution expose microservices cho consumer apps. Solution phải:\n✑ Ingress access phải restricted tới single private IP address và protected bằng mutual TLS authentication.\n✑ Incoming microservice calls phải rate-limited.\n✑ Giảm thiểu costs.",
    "options": {},
    "explanation": "Azure API Management Premium tier với virtual network connection - Có thể deploy APIM bên trong cluster VNet. AKS cluster và consuming apps cùng VNet nên không cần expose cluster publicly. API Management Premium tier hỗ trợ VNet deployment, mutual TLS, rate limiting và private IP address."
}

translations[144] = {
    "stem": "Bạn có .NET web service tên Service1 thực hiện:\n✑ Reads và writes temporary files tới local file system.\n✑ Writes tới Application event log.\n\nBạn cần đề xuất solution host Service1 trong Azure. Solution phải:\n✑ Minimize maintenance overhead.\n✑ Minimize costs.",
    "options": {},
    "explanation": "Azure App Service web app - Cung cấp low maintenance overhead và cost-effectiveness cho hosting .NET web services. App Service hỗ trợ đọc/ghi files tới local file system và Application event log có thể được ghi bằng Azure Diagnostic Logs."
}

translations[145] = {
    "stem": "Bạn có Azure resources như trong bảng. Bạn cần deploy Azure Firewall policy mới chứa mandatory rules cho tất cả Azure Firewall deployments. Policy mới sẽ được cấu hình làm parent policy cho existing policies. Số lượng Azure Firewall policies bổ sung tối thiểu bạn phải tạo là bao nhiêu?",
    "options": {},
    "explanation": "3 - Firewall policies hoạt động cross-regions và subscriptions. Tuy nhiên, parent policy bắt buộc phải ở cùng region với child policy. Vì có policies ở 3 regions khác nhau, bạn cần 3 parent policies (một cho mỗi region)."
}

translations[147] = {
    "stem": "Công ty bạn có app tên App1 sử dụng data từ on-premises Microsoft SQL Server databases như trong bảng. App1 và data chỉ được sử dụng vào ngày đầu tiên mỗi tháng. Data không dự kiến tăng quá 3% mỗi năm. Công ty đang viết lại App1 thành Azure web app và dự định migrate tất cả data tới Azure. Bạn cần migrate data tới Azure SQL Database. Solution phải minimize costs. Bạn nên sử dụng service tier nào?",
    "options": {},
    "explanation": "vCore-based General Purpose - vCore tiers cho phép serverless và auto-pause, hoàn hảo cho use case 'chỉ dùng ngày đầu tháng'. Phần còn lại tháng, service bị paused và không phát sinh compute costs. Trong DTU tier, cần minimum 100 DTUs cho 400GB DB size. vCore General Purpose Serverless là giải pháp rẻ nhất."
}

translations[148] = {
    "stem": "Công ty bạn có 300 virtual machines host trong VMware environment. VMs có kích thước và mức sử dụng khác nhau. Bạn dự định move tất cả VMs tới Azure. Bạn cần đề xuất cách xác định số lượng và size Azure virtual machines cần thiết. Solution phải minimize administrative effort.",
    "options": {},
    "explanation": "Azure Migrate - Cung cấp centralized hub để assess và migrate on-premises servers, infrastructure, applications và data tới Azure. Bao gồm tools cho assessment và migration, single portal để start, run và track migration."
}

translations[149] = {
    "stem": "Bạn dự định provision High Performance Computing (HPC) cluster trong Azure sẽ sử dụng third-party scheduler. Bạn cần đề xuất solution để provision và manage HPC cluster nodes.",
    "options": {},
    "explanation": "Azure CycleCloud - Enterprise-friendly tool cho orchestrating và managing HPC environments trên Azure. Cho phép provision infrastructure cho HPC systems, deploy familiar HPC schedulers, và automatically scale infrastructure để run jobs efficiently ở bất kỳ scale nào."
}

translations[150] = {
    "stem": "Bạn đang thiết kế Azure App Service web app. Bạn dự định deploy web app tới North Europe và West Europe Azure regions. Bạn cần đề xuất solution đáp ứng:\n✑ Users phải luôn access web app từ North Europe region, trừ khi region fails.\n✑ Web app phải available cho users nếu Azure region unavailable.\n✑ Minimize deployment costs.",
    "options": {},
    "explanation": "Request routing method: Traffic Manager profile - Hỗ trợ load balancing across regions.\n\nRequest routing configuration: Priority traffic routing - Cho phép implement failover pattern: primary region (North Europe) được ưu tiên, backup region (West Europe) chỉ được dùng khi primary down."
}

translations[151] = {
    "stem": "Bạn dự định deploy multiple instances của Azure web app across nhiều Azure regions. Bạn cần thiết kế access solution cho app. Solution phải:\n✑ Hỗ trợ rate limiting.\n✑ Balance requests giữa tất cả instances.\n✑ Đảm bảo users access app khi regional outage.\nGiải pháp: Bạn sử dụng Azure Traffic Manager.\nĐiều này có đáp ứng mục tiêu không?",
    "options": {},
    "explanation": "No - Azure Traffic Manager là DNS-based traffic load balancer, cung cấp high availability nhưng KHÔNG hỗ trợ rate limiting. Azure Front Door mới đáp ứng tất cả yêu cầu vì WAF rate limit rule kiểm soát số requests cho phép từ clients."
}

translations[152] = {
    "stem": "Bạn dự định deploy multiple instances của Azure web app across nhiều Azure regions. Bạn cần thiết kế access solution cho app. Solution phải:\n✑ Hỗ trợ rate limiting.\n✑ Balance requests giữa tất cả instances.\n✑ Đảm bảo users access app khi regional outage.\nGiải pháp: Bạn sử dụng Azure Load Balancer.\nĐiều này có đáp ứng mục tiêu không?",
    "options": {},
    "explanation": "No - Azure Application Gateway và Azure Load Balancer KHÔNG hỗ trợ rate hoặc connection limits. Ngoài ra Load Balancer chỉ hoạt động trong single region. Azure Front Door mới đáp ứng tất cả yêu cầu."
}

translations[153] = {
    "stem": "Bạn dự định deploy multiple instances của Azure web app across nhiều Azure regions. Bạn cần thiết kế access solution cho app. Solution phải:\n✑ Hỗ trợ rate limiting.\n✑ Balance requests giữa tất cả instances.\n✑ Đảm bảo users access app khi regional outage.\nGiải pháp: Bạn sử dụng Azure Application Gateway.\nĐiều này có đáp ứng mục tiêu không?",
    "options": {},
    "explanation": "No - Azure Application Gateway và Azure Load Balancer KHÔNG hỗ trợ rate hoặc connection limits. Ngoài ra Application Gateway chỉ hoạt động trong single region. Azure Front Door mới đáp ứng tất cả yêu cầu."
}

translations[154] = {
    "stem": "Công ty bạn có hai on-premises sites ở New York và Los Angeles và Azure virtual networks ở East US và West US regions. Mỗi on-premises site có ExpressRoute Global Reach circuits tới cả hai regions. Bạn cần đề xuất solution đáp ứng:\n✑ Outbound traffic tới internet từ workloads trên virtual networks phải route qua closest available on-premises site.\n✑ Nếu on-premises site fails, traffic phải tự động reroute tới site còn lại.",
    "options": {},
    "explanation": "Routing từ virtual networks tới on-premises locations phải configure bằng: Border Gateway Protocol (BGP) - Với ExpressRoute, bạn phải sử dụng BGP để advertise on-premises routes tới Microsoft Edge router.\n\nAutomatic routing configuration sau failover phải handled bằng: Border Gateway Protocol (BGP) - BGP tự động detect path failures và converge tới alternate routes. Microsoft không hỗ trợ HSRP hoặc VRRP cho HA configurations."
}

translations[155] = {
    "stem": "Bạn đang thiết kế application sẽ sử dụng Azure Linux virtual machines để analyze video files. Files sẽ được upload từ corporate offices kết nối Azure bằng ExpressRoute. Bạn dự định provision Azure Storage account host files. Storage account phải:\n✑ Hỗ trợ video files tới 7 TB.\n✑ Cung cấp highest availability possible.\n✑ Đảm bảo storage optimized cho large video files.\n✑ Đảm bảo files từ on-premises network upload bằng ExpressRoute.",
    "options": {},
    "explanation": "Storage account type: Premium page blobs - Maximum size cho page blob là 8 TiB, đáp ứng yêu cầu 7 TB. Premium cung cấp optimized performance cho large files.\n\nData redundancy: Geo-redundant storage (GRS) - Cung cấp highest availability với data replicated tới secondary region.\n\nNetworking: Private endpoint - Azure Private Link cho phép kết nối securely qua ExpressRoute với private-peering, đồng thời block public endpoint access."
}

translations[156] = {
    "stem": "Công ty dự định implement HTTP-based API hỗ trợ web app. Web app cho phép customers check status đơn hàng. API phải:\n✑ Implement Azure Functions.\n✑ Cung cấp public read-only operations.\n✑ Ngăn write operations.\n\nBạn cần đề xuất HTTP methods và authorization level.",
    "options": {},
    "explanation": "HTTP methods: GET only - GET cho read-only operations.\n\nAuthorization level: Anonymous - Anonymous cho public operations, không yêu cầu authentication key."
}

translations[159] = {
    "stem": "Bạn có data files trong Azure Blob Storage. Bạn dự định transform files và move tới Azure Data Lake Storage. Bạn cần transform data bằng mapping data flow. Bạn nên sử dụng service nào?",
    "options": {},
    "explanation": "Azure Data Factory - Bạn có thể copy và transform data trong Azure Data Lake Storage Gen2 bằng Azure Data Factory hoặc Azure Synapse Analytics. Data Factory cung cấp mapping data flows cho visual data transformation."
}

translations[161] = {
    "stem": "Mạng on-premises của bạn chứa file server tên Server1 lưu 500 GB data. Bạn cần sử dụng Azure Data Factory để copy data từ Server1 tới Azure Storage. Bạn đã thêm data factory mới. Bạn nên làm gì tiếp theo?",
    "options": {},
    "explanation": "Từ Server1: Cài đặt self-hosted integration runtime - Nếu data store nằm trong on-premises network hoặc private network, cần cấu hình self-hosted integration runtime để kết nối.\n\nTừ data factory: Tạo pipeline - Pipeline thực hiện Copy activity để copy data từ source tới destination."
}

translations[163] = {
    "stem": "Hệ thống xử lý đơn hàng sẽ có transaction flow sau:\n✑ Customer đặt hàng bằng App1.\n✑ Khi nhận order, App1 tạo message để check product availability tại vendor 1 và vendor 2.\n✑ Integration component xử lý message, rồi trigger Function1 hoặc Function2 tùy loại order.\n✑ Khi vendor xác nhận product availability, status message cho App1 được tạo bởi Function1 hoặc Function2.\n✑ Tất cả steps của transaction được logged tới storage1.\n\nBạn nên đề xuất loại resource nào cho integration component?",
    "options": {},
    "explanation": "Azure Service Bus queue - App1 gửi message, integration component xử lý message và trigger functions dựa trên nội dung. Service Bus queue phù hợp cho việc decouple components, xử lý messages reliably và routing tới different consumers dựa trên message properties."
}

translations[164] = {
    "stem": "Bạn có 100 Microsoft SQL Server Integration Services (SSIS) packages được cấu hình sử dụng 10 on-premises SQL Server databases làm destinations. Bạn dự định migrate 10 databases tới Azure SQL Database. Bạn cần đề xuất solution tạo Azure-SSIS packages. Solution phải đảm bảo packages có thể target SQL Database instances làm destinations.",
    "options": {},
    "explanation": "Azure Data Factory - Khi migrate database workloads từ SQL Server on-premises tới Azure, ETL workloads trên SSIS cũng cần migrate. Azure-SSIS Integration Runtime (IR) trong Azure Data Factory hỗ trợ chạy SSIS packages. Sau khi Azure-SSIS IR provisioned, bạn có thể dùng familiar tools như SSDT/SSMS để deploy và run packages trong Azure."
}

translations[166] = {
    "stem": "Bạn có Azure Active Directory (Azure AD) tenant đồng bộ với on-premises Active Directory domain. Công ty có line-of-business (LOB) application phát triển nội bộ. Bạn cần implement SAML single sign-on (SSO) và enforce multi-factor authentication (MFA) khi users attempt access application từ unknown location. Hai tính năng nào bạn nên bao gồm?",
    "options": {
        "A": "Azure AD Privileged Identity Management (PIM)",
        "B": "Azure Application Gateway",
        "C": "Azure AD enterprise applications",
        "D": "Azure AD Identity Protection",
        "E": "Conditional Access policies"
    },
    "explanation": "C: Azure AD enterprise applications - Cho phép cấu hình SAML SSO cho LOB application.\n\nE: Conditional Access policies - Cho phép enforce MFA khi users đăng nhập từ unknown locations bằng cách cấu hình location-based conditions."
}

translations[167] = {
    "stem": "Bạn dự định automate deployment resources tới Azure subscriptions. Sự khác biệt giữa Azure Blueprints và Azure Resource Manager (ARM) templates là gì?",
    "options": {},
    "explanation": "Blueprints remain connected tới deployed resources - Với Azure Blueprints, relationship giữa blueprint definition (what should be deployed) và blueprint assignment (what was deployed) được preserved. Connection này hỗ trợ improved tracking và auditing of deployments.\n\nNgược lại, ARM template là document không tồn tại natively trong Azure - được lưu locally hoặc trong source control. Sau khi resources deploy, không có active connection hay relationship tới template."
}

translations[168] = {
    "stem": "Bạn tạo resource group mới trong Azure tên RG2. Bạn cần move virtual machines tới RG2. Bạn nên sử dụng gì để move mỗi virtual machine?",
    "options": {},
    "explanation": "VM1 (cần move giữa regions): Azure Resource Mover - Được khuyến nghị cho moving Azure VMs tới another region.\n\nVM2 (từ on-premises): Azure Migrate - Cung cấp centralized hub để assess và migrate on-premises servers, infrastructure, applications và data tới Azure, bao gồm Server Migration cho VMware VMs, Hyper-V VMs, physical servers."
}

translations[169] = {
    "stem": "Bạn cần đề xuất load balancing service cho planned deployment. Solution phải:\n✑ Maintain access tới app khi regional outage.\n✑ Hỗ trợ Azure Web Application Firewall (WAF).\n✑ Hỗ trợ cookie-based affinity.\n✑ Hỗ trợ URL routing.",
    "options": {},
    "explanation": "Azure Front Door - Là application delivery network cung cấp global load balancing và site acceleration cho web applications. Cung cấp Layer 7 capabilities bao gồm: WAF, cookie-based session affinity (cookie-based affinity), URL-based routing (path-based routing), SSL offload và fast failover khi regional outage."
}

translations[170] = {
    "stem": "Bạn có Azure resources như trong bảng. Bạn cần thiết kế solution cung cấp on-premises network connectivity tới SQLDB1 thông qua PE1. Bạn nên cấu hình name resolution như thế nào?",
    "options": {},
    "explanation": "Azure configuration: Cấu hình VM1 forward contoso.com tới Azure-provided DNS tại 168.63.129.16 - VM1 đóng vai trò DNS forwarder, chuyển tiếp queries tới Azure DNS để resolve private endpoint addresses.\n\nOn-premises DNS configuration: Forward contoso.com tới VM1 - On-premises DNS servers forward requests tới VM1 (DNS forwarder trong Azure), VM1 sau đó forward tới Azure-provided DNS để resolve private endpoints."
}

# Apply translations to data
for q in data:
    qid = q['id']
    if qid not in translations:
        continue
    t = translations[qid]
    if 'stem' in t and t['stem']:
        q['stem']['vi'] = t['stem']
    if 'options' in t and t['options']:
        for opt in q.get('options', []):
            if opt['key'] in t['options']:
                opt['text']['vi'] = t['options'][opt['key']]
    if 'explanation' in t and t['explanation']:
        q['explanation']['vi'] = t['explanation']

with open(r'c:\projects\myproject\azure-quiz\data\az-305\questions.json', 'w', encoding='utf-8') as f:
    json.dump(data, f, ensure_ascii=False, indent=2)

print(f"Updated {len(translations)} questions with Vietnamese translations (100-170).")
