Skip to main content

providers

Creates, updates, deletes, gets or lists a providers resource.

Overview

Nameproviders
TypeResource
Idazure.resources.providers

Fields

The following fields are returned by SELECT queries:

OK - Returns information about the resource provider.

NameDatatypeDescription
idstringThe provider ID.
namespacestringThe namespace of the resource provider.
providerAuthorizationConsentStatestringThe provider authorization consent state.
registrationPolicystringThe registration policy of the resource provider.
registrationStatestringThe registration state of the resource provider.
resourceTypesarrayThe collection of provider resource types.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresourceProviderNamespace, subscriptionId$expandGets the specified resource provider.
listselectsubscriptionId$expandGets all resource providers for a subscription.
unregisterexecresourceProviderNamespace, subscriptionIdUnregisters a subscription from a resource provider.
register_at_management_group_scopeexecresourceProviderNamespace, groupIdRegisters a management group with a resource provider. Use this operation to register a resource provider with resource types that can be deployed at the management group scope. It does not recursively register subscriptions within the management group. Instead, you must register subscriptions individually.
provider_permissionsexecresourceProviderNamespace, subscriptionIdGet the provider permissions.
registerexecresourceProviderNamespace, subscriptionIdRegisters a subscription with a resource provider.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
groupIdstringThe management group ID.
resourceProviderNamespacestringThe namespace of the resource provider to register.
subscriptionIdstring (uuid)The ID of the target subscription. The value must be an UUID.
$expandstringThe properties to include in the results. For example, use &$expand=metadata in the query string to retrieve resource provider metadata. To include property aliases in response, use $expand=resourceTypes/aliases.

SELECT examples

Gets the specified resource provider.

SELECT
id,
namespace,
providerAuthorizationConsentState,
registrationPolicy,
registrationState,
resourceTypes
FROM azure.resources.providers
WHERE resourceProviderNamespace = '{{ resourceProviderNamespace }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
AND $expand = '{{ $expand }}'
;

Lifecycle Methods

Unregisters a subscription from a resource provider.

EXEC azure.resources.providers.unregister 
@resourceProviderNamespace='{{ resourceProviderNamespace }}' --required,
@subscriptionId='{{ subscriptionId }}' --required
;