# Compiler Warning ASPIRERADIUS003

<Badge
  text="Version introduced: 13.5"
  variant="note"
  size="large"
  class:list={'mb-1'}
/>

> Radius cloud provider types and members are for evaluation purposes only and are subject to change or removal in future updates. Suppress this diagnostic to proceed.

This diagnostic warning is reported when using the experimental Radius cloud-provider APIs from the `Aspire.Hosting.Radius` integration, `WithAzureProvider` and `WithAwsProvider`.

The `[Experimental]` gate is on `WithAzureProvider` and `WithAwsProvider` themselves. The credential callbacks you configure through them—such as `WithServicePrincipal`, `WithWorkloadIdentity`, `WithAccessKey`, and `WithIrsa`—are part of the same experimental surface; they don't each emit `ASPIRERADIUS003` on their own.

These APIs configure the Azure and AWS cloud providers that the Radius publisher emits and that the deploy pipeline registers credentials for.

## Example

The following code generates `ASPIRERADIUS003`:

```csharp title="AppHost.cs"
var builder = DistributedApplication.CreateBuilder(args);

var clientSecret = builder.AddParameter("azure-sp-secret", secret: true);

builder.AddRadiusEnvironment("radius")
    .WithAzureProvider(
        subscriptionId: "00000000-0000-0000-0000-000000000000",
        resourceGroup: "rg-radius",
        azure => azure.WithServicePrincipal(
            tenantId: "11111111-1111-1111-1111-111111111111",
            clientId: "22222222-2222-2222-2222-222222222222",
            clientSecret: clientSecret));

builder.Build().Run();
```

## To correct this warning

Suppress the warning with one of the following methods:

- Set the severity of the rule in the _.editorconfig_ file.

  ```ini title=".editorconfig"
  [*.{cs,vb}]
  dotnet_diagnostic.ASPIRERADIUS003.severity = none
  ```

  For more information about editor config files, see [Configuration files for code analysis rules](/diagnostics/overview/#suppress-in-the-editorconfig-file).

- Add the following `PropertyGroup` to your project file:

  ```xml title="C# project file"
  <PropertyGroup>
      <NoWarn>$(NoWarn);ASPIRERADIUS003</NoWarn>
  </PropertyGroup>
  ```

- Suppress in code with the `#pragma warning disable ASPIRERADIUS003` directive:

  ```csharp title="Suppressing the warning"
  var clientSecret = builder.AddParameter("azure-sp-secret", secret: true);

  #pragma warning disable ASPIRERADIUS003
  builder.AddRadiusEnvironment("radius")
      .WithAzureProvider(
          subscriptionId: "00000000-0000-0000-0000-000000000000",
          resourceGroup: "rg-radius",
          azure => azure.WithServicePrincipal(
              tenantId: "11111111-1111-1111-1111-111111111111",
              clientId: "22222222-2222-2222-2222-222222222222",
              clientSecret: clientSecret));
  #pragma warning restore ASPIRERADIUS003
  ```

## See also

- [ASPIRERADIUS004](/diagnostics/aspireradius004/) - Radius infrastructure customization APIs
- [ASPIRERADIUS006](/diagnostics/aspireradius006/) - Radius secret store APIs
- [ASPIRERADIUS057](/diagnostics/aspireradius057/) - Radius container image API