Class FeatureResource
- Namespace
- Azure.ResourceManager.Resources
- Assembly
- Azure.ResourceManager.dll
A Class representing a Feature along with the instance operations that can be performed on it.
public class FeatureResource : ArmResource, IJsonModel<FeatureData>, IPersistableModel<FeatureData>
- Inheritance
-
FeatureResource
- Implements
-
IJsonModel<FeatureData>IPersistableModel<FeatureData>
- Inherited Members
Constructors
FeatureResource()
Initializes a new instance of the FeatureResource class for mocking.
protected FeatureResource()
Fields
ResourceType
Gets the resource type for the operations.
public static readonly ResourceType ResourceType
Field Value
- ResourceType
Properties
Data
Gets the data representing this Feature.
public virtual FeatureData Data { get; }
Property Value
Exceptions
- InvalidOperationException
Throws if there is no data loaded in the current instance.
HasData
Gets whether or not the current instance has data.
public virtual bool HasData { get; }
Property Value
Methods
CreateResourceIdentifier(string, string, string)
Generate the resource identifier of a FeatureResource instance.
public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceProviderNamespace, string featureName)
Parameters
subscriptionId
stringThe subscriptionId.
resourceProviderNamespace
stringThe resourceProviderNamespace.
featureName
stringThe featureName.
Returns
- ResourceIdentifier
Get(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(CancellationToken cancellationToken = default)
Parameters
cancellationToken
CancellationTokenThe cancellation token to use.
Returns
- Response<FeatureResource>
GetAsync(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(CancellationToken cancellationToken = default)
Parameters
cancellationToken
CancellationTokenThe cancellation token to use.
Returns
- Task<Response<FeatureResource>>
Register(CancellationToken)
Registers the preview feature for the subscription.
- Request Path/subscriptions/{subscriptionId}/providers/Microsoft.Features/providers/{resourceProviderNamespace}/features/{featureName}/register
- Operation IdFeatures_Register
- Default Api Version2021-07-01
- ResourceFeatureResource
public virtual Response<FeatureResource> Register(CancellationToken cancellationToken = default)
Parameters
cancellationToken
CancellationTokenThe cancellation token to use.
Returns
- Response<FeatureResource>
RegisterAsync(CancellationToken)
Registers the preview feature for the subscription.
- Request Path/subscriptions/{subscriptionId}/providers/Microsoft.Features/providers/{resourceProviderNamespace}/features/{featureName}/register
- Operation IdFeatures_Register
- Default Api Version2021-07-01
- ResourceFeatureResource
public virtual Task<Response<FeatureResource>> RegisterAsync(CancellationToken cancellationToken = default)
Parameters
cancellationToken
CancellationTokenThe cancellation token to use.
Returns
- Task<Response<FeatureResource>>
Unregister(CancellationToken)
Unregisters the preview feature for the subscription.
- Request Path/subscriptions/{subscriptionId}/providers/Microsoft.Features/providers/{resourceProviderNamespace}/features/{featureName}/unregister
- Operation IdFeatures_Unregister
- Default Api Version2021-07-01
- ResourceFeatureResource
public virtual Response<FeatureResource> Unregister(CancellationToken cancellationToken = default)
Parameters
cancellationToken
CancellationTokenThe cancellation token to use.
Returns
- Response<FeatureResource>
UnregisterAsync(CancellationToken)
Unregisters the preview feature for the subscription.
- Request Path/subscriptions/{subscriptionId}/providers/Microsoft.Features/providers/{resourceProviderNamespace}/features/{featureName}/unregister
- Operation IdFeatures_Unregister
- Default Api Version2021-07-01
- ResourceFeatureResource
public virtual Task<Response<FeatureResource>> UnregisterAsync(CancellationToken cancellationToken = default)
Parameters
cancellationToken
CancellationTokenThe cancellation token to use.
Returns
- Task<Response<FeatureResource>>