Azure Resource Graph ilə böyük miqyaslı resurs sorğuları

image

Azure Resource Graph – bulud mühitində çoxsaylı resursların səmərəli idarə olunması üçün nəzərdə tutulmuş güclü sorğu xidmətidir. Bu xidmət vasitəsilə minlərlə Azure resursu arasında kompleks filtrasiya və qruplaşdırma aparmaq, müxtəlif meyarlara görə sorğular icra etməklə infrastrukturun vəziyyətini geniş miqyasda təhlil etmək mümkündür[1][2]. Azure Resource Graph, Azure Resource Manager-ın genişlənməsi kimi fəaliyyət göstərir və bir çox Azure subscription və tenanta yayılmış resurslar üzərində tez və məhsuldar axtarışlar aparmağa imkan verir[3][2]. Xüsusilə böyük müəssisələr üçün bu, vahid sorğu ilə bütün bulud resurs inventarına baxış əldə etməyi asanlaşdırır.

Azure Resource Graph Kusto Query Language (KQL) dilinə əsaslanır və Azure portalında Resource Graph Explorer kimi alətlərlə inteqrasiya olunur[4]. Bu, istifadəçilərə ad, tip, etiketlər və s. kimi xüsusiyyətlər üzrə mürəkkəb sorğular yazaraq resursları tapmağa imkan verir. Məsələn, bütün virtual maşınların siyahısını çəkib, onlardan yalnız müəyyən ad şablonuna uyğun olanları filtr edə bilərsiniz. Azure Resource Graph ayrıca dəyişiklik tarixi məlumatlarını da saxlayır – bu o deməkdir ki, son 14 gün ərzində resurs xüsusiyyətlərində edilən dəyişiklikləri sorğulamaq mümkündür[5].

Böyük miqyaslı sorğular zamanı performansın optimallaşdırılması üçün Resource Graph daxili limiti və səhifələmə imkanı təqdim edir. Defolt olaraq, hər bir sorğu maksimum 1000 sətir nəticə qaytarır, lakin –first parametri ilə bu limiti 1000-ə qədər artırmaq və ya nəticələri səhifələmək mümkündür[6][7]. Eyni zamanda, skip parametri ilə müəyyən sayda nəticəni ötürərək növbəti səhifədən davam etmək olar ki, bu da yüz minlərlə nəticənin mərhələli yüklənməsinə imkan verir[8][9]. Bu yanaşma çox böyük dataset-lərlə işləyərkən sorğuların daha səmərəli icrasını təmin edir.

Azure Resource Graph sorğuları Azure CLI, PowerShell və REST API vasitəsilə avtomatlaşdırıla bilir. Xidmətin pulsuz olmasına baxmayaraq, intensiv istifadə zamanı throttling tətbiq edilə bilər (məsələn, eyni istifadəçi üçün saniyədə sorğu sayına limit). Ancaq geniş miqyaslı idarəetmə ssenarilərində Azure Resource Graph bulud inzibatçılarına çevik inventar götürmə və compliance yoxlamaları aparma imkanı verir. Məsələn, tək sorğu ilə bütün subscription-lardakı müəyyən etiketə malik resursların siyahısını çıxarmaq və ya hansı resursların müəyyən regionda yerləşdiyini müəyyən etmək mümkündür[3][10]. Bu da öz növbəsində kompleks bulud mühitlərində idarəetmə işini əhəmiyyətli dərəcədə asanlaşdırır.

In English:

Azure Resource Graph is a powerful service for querying and exploring Azure resources at scale. It allows you to efficiently retrieve information about thousands of resources across multiple subscriptions and tenants, enabling large enterprises to gain comprehensive visibility into their cloud inventory[3][2]. Azure Resource Graph extends Azure Resource Manager with the ability to perform complex filtering, grouping, and sorting of resources based on properties (name, type, tags, etc.), all via a unified query interface[3]. This is crucial for governance, as it helps administrators quickly find resources that meet certain criteria and assess compliance across large environments.

The service uses the Kusto Query Language (KQL) for formulating queries, and it integrates with tools like the Resource Graph Explorer in the Azure portal[4]. Using KQL, you can run sophisticated queries – for example, retrieving all VMs with a specific tag or finding storage accounts with unencrypted endpoints. Azure Resource Graph is optimized for performance: it maintains an index of Azure resource metadata and continuously updates it when resources change[11]. In fact, Azure Resource Graph powers the Azure Portal’s global search and resource browsing experience, which indicates how fast and scalable it is for large-scale lookups[12].

Because cloud environments can contain tens of thousands of resources, Azure Resource Graph includes features for handling large result sets. By default, each query returns up to 1,000 records to prevent unintentional overload, but this can be overridden for larger queries[6][7]. Through parameters like –first (or -First in PowerShell) and –skip, you can page through results beyond the 1,000-item default limit[13][8]. For example, you might retrieve the first 5,000 results by running the query in batches of 1,000 and skipping the ones already fetched. This approach ensures that even if you have hundreds of thousands of resources, you can programmatically iterate over all results without missing data[8][9].

Azure Resource Graph can be accessed via Azure CLI, Azure PowerShell, or REST API, making it easy to integrate into scripts and automation. It also ties into other Azure governance services – notably, Azure Policy and Azure Lighthouse. For instance, Azure Policy’s compliance dashboard can leverage Resource Graph to quickly list non-compliant resources across the environment[10]. Likewise, service providers using Azure Lighthouse can run Resource Graph queries across delegated subscriptions to manage multiple tenants efficiently[12]. In summary, Azure Resource Graph provides at-scale resource querying capabilities. You can think of it as a specialized search engine for your Azure resources, one that is always up-to-date and designed for governance needs. By using KQL queries, administrators can get answers in seconds, even in environments with tens of thousands of resources, helping them to effectively govern their Azure estate and make informed decisions about inventory, compliance, and resource management[3][2]

Yazı naviqasiyası

Mobil sürümden çık