Class TenantCollection
- Namespace
- Azure.ResourceManager.Resources
- Assembly
- Azure.ResourceManager.dll
A class representing collection of TenantResource and their operations over their parent.
public class TenantCollection : ArmCollection, IEnumerable<TenantResource>, IEnumerable, IAsyncEnumerable<TenantResource>
- Inheritance
-
TenantCollection
- Implements
-
IAsyncEnumerable<TenantResource>
- Inherited Members
Constructors
TenantCollection()
Initializes a new instance of the TenantCollection class for mocking.
protected TenantCollection()
Methods
CheckResourceName(ResourceNameValidationContent, CancellationToken)
A resource name is valid if it is not a reserved word, does not contains a reserved word and does not start with a reserved word
- Request Path/providers/Microsoft.Resources/checkResourceName
- Operation IdcheckResourceName
- Default Api Version2022-12-01
public virtual Response<ResourceNameValidationResult> CheckResourceName(ResourceNameValidationContent content = null, CancellationToken cancellationToken = default)
Parameters
content
ResourceNameValidationContentResource object with values for resource name and resource type.
cancellationToken
CancellationTokenThe cancellation token to use.
Returns
- Response<ResourceNameValidationResult>
CheckResourceNameAsync(ResourceNameValidationContent, CancellationToken)
A resource name is valid if it is not a reserved word, does not contains a reserved word and does not start with a reserved word
- Request Path/providers/Microsoft.Resources/checkResourceName
- Operation IdcheckResourceName
- Default Api Version2022-12-01
public virtual Task<Response<ResourceNameValidationResult>> CheckResourceNameAsync(ResourceNameValidationContent content = null, CancellationToken cancellationToken = default)
Parameters
content
ResourceNameValidationContentResource object with values for resource name and resource type.
cancellationToken
CancellationTokenThe cancellation token to use.
Returns
- Task<Response<ResourceNameValidationResult>>
GetAll(CancellationToken)
Gets the tenants for your account.
- Request Path/tenants
- Operation IdTenants_List
- Default Api Version2022-12-01
- ResourceTenantResource
public virtual Pageable<TenantResource> GetAll(CancellationToken cancellationToken = default)
Parameters
cancellationToken
CancellationTokenThe cancellation token to use.
Returns
- Pageable<TenantResource>
A collection of TenantResource that may take multiple service requests to iterate over.
GetAllAsync(CancellationToken)
Gets the tenants for your account.
- Request Path/tenants
- Operation IdTenants_List
- Default Api Version2022-12-01
- ResourceTenantResource
public virtual AsyncPageable<TenantResource> GetAllAsync(CancellationToken cancellationToken = default)
Parameters
cancellationToken
CancellationTokenThe cancellation token to use.
Returns
- AsyncPageable<TenantResource>
An async collection of TenantResource that may take multiple service requests to iterate over.