providers
Creates, updates, deletes, gets or lists a providers
resource.
Overview
Name | providers |
Type | Resource |
Id | azure.resources.providers |
Fields
The following fields are returned by SELECT
queries:
- get
- list
OK - Returns information about the resource provider.
Name | Datatype | Description |
---|---|---|
id | string | The provider ID. |
namespace | string | The namespace of the resource provider. |
providerAuthorizationConsentState | string | The provider authorization consent state. |
registrationPolicy | string | The registration policy of the resource provider. |
registrationState | string | The registration state of the resource provider. |
resourceTypes | array | The collection of provider resource types. |
OK - Returns an array of resource providers.
Name | Datatype | Description |
---|---|---|
id | string | The provider ID. |
namespace | string | The namespace of the resource provider. |
providerAuthorizationConsentState | string | The provider authorization consent state. |
registrationPolicy | string | The registration policy of the resource provider. |
registrationState | string | The registration state of the resource provider. |
resourceTypes | array | The collection of provider resource types. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | resourceProviderNamespace , subscriptionId | $expand | Gets the specified resource provider. |
list | select | subscriptionId | $expand | Gets all resource providers for a subscription. |
unregister | exec | resourceProviderNamespace , subscriptionId | Unregisters a subscription from a resource provider. | |
register_at_management_group_scope | exec | resourceProviderNamespace , groupId | Registers 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_permissions | exec | resourceProviderNamespace , subscriptionId | Get the provider permissions. | |
register | exec | resourceProviderNamespace , subscriptionId | Registers 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.
Name | Datatype | Description |
---|---|---|
groupId | string | The management group ID. |
resourceProviderNamespace | string | The namespace of the resource provider to register. |
subscriptionId | string (uuid) | The ID of the target subscription. The value must be an UUID. |
$expand | string | The 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
- get
- list
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 }}'
;
Gets all resource providers for a subscription.
SELECT
id,
namespace,
providerAuthorizationConsentState,
registrationPolicy,
registrationState,
resourceTypes
FROM azure.resources.providers
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND $expand = '{{ $expand }}'
;
Lifecycle Methods
- unregister
- register_at_management_group_scope
- provider_permissions
- register
Unregisters a subscription from a resource provider.
EXEC azure.resources.providers.unregister
@resourceProviderNamespace='{{ resourceProviderNamespace }}' --required,
@subscriptionId='{{ subscriptionId }}' --required
;
Registers 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.
EXEC azure.resources.providers.register_at_management_group_scope
@resourceProviderNamespace='{{ resourceProviderNamespace }}' --required,
@groupId='{{ groupId }}' --required
;
Get the provider permissions.
EXEC azure.resources.providers.provider_permissions
@resourceProviderNamespace='{{ resourceProviderNamespace }}' --required,
@subscriptionId='{{ subscriptionId }}' --required
;
Registers a subscription with a resource provider.
EXEC azure.resources.providers.register
@resourceProviderNamespace='{{ resourceProviderNamespace }}' --required,
@subscriptionId='{{ subscriptionId }}' --required
@@json=
'{
"thirdPartyProviderConsent": "{{ thirdPartyProviderConsent }}"
}'
;