Azure 리소스 공급자 및 종류

Azure 리소스 공급자는 특정 Azure 서비스에 대한 기능을 사용하도록 설정하는 REST 작업의 컬렉션입니다. 예를 들어 Key Vault 서비스는 Microsoft.KeyVault라는 리소스 공급자로 구성됩니다. 리소스 공급자는 자격 증명 모음, 비밀, 키 및 인증서를 관리하기 위한 REST 작업을 정의합니다.

리소스 공급자는 계정에 배포할 수 있는 Azure 리소스를 정의합니다. 리소스 종류의 이름은 {resource-provider}/{resource-type} 형식을 따릅니다. 키 자격 증명 모음의 리소스 유형은 Microsoft.KeyVault/vaults입니다.

이 문서에서는 다음 방법을 설명합니다.

  • Azure의 모든 리소스 공급자 보기
  • 리소스 공급자의 등록 상태 확인
  • 리소스 공급자 등록
  • 리소스 공급자에 대한 리소스 종류 보기
  • 리소스 종류에 대한 유효한 위치 보기
  • 리소스 종류에 대한 유효한 API 버전 보기

리소스 공급자를 Azure 서비스로 매핑하는 목록은 Azure 서비스용 리소스 공급자를 참조하세요.

리소스 공급자 등록

리소스 공급자를 사용하기 전에 Azure 구독이 리소스 공급자에 등록되어 있는지 확인해야 합니다. 등록을 통해 구독이 리소스 공급자에서 작동하도록 구성합니다.

Important

리소스 공급자는 사용할 준비가 된 경우에만 등록합니다. 이런 등록 단계는 구독 내에서 최소한의 권한을 유지하는 데 도움이 됩니다. 등록되지 않은 리소스 공급자는 악의적인 사용자가 사용할 수 없습니다.

불필요한 리소스 공급자를 등록하면 Microsoft Entra 테넌트에 인식할 수 없는 앱이 나타날 수 있습니다. 리소스 공급자가 등록되면 Microsoft는 리소스 공급자에 대한 앱을 추가합니다. 이러한 앱은 일반적으로 Windows Azure Service Management API에 의해 추가됩니다. 테넌트에서 불필요한 앱을 방지하려면 필요한 리소스 공급자만 등록합니다.

일부 리소스 공급자는 기본적으로 등록됩니다. 기본적으로 등록된 리소스 공급자 목록은 Azure 서비스의 리소스 공급자를 참조하세요.

다른 리소스 공급자는 특정 작업을 수행하면 자동으로 등록됩니다. 포털을 통해 리소스를 만드는 경우 일반적으로 리소스 공급자가 사용자에게 등록됩니다. Azure Resource Manager 템플릿 또는 Bicep 파일을 배포하면 템플릿에 정의된 리소스 공급자가 자동으로 등록됩니다. 템플릿의 리소스에 템플릿에 없는 지원 리소스가 필요한 경우가 있습니다. 일반적인 예로는 모니터링 또는 보안 리소스가 있습니다. 이러한 리소스 공급자는 수동으로 등록해야 합니다.

다른 시나리오의 경우 리소스 공급자를 수동으로 등록해야 할 수 있습니다.

Important

애플리케이션 코드는 등록 상태에 있는 리소스 공급자에 대한 리소스 생성을 차단하지 않아야 합니다. 리소스 공급자를 등록하면 지원되는 각 지역에 대해 작업이 개별적으로 수행됩니다. 지역에 리소스를 생성하려면 해당 지역에서만 등록을 완료하면 됩니다. 등록 상태에서 리소스 공급자를 차단하지 않으면 모든 지역이 완료될 때까지 기다리는 것보다 훨씬 빨리 애플리케이션을 계속할 수 있습니다.

리소스 공급자에 대한 /register/action 작업을 수행하기 위해서는 권한이 있어야 합니다. 해당 권한은 기여자 및 소유자 역할에 포함되어 있습니다.

구독에 해당 리소스 공급자의 리소스 종류가 아직 포함되어 있으면 해당 리소스 공급자를 등록 취소할 수 없습니다.

사용해야 하는 새 위치를 리소스 공급자가 지원하는 경우 리소스 공급자를 다시 등록합니다.

Azure Portal

리소스 공급자 등록

모든 리소스 공급자와 구독 등록 상태를 보려면 다음을 수행합니다.

  1. Azure Portal에 로그인합니다.

  2. Azure Portal 메뉴에서 구독을 검색합니다. 사용 가능한 옵션에서 선택합니다.

    Screenshot of searching for subscriptions in the Azure portal.

  3. 보려는 구독을 선택합니다.

    Screenshot of selecting a subscription in the Azure portal.

  4. 왼쪽 메뉴의 설정에서 리소스 공급자를 선택합니다.

    Screenshot of selecting resource providers in the Azure portal.

  5. 등록할 리소스 공급자를 찾고 등록을 선택합니다. 구독에서 권한을 유지하려면 사용할 준비가 된 리소스 공급자만 등록합니다.

    Screenshot of registering a resource provider in the Azure portal.

    Important

    앞서 언급한 것처럼 등록 상태에 있는 리소스 공급자에 대해 리소스 생성을 차단하지 않아야 합니다. 등록 상태에서 리소스 공급자를 차단하지 않으면 모든 지역이 완료될 때까지 기다리는 것보다 훨씬 빨리 애플리케이션을 계속할 수 있습니다.

  6. 이전 등록 이후 추가된 위치를 사용하려면 리소스 공급자를 다시 등록합니다.

    Screenshot of reregistering a resource provider in the Azure portal.

리소스 공급자 보기

특정 리소스 공급자에 대한 정보를 보려면 다음을 수행합니다.

  1. Azure Portal에 로그인합니다.

  2. Azure Portal 메뉴에서 모든 서비스를 선택합니다.

  3. 모든 서비스 상자에서 리소스 탐색기를 입력한 다음, 리소스 탐색기를 선택합니다.

    Screenshot of selecting All services in the Azure portal to access Resource Explorer.

  4. 오른쪽 화살표를 선택하여 공급자를 확장합니다.

    Screenshot of expanding the Providers section in the Azure Resource Explorer.

  5. 보려는 리소스 공급자 및 리소스 종류를 펼칩니다.

    Screenshot of expanding a resource provider and resource type in the Azure Resource Explorer.

  6. 리소스 관리자는 모든 지역에서 지원되지만 배포한 리소스는 모든 지역에서 지원되지 않을 수 있습니다. 또한 구독에 리소스를 지원하는 일부 지역을 사용하지 못하도록 하는 제한 사항이 있을 수 있습니다. 리소스 탐색기에는 리소스 종류에 대한 유효한 위치가 표시됩니다.

    Screenshot of displaying valid locations for a resource type in the Azure Resource Explorer.

  7. API 버전은 리소스 공급자의 REST API 작업 버전에 해당합니다. 리소스 공급자는 새 기능을 사용하도록 설정할 때 새 버전의 REST API를 릴리스합니다. 리소스 탐색기에는 리소스 종류에 대한 유효한 API 버전이 표시됩니다.

    Screenshot of displaying valid API versions for a resource type in the Azure Resource Explorer.

Azure PowerShell

Azure의 모든 리소스 공급자와 구독에 대한 등록 상태를 보려면 다음을 사용합니다.

Get-AzResourceProvider -ListAvailable | Select-Object ProviderNamespace, RegistrationState

이 명령은 다음을 반환합니다.

ProviderNamespace                RegistrationState
-------------------------------- ------------------
Microsoft.ClassicCompute         Registered
Microsoft.ClassicNetwork         Registered
Microsoft.ClassicStorage         Registered
Microsoft.CognitiveServices      Registered
...

구독에 대해 등록된 모든 리소스 공급자를 보려면 다음을 사용합니다.

 Get-AzResourceProvider -ListAvailable | Where-Object RegistrationState -eq "Registered" | Select-Object ProviderNamespace, RegistrationState | Sort-Object ProviderNamespace

구독에서 권한을 유지하려면 사용할 준비가 된 리소스 공급자만 등록합니다. 리소스 공급자를 등록하려면 다음을 사용합니다.

Register-AzResourceProvider -ProviderNamespace Microsoft.Batch

이 명령은 다음을 반환합니다.

ProviderNamespace : Microsoft.Batch
RegistrationState : Registering
ResourceTypes     : {batchAccounts, operations, locations, locations/quotas}
Locations         : {West Europe, East US, East US 2, West US...}

Important

앞서 언급한 것처럼 등록 상태에 있는 리소스 공급자에 대해 리소스 생성을 차단하지 않아야 합니다. 등록 상태에서 리소스 공급자를 차단하지 않으면 모든 지역이 완료될 때까지 기다리는 것보다 훨씬 빨리 애플리케이션을 계속할 수 있습니다.

이전 등록 이후 추가된 위치를 사용하려면 리소스 공급자를 다시 등록합니다. 다시 등록하려면 등록 명령을 다시 실행합니다.

특정 리소스 공급자에 대한 정보를 보려면 다음을 사용합니다.

Get-AzResourceProvider -ProviderNamespace Microsoft.Batch

이 명령은 다음을 반환합니다.

{ProviderNamespace : Microsoft.Batch
RegistrationState : Registered
ResourceTypes     : {batchAccounts}
Locations         : {West Europe, East US, East US 2, West US...}

...

리소스 공급자에 대한 리소스 종류를 보려면 다음을 사용합니다.

(Get-AzResourceProvider -ProviderNamespace Microsoft.Batch).ResourceTypes.ResourceTypeName

이 명령은 다음을 반환합니다.

batchAccounts
operations
locations
locations/quotas

API 버전은 리소스 공급자의 REST API 작업 버전에 해당합니다. 리소스 공급자는 새 기능을 사용하도록 설정할 때 새 버전의 REST API를 릴리스합니다.

리소스 종류의 사용 가능한 API 버전을 가져오려면 다음을 사용합니다.

((Get-AzResourceProvider -ProviderNamespace Microsoft.Batch).ResourceTypes | Where-Object ResourceTypeName -eq batchAccounts).ApiVersions

이 명령은 다음을 반환합니다.

2023-05-01
2022-10-01
2022-06-01
2022-01-01
2021-06-01
2021-01-01
...

리소스 관리자는 모든 지역에서 지원되지만 배포한 리소스는 모든 지역에서 지원되지 않을 수 있습니다. 또한 구독에 리소스를 지원하는 일부 지역을 사용하지 못하도록 하는 제한 사항이 있을 수 있습니다.

리소스 종류의 지원되는 위치를 가져오려면 다음을 사용합니다.

((Get-AzResourceProvider -ProviderNamespace Microsoft.Batch).ResourceTypes | Where-Object ResourceTypeName -eq batchAccounts).Locations

이 명령은 다음을 반환합니다.

West Europe
East US
East US 2
West US
...

Azure CLI

Azure의 모든 리소스 공급자와 구독에 대한 등록 상태를 보려면 다음을 사용합니다.

az provider list --query "[].{Provider:namespace, Status:registrationState}" --out table

이 명령은 다음을 반환합니다.

Provider                         Status
-------------------------------- ----------------
Microsoft.ClassicCompute         Registered
Microsoft.ClassicNetwork         Registered
Microsoft.ClassicStorage         Registered
Microsoft.CognitiveServices      Registered
...

구독에 대해 등록된 모든 리소스 공급자를 보려면 다음을 사용합니다.

az provider list --query "sort_by([?registrationState=='Registered'].{Provider:namespace, Status:registrationState}, &Provider)" --out table

구독에서 권한을 유지하려면 사용할 준비가 된 리소스 공급자만 등록합니다. 리소스 공급자를 등록하려면 다음을 사용합니다.

az provider register --namespace Microsoft.Batch

이 명령은 등록이 진행 중이라는 메시지를 반환합니다.

특정 리소스 공급자에 대한 정보를 보려면 다음을 사용합니다.

az provider show --namespace Microsoft.Batch

이 명령은 다음을 반환합니다.

{
    "id": "/subscriptions/####-####/providers/Microsoft.Batch",
    "namespace": "Microsoft.Batch",
    "registrationsState": "Registering",
    "resourceTypes:" [
        ...
    ]
}

Important

앞서 언급한 것처럼 등록 상태에 있는 리소스 공급자에 대해 리소스 생성을 차단하지 않아야 합니다. 등록 상태에서 리소스 공급자를 차단하지 않으면 모든 지역이 완료될 때까지 기다리는 것보다 훨씬 빨리 애플리케이션을 계속할 수 있습니다.

리소스 공급자에 대한 리소스 종류를 보려면 다음을 사용합니다.

az provider show --namespace Microsoft.Batch --query "resourceTypes[*].resourceType" --out table

이 명령은 다음을 반환합니다.

Result
---------------
batchAccounts
operations
locations
locations/quotas

API 버전은 리소스 공급자의 REST API 작업 버전에 해당합니다. 리소스 공급자는 새 기능을 사용하도록 설정할 때 새 버전의 REST API를 릴리스합니다.

리소스 종류의 사용 가능한 API 버전을 가져오려면 다음을 사용합니다.

az provider show --namespace Microsoft.Batch --query "resourceTypes[?resourceType=='batchAccounts'].apiVersions | [0]" --out table

이 명령은 다음을 반환합니다.

Result
---------------
2023-05-01
2022-10-01
2022-06-01
2022-01-01
...

리소스 관리자는 모든 지역에서 지원되지만 배포한 리소스는 모든 지역에서 지원되지 않을 수 있습니다. 또한 구독에 리소스를 지원하는 일부 지역을 사용하지 못하도록 하는 제한 사항이 있을 수 있습니다.

리소스 종류의 지원되는 위치를 가져오려면 다음을 사용합니다.

az provider show --namespace Microsoft.Batch --query "resourceTypes[?resourceType=='batchAccounts'].locations | [0]" --out table

이 명령은 다음을 반환합니다.

Result
---------------
West Europe
East US
East US 2
West US
...

Python

Azure의 모든 리소스 공급자와 구독에 대한 등록 상태를 보려면 다음을 사용합니다.

import os  
from azure.identity import DefaultAzureCredential  
from azure.mgmt.resource import ResourceManagementClient  
  
# Authentication  
credential = DefaultAzureCredential()  
subscription_id = os.environ["AZURE_SUBSCRIPTION_ID"]  
  
# Initialize Resource Management client  
resource_management_client = ResourceManagementClient(credential, subscription_id)  
  
# List available resource providers and select ProviderNamespace and RegistrationState  
providers = resource_management_client.providers.list()  
  
for provider in providers:  
    print(f"ProviderNamespace: {provider.namespace}, RegistrationState: {provider.registration_state}")  

이 명령은 다음을 반환합니다.

ProviderNamespace: Microsoft.AlertsManagement, RegistrationState: Registered
ProviderNamespace: Microsoft.AnalysisServices, RegistrationState: Registered
ProviderNamespace: Microsoft.ApiManagement, RegistrationState: Registered
ProviderNamespace: Microsoft.Authorization, RegistrationState: Registered
ProviderNamespace: Microsoft.Batch, RegistrationState: Registered
...

구독에 대해 등록된 모든 리소스 공급자를 보려면 다음을 사용합니다.

# List available resource providers with RegistrationState "Registered" and select ProviderNamespace and RegistrationState  
providers = resource_management_client.providers.list()  
registered_providers = [provider for provider in providers if provider.registration_state == "Registered"]  
  
# Sort by ProviderNamespace  
sorted_registered_providers = sorted(registered_providers, key=lambda x: x.namespace)  
  
for provider in sorted_registered_providers:  
    print(f"ProviderNamespace: {provider.namespace}, RegistrationState: {provider.registration_state}")  

구독에서 권한을 유지하려면 사용할 준비가 된 리소스 공급자만 등록합니다. 리소스 공급자를 등록하려면 다음을 사용합니다.

import os  
from azure.identity import DefaultAzureCredential  
from azure.mgmt.resource import ResourceManagementClient  
  
# Authentication  
credential = DefaultAzureCredential()  
subscription_id = os.environ["AZURE_SUBSCRIPTION_ID"]  
  
# Initialize Resource Management client  
resource_management_client = ResourceManagementClient(credential, subscription_id)  
  
# Register resource provider  
provider_namespace = "Microsoft.Batch"  
registration_result = resource_management_client.providers.register(provider_namespace)  
  
print(f"ProviderNamespace: {registration_result.namespace}, RegistrationState: {registration_result.registration_state}")  

이 명령은 다음을 반환합니다.

ProviderNamespace: Microsoft.Batch, RegistrationState: Registered

Important

앞서 언급한 것처럼 등록 상태에 있는 리소스 공급자에 대해 리소스 생성을 차단하지 않아야 합니다. 등록 상태에서 리소스 공급자를 차단하지 않으면 모든 지역이 완료될 때까지 기다리는 것보다 훨씬 빨리 애플리케이션을 계속할 수 있습니다.

이전 등록 이후 추가된 위치를 사용하려면 리소스 공급자를 다시 등록합니다. 다시 등록하려면 등록 명령을 다시 실행합니다.

특정 리소스 공급자에 대한 정보를 보려면 다음을 사용합니다.

import os  
from azure.identity import DefaultAzureCredential  
from azure.mgmt.resource import ResourceManagementClient  
  
# Authentication  
credential = DefaultAzureCredential()  
subscription_id = os.environ["AZURE_SUBSCRIPTION_ID"]  
  
# Initialize Resource Management client  
resource_management_client = ResourceManagementClient(credential, subscription_id)  
  
# Get resource provider by ProviderNamespace  
provider_namespace = "Microsoft.Batch"  
provider = resource_management_client.providers.get(provider_namespace)  
  
print(f"ProviderNamespace: {provider.namespace}, RegistrationState: {provider.registration_state}\n")  
  
# Add resource types, locations, and API versions with new lines to separate results  
for resource_type in provider.resource_types:  
    print(f"ResourceType: {resource_type.resource_type}\nLocations: {', '.join(resource_type.locations)}\nAPIVersions: {', '.join(resource_type.api_versions)}\n")  

이 명령은 다음을 반환합니다.

ProviderNamespace: Microsoft.Batch, RegistrationState: Registered

ResourceType: batchAccounts
Locations: West Europe, East US, East US 2, West US, North Central US, Brazil South, North Europe, Central US, East Asia, Japan East, Australia Southeast, Japan West, Korea South, Korea Central, Southeast Asia, South Central US, Australia East, Jio India West, South India, Central India, West India, Canada Central, Canada East, UK South, UK West, West Central US, West US 2, France Central, South Africa North, UAE North, Australia Central, Germany West Central, Switzerland North, Norway East, Brazil Southeast, West US 3, Sweden Central, Qatar Central, Poland Central, East US 2 EUAP, Central US EUAP
APIVersions: 2023-05-01, 2022-10-01, 2022-06-01, 2022-01-01, 2021-06-01, 2021-01-01, 2020-09-01, 2020-05-01, 2020-03-01-preview, 2020-03-01, 2019-08-01, 2019-04-01, 2018-12-01, 2017-09-01, 2017-05-01, 2017-01-01, 2015-12-01, 2015-09-01, 2015-07-01, 2014-05-01-privatepreview

...

리소스 공급자에 대한 리소스 종류를 보려면 다음을 사용합니다.

# Get resource provider by ProviderNamespace  
provider_namespace = "Microsoft.Batch"  
provider = resource_management_client.providers.get(provider_namespace)  
  
# Get ResourceTypeName of the resource types  
resource_type_names = [resource_type.resource_type for resource_type in provider.resource_types]  
  
for resource_type_name in resource_type_names:  
    print(resource_type_name)  

이 명령은 다음을 반환합니다.

batchAccounts
batchAccounts/pools
batchAccounts/detectors
batchAccounts/certificates
operations
locations
locations/quotas
locations/checkNameAvailability
locations/accountOperationResults
locations/virtualMachineSkus
locations/cloudServiceSkus

API 버전은 리소스 공급자의 REST API 작업 버전에 해당합니다. 리소스 공급자는 새 기능을 사용하도록 설정할 때 새 버전의 REST API를 릴리스합니다.

리소스 종류의 사용 가능한 API 버전을 가져오려면 다음을 사용합니다.

# Get resource provider by ProviderNamespace  
provider_namespace = "Microsoft.Batch"  
provider = resource_management_client.providers.get(provider_namespace)  
  
# Filter resource type by ResourceTypeName and get its ApiVersions  
resource_type_name = "batchAccounts"  
api_versions = [  
    resource_type.api_versions  
    for resource_type in provider.resource_types  
    if resource_type.resource_type == resource_type_name  
]  
  
for api_version in api_versions[0]:  
    print(api_version)  

이 명령은 다음을 반환합니다.

2023-05-01
2022-10-01
2022-06-01
2022-01-01
...

리소스 관리자는 모든 지역에서 지원되지만 배포한 리소스는 모든 지역에서 지원되지 않을 수 있습니다. 또한 구독에 리소스를 지원하는 일부 지역을 사용하지 못하도록 하는 제한 사항이 있을 수 있습니다.

리소스 종류의 지원되는 위치를 가져오려면 다음을 사용합니다.

# Get resource provider by ProviderNamespace  
provider_namespace = "Microsoft.Batch"  
provider = resource_management_client.providers.get(provider_namespace)  
  
# Filter resource type by ResourceTypeName and get its Locations  
resource_type_name = "batchAccounts"  
locations = [  
    resource_type.locations  
    for resource_type in provider.resource_types  
    if resource_type.resource_type == resource_type_name  
]  
  
for location in locations[0]:  
    print(location)  

이 명령은 다음을 반환합니다.

West Europe
East US
East US 2
West US
...

다음 단계