Class FeatureCollection
- Namespace
- Azure.ResourceManager.Resources
- Assembly
- Azure.ResourceManager.dll
A class representing a collection of FeatureResource and their operations. Each FeatureResource in the collection will belong to the same instance of ResourceProviderResource. To get a FeatureCollection instance call the GetFeatures method from an instance of ResourceProviderResource.
public class FeatureCollection : ArmCollection, IEnumerable<FeatureResource>, IEnumerable, IAsyncEnumerable<FeatureResource>
- Inheritance
-
FeatureCollection
- Implements
-
IAsyncEnumerable<FeatureResource>
- Inherited Members
Constructors
FeatureCollection()
Initializes a new instance of the FeatureCollection class for mocking.
protected FeatureCollection()
Methods
Exists(string, CancellationToken)
Checks to see if the resource exists in azure.
- Request Path/subscriptions/{subscriptionId}/providers/Microsoft.Features/providers/{resourceProviderNamespace}/features/{featureName}
- Operation IdFeatures_Get
- Default Api Version2021-07-01
- ResourceFeatureResource
public virtual Response<bool> Exists(string featureName, CancellationToken cancellationToken = default)
Parameters
featureName
stringThe name of the feature to get.
cancellationToken
CancellationTokenThe cancellation token to use.
Returns
- Response<bool>
Exceptions
- ArgumentException
featureName
is an empty string, and was expected to be non-empty.- ArgumentNullException
featureName
is null.
ExistsAsync(string, CancellationToken)
Checks to see if the resource exists in azure.
- Request Path/subscriptions/{subscriptionId}/providers/Microsoft.Features/providers/{resourceProviderNamespace}/features/{featureName}
- Operation IdFeatures_Get
- Default Api Version2021-07-01
- ResourceFeatureResource
public virtual Task<Response<bool>> ExistsAsync(string featureName, CancellationToken cancellationToken = default)
Parameters
featureName
stringThe name of the feature to get.
cancellationToken
CancellationTokenThe cancellation token to use.
Returns
Exceptions
- ArgumentException
featureName
is an empty string, and was expected to be non-empty.- ArgumentNullException
featureName
is null.
Get(string, CancellationToken)
Gets the preview feature with the specified name.
- Request Path/subscriptions/{subscriptionId}/providers/Microsoft.Features/providers/{resourceProviderNamespace}/features/{featureName}
- Operation IdFeatures_Get
- Default Api Version2021-07-01
- ResourceFeatureResource
public virtual Response<FeatureResource> Get(string featureName, CancellationToken cancellationToken = default)
Parameters
featureName
stringThe name of the feature to get.
cancellationToken
CancellationTokenThe cancellation token to use.
Returns
- Response<FeatureResource>
Exceptions
- ArgumentException
featureName
is an empty string, and was expected to be non-empty.- ArgumentNullException
featureName
is null.
GetAll(CancellationToken)
Gets all the preview features in a provider namespace that are available through AFEC for the subscription.
- Request Path/subscriptions/{subscriptionId}/providers/Microsoft.Features/providers/{resourceProviderNamespace}/features
- Operation IdFeatures_List
- Default Api Version2021-07-01
- ResourceFeatureResource
public virtual Pageable<FeatureResource> GetAll(CancellationToken cancellationToken = default)
Parameters
cancellationToken
CancellationTokenThe cancellation token to use.
Returns
- Pageable<FeatureResource>
A collection of FeatureResource that may take multiple service requests to iterate over.
GetAllAsync(CancellationToken)
Gets all the preview features in a provider namespace that are available through AFEC for the subscription.
- Request Path/subscriptions/{subscriptionId}/providers/Microsoft.Features/providers/{resourceProviderNamespace}/features
- Operation IdFeatures_List
- Default Api Version2021-07-01
- ResourceFeatureResource
public virtual AsyncPageable<FeatureResource> GetAllAsync(CancellationToken cancellationToken = default)
Parameters
cancellationToken
CancellationTokenThe cancellation token to use.
Returns
- AsyncPageable<FeatureResource>
An async collection of FeatureResource that may take multiple service requests to iterate over.
GetAsync(string, CancellationToken)
Gets the preview feature with the specified name.
- Request Path/subscriptions/{subscriptionId}/providers/Microsoft.Features/providers/{resourceProviderNamespace}/features/{featureName}
- Operation IdFeatures_Get
- Default Api Version2021-07-01
- ResourceFeatureResource
public virtual Task<Response<FeatureResource>> GetAsync(string featureName, CancellationToken cancellationToken = default)
Parameters
featureName
stringThe name of the feature to get.
cancellationToken
CancellationTokenThe cancellation token to use.
Returns
- Task<Response<FeatureResource>>
Exceptions
- ArgumentException
featureName
is an empty string, and was expected to be non-empty.- ArgumentNullException
featureName
is null.
GetIfExists(string, CancellationToken)
Tries to get details for this resource from the service.
- Request Path/subscriptions/{subscriptionId}/providers/Microsoft.Features/providers/{resourceProviderNamespace}/features/{featureName}
- Operation IdFeatures_Get
- Default Api Version2021-07-01
- ResourceFeatureResource
public virtual NullableResponse<FeatureResource> GetIfExists(string featureName, CancellationToken cancellationToken = default)
Parameters
featureName
stringThe name of the feature to get.
cancellationToken
CancellationTokenThe cancellation token to use.
Returns
- NullableResponse<FeatureResource>
Exceptions
- ArgumentException
featureName
is an empty string, and was expected to be non-empty.- ArgumentNullException
featureName
is null.
GetIfExistsAsync(string, CancellationToken)
Tries to get details for this resource from the service.
- Request Path/subscriptions/{subscriptionId}/providers/Microsoft.Features/providers/{resourceProviderNamespace}/features/{featureName}
- Operation IdFeatures_Get
- Default Api Version2021-07-01
- ResourceFeatureResource
public virtual Task<NullableResponse<FeatureResource>> GetIfExistsAsync(string featureName, CancellationToken cancellationToken = default)
Parameters
featureName
stringThe name of the feature to get.
cancellationToken
CancellationTokenThe cancellation token to use.
Returns
- Task<NullableResponse<FeatureResource>>
Exceptions
- ArgumentException
featureName
is an empty string, and was expected to be non-empty.- ArgumentNullException
featureName
is null.