你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
ProvidersOperations Class
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
<xref:providers> attribute.
- Inheritance
-
builtins.objectProvidersOperations
Constructor
ProvidersOperations(*args, **kwargs)
Methods
get |
Gets the specified resource provider. |
get_at_tenant_scope |
Gets the specified resource provider at the tenant level. |
list |
Gets all resource providers for a subscription. |
list_at_tenant_scope |
Gets all resource providers for the tenant. |
register |
Registers a subscription with a resource provider. |
register_at_management_group_scope |
Registers a management group with a resource provider. |
unregister |
Unregisters a subscription from a resource provider. |
get
Gets the specified resource provider.
get(resource_provider_namespace: str, expand: str | None = None, **kwargs: Any) -> Provider
Parameters
Name | Description |
---|---|
resource_provider_namespace
Required
|
The namespace of the resource provider. Required. |
expand
Required
|
The $expand query parameter. For example, to include property aliases in response, use $expand=resourceTypes/aliases. Default value is None. |
Returns
Type | Description |
---|---|
Provider or the result of cls(response) |
Exceptions
Type | Description |
---|---|
get_at_tenant_scope
Gets the specified resource provider at the tenant level.
get_at_tenant_scope(resource_provider_namespace: str, expand: str | None = None, **kwargs: Any) -> Provider
Parameters
Name | Description |
---|---|
resource_provider_namespace
Required
|
The namespace of the resource provider. Required. |
expand
Required
|
The $expand query parameter. For example, to include property aliases in response, use $expand=resourceTypes/aliases. Default value is None. |
Returns
Type | Description |
---|---|
Provider or the result of cls(response) |
Exceptions
Type | Description |
---|---|
list
Gets all resource providers for a subscription.
list(top: int | None = None, expand: str | None = None, **kwargs: Any) -> Iterable[Provider]
Parameters
Name | Description |
---|---|
top
Required
|
The number of results to return. If null is passed returns all deployments. Default value is None. |
expand
Required
|
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. Default value is None. |
Returns
Type | Description |
---|---|
An iterator like instance of either Provider or the result of cls(response) |
Exceptions
Type | Description |
---|---|
list_at_tenant_scope
Gets all resource providers for the tenant.
list_at_tenant_scope(top: int | None = None, expand: str | None = None, **kwargs: Any) -> Iterable[Provider]
Parameters
Name | Description |
---|---|
top
Required
|
The number of results to return. If null is passed returns all providers. Default value is None. |
expand
Required
|
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. Default value is None. |
Returns
Type | Description |
---|---|
An iterator like instance of either Provider or the result of cls(response) |
Exceptions
Type | Description |
---|---|
register
Registers a subscription with a resource provider.
register(resource_provider_namespace: str, **kwargs: Any) -> Provider
Parameters
Name | Description |
---|---|
resource_provider_namespace
Required
|
The namespace of the resource provider to register. Required. |
Returns
Type | Description |
---|---|
Provider or the result of cls(response) |
Exceptions
Type | Description |
---|---|
register_at_management_group_scope
Registers a management group with a resource provider.
register_at_management_group_scope(resource_provider_namespace: str, group_id: str, **kwargs: Any) -> None
Parameters
Name | Description |
---|---|
resource_provider_namespace
Required
|
The namespace of the resource provider to register. Required. |
group_id
Required
|
The management group ID. Required. |
Returns
Type | Description |
---|---|
None or the result of cls(response) |
Exceptions
Type | Description |
---|---|
unregister
Unregisters a subscription from a resource provider.
unregister(resource_provider_namespace: str, **kwargs: Any) -> Provider
Parameters
Name | Description |
---|---|
resource_provider_namespace
Required
|
The namespace of the resource provider to unregister. Required. |
Returns
Type | Description |
---|---|
Provider or the result of cls(response) |
Exceptions
Type | Description |
---|---|
Attributes
models
models = <module 'azure.mgmt.resource.resources.v2020_10_01.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.11.9\\x64\\Lib\\site-packages\\azure\\mgmt\\resource\\resources\\v2020_10_01\\models\\__init__.py'>