Skip to content

Latest commit

 

History

History
347 lines (249 loc) · 14.4 KB

preview-features.md

File metadata and controls

347 lines (249 loc) · 14.4 KB
title description ms.topic ms.date ms.custom
Set up preview features in Azure subscription
Describes how to list, register, or unregister preview features in your Azure subscription for a resource provider.
how-to
08/18/2021
devx-track-azurecli, devx-track-azurepowershell

Set up preview features in Azure subscription

This article shows you how to manage preview features in your Azure subscription. Preview features let you opt in to new functionality before it's released. Some preview features are available to anyone who wants to opt in. Other preview features require approval from the product team.

Azure Feature Exposure Control (AFEC) is available through the Microsoft.Features namespace. Preview features have the following format for the resource ID:

Microsoft.Features/providers/{resourceProviderNamespace}/features/{featureName}

List preview features

You can list all the preview features and their registration states for an Azure subscription.

The portal only shows a preview feature when the service that owns the feature has explicitly opted in to the preview features management experience.

  1. Sign in to the Azure portal.

  2. In the search box, enter subscriptions and select Subscriptions.

    :::image type="content" source="./media/preview-features/search.png" alt-text="Azure portal search.":::

  3. Select the link for your subscription's name.

    :::image type="content" source="./media/preview-features/subscriptions.png" alt-text="Select Azure subscription.":::

  4. From the left menu, under Settings select Preview features.

    :::image type="content" source="./media/preview-features/preview-features-menu.png" alt-text="Azure preview features menu.":::

  5. You see a list of available preview features and your current registration status.

    :::image type="content" source="./media/preview-features/preview-features-list.png" alt-text="Azure portal list of preview features.":::

  6. From Preview features you can filter the list by name, State, or Type:

    • Filter by name: Must contain text from a preview feature's name, not the Display name.
    • State: Select the drop-down menu and choose a state. The portal doesn't filter by Unregistered.
    • Type: Select the drop-down menu and choose a type.

    :::image type="content" source="./media/preview-features/filter.png" alt-text="Azure portal filter preview features.":::

To list all the subscription's preview features, use the az feature list command.

The default output for Azure CLI is JSON. For more information about other output formats, see Output formats for Azure CLI commands.

az feature list
{
  "id": "/subscriptions/11111111-1111-1111-1111-111111111111/providers/Microsoft.Features/providers/
    Microsoft.Compute/features/InGuestPatchVMPreview",
  "name": "Microsoft.Compute/InGuestPatchVMPreview",
  "properties": {
    "state": "NotRegistered"
  },
  "type": "Microsoft.Features/providers/features"
}

To filter the output for a specific resource provider, use the namespace parameter. In this example, the output parameter specifies a table format.

az feature list --namespace Microsoft.Compute --output table
Name                                                RegistrationState
-------------------------------------------------   -------------------
Microsoft.Compute/AHUB                              Unregistered
Microsoft.Compute/AllowManagedDisksReplaceOSDisk    Registered
Microsoft.Compute/AllowPreReleaseRegions            Pending
Microsoft.Compute/InGuestPatchVMPreview             NotRegistered

To filter output for a specific preview feature, use the az feature show command.

az feature show --name InGuestPatchVMPreview --namespace Microsoft.Compute --output table
Name                                     RegistrationState
---------------------------------------  -------------------
Microsoft.Compute/InGuestPatchVMPreview  NotRegistered

To list all the subscription's preview features, use the Get-AzProviderFeature cmdlet.

Get-AzProviderFeature -ListAvailable
FeatureName      ProviderName     RegistrationState
-----------      ------------     -----------------
betaAccess       Microsoft.AAD    NotRegistered
previewAccess    Microsoft.AAD    Registered
tipAccess        Microsoft.AAD    Pending
testAccess       Microsoft.AAD    Unregistered

To filter the output for a specific resource provider, use the ProviderNamespace parameter. The default output shows only the registered features. To display all preview features for a resource provider, use the ListAvailable parameter with the ProviderNamespace parameter.

Get-AzProviderFeature -ProviderNamespace "Microsoft.Compute" -ListAvailable
FeatureName                          ProviderName        RegistrationState
-----------                          ------------        -----------------
AHUB                                 Microsoft.Compute   Unregistered
AllowManagedDisksReplaceOSDisk       Microsoft.Compute   Registered
AllowPreReleaseRegions               Microsoft.Compute   Pending
InGuestPatchVMPreview                Microsoft.Compute   NotRegistered

You can filter the output for a specific preview feature using the FeatureName parameter.

Get-AzProviderFeature -FeatureName "InGuestPatchVMPreview" -ProviderNamespace "Microsoft.Compute"
FeatureName             ProviderName        RegistrationState
-----------             ------------        -----------------
InGuestPatchVMPreview   Microsoft.Compute   NotRegistered

Register preview feature

Register a preview feature in your Azure subscription to expose more functionality for a resource provider. Some preview features require approval.

After a preview feature is registered in your subscription, you'll see one of two states: Registered or Pending.

  • For a preview feature that doesn't require approval, the state is Registered.
  • If a preview feature requires approval, the registration state is Pending.
    • To request approval, submit an Azure support request.
    • After the registration is approved, the preview feature's state changes to Registered.
  1. Sign in to the Azure portal.

  2. In the search box, enter subscriptions and select Subscriptions.

  3. Select the link for your subscription's name.

  4. From the left menu, under Settings select Preview features.

  5. Select the link for the preview feature you want to register.

  6. Select Register.

    :::image type="content" source="./media/preview-features/register.png" alt-text="Azure portal register preview feature.":::

  7. Select OK.

The Preview features screen refreshes and the preview feature's State is displayed.

To register a preview feature, use the az feature register command.

az feature register --name InGuestPatchVMPreview --namespace Microsoft.Compute
{
  "id": "/subscriptions/11111111-1111-1111-1111-111111111111/providers/Microsoft.Features/providers/
    Microsoft.Compute/features/InGuestPatchVMPreview",
  "name": "Microsoft.Compute/InGuestPatchVMPreview",
  "properties": {
    "state": "Registering"
  },
  "type": "Microsoft.Features/providers/features"
}

To view the registration's status, use the az feature show command.

az feature show --name InGuestPatchVMPreview --namespace Microsoft.Compute --output table
Name                                     RegistrationState
---------------------------------------  -------------------
Microsoft.Compute/InGuestPatchVMPreview  Registered

Note

When the register command runs, a message is displayed that after the feature is registered, to run az provider register --namespace <provider-name> to propagate the changes.

To register a preview feature, use the Register-AzProviderFeature cmdlet.

Register-AzProviderFeature -FeatureName "InGuestPatchVMPreview" -ProviderNamespace "Microsoft.Compute"
FeatureName             ProviderName        RegistrationState
-----------             ------------        -----------------
InGuestPatchVMPreview   Microsoft.Compute   Registering

To view the registration's status, use the Get-AzProviderFeature cmdlet.

Get-AzProviderFeature -FeatureName "InGuestPatchVMPreview" -ProviderNamespace "Microsoft.Compute"
FeatureName             ProviderName        RegistrationState
-----------             ------------        -----------------
InGuestPatchVMPreview   Microsoft.Compute   Registered

Unregister preview feature

When you've finished using a preview feature, unregister it from your Azure subscription. You may notice two different statuses after unregistering the feature. If you unregister through the portal, the status is set to Not registered. If you unregister through Azure CLI, PowerShell, or REST API, the status is set to Unregistered. The status is different because the portal deletes the feature registration, but the commands unregister the feature. In both cases, the feature is no longer available in your subscription. In both cases, you can opt in to the feature again by re-registering it.

You can unregister preview features from Preview features. The State changes to Not registered.

  1. Sign in to the Azure portal.

  2. In the search box, enter subscriptions and select Subscriptions.

  3. Select the link for your subscription's name.

  4. From the left menu, under Settings select Preview features.

  5. Select the link for the preview feature you want to unregister.

  6. Select Unregister.

    :::image type="content" source="./media/preview-features/unregister.png" alt-text="Azure portal unregister preview feature.":::

  7. Select OK.

To unregister a preview feature, use the az feature unregister command. The RegistrationState state changes to Unregistered.

az feature unregister --name InGuestPatchVMPreview --namespace Microsoft.Compute
{
  "id": "/subscriptions/11111111-1111-1111-1111-111111111111/providers/Microsoft.Features/providers/
    Microsoft.Compute/features/InGuestPatchVMPreview",
  "name": "Microsoft.Compute/InGuestPatchVMPreview",
  "properties": {
    "state": "Unregistering"
  },
  "type": "Microsoft.Features/providers/features"
}

To view the unregistration's status, use the az feature show command.

az feature show --name InGuestPatchVMPreview --namespace Microsoft.Compute --output table
Name                                     RegistrationState
---------------------------------------  -------------------
Microsoft.Compute/InGuestPatchVMPreview  Unregistered

Note

When the unregister command runs, a message is displayed that after the feature is unregistered, to run az provider register --namespace <provider-name> to propagate the changes.

To find Unregistered preview features, use the following command. Replace <ResourceProvider.Name> with a provider name such as Microsoft.Compute.

The following example displays an Unregistered preview feature for the Microsoft.Compute resource provider.

az feature list --namespace <ResourceProvider.Name> --query "[?properties.state=='Unregistered'].{Name:name, RegistrationState:properties.state}" --output table
Name                                     RegistrationState
---------------------------------------  -------------------
Microsoft.Compute/InGuestPatchVMPreview  Unregistered

To unregister a preview feature, use the Unregister-AzProviderFeature cmdlet. The RegistrationState state changes to Unregistered.

Unregister-AzProviderFeature -FeatureName "InGuestPatchVMPreview" -ProviderNamespace "Microsoft.Compute"
FeatureName             ProviderName        RegistrationState
-----------             ------------        -----------------
InGuestPatchVMPreview   Microsoft.Compute   Unregistering

To view the unregistration's status, use the Get-AzProviderFeature cmdlet.

Get-AzProviderFeature -FeatureName "InGuestPatchVMPreview" -ProviderNamespace "Microsoft.Compute"
FeatureName             ProviderName        RegistrationState
-----------             ------------        -----------------
InGuestPatchVMPreview   Microsoft.Compute   Unregistered

The following example displays an Unregistered preview feature for the Microsoft.Compute resource provider.

Get-AzProviderFeature  -ProviderNamespace "Microsoft.Compute" -ListAvailable | Where-Object { $_.RegistrationState -eq "Unregistered" }
FeatureName             ProviderName        RegistrationState
-----------             ------------        -----------------
InGuestPatchVMPreview   Microsoft.Compute   Unregistered

Next steps