Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use correct method name in ServiceBus #1757

Merged
merged 2 commits into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 3 additions & 30 deletions docs/messaging/azure-service-bus-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,55 +113,28 @@ The Service Bus integration supports <xref:Microsoft.Extensions.Configuration?di
}
```

If you have set up your configurations in the `Aspire:Azure:Messaging:ServiceBus` section of your _:::no-loc text="appsettings.json":::_ file you can just call the method `AddAzureServiceBus` without passing any parameters.
If you have set up your configurations in the `Aspire:Azure:Messaging:ServiceBus` section of your _:::no-loc text="appsettings.json":::_ file you can just call the method `AddAzureServiceBusClient` without passing any parameters.

### Use inline delegates

You can also pass the `Action<AzureMessagingServiceBusSettings>` delegate to set up some or all the options inline, for example to set the `FullyQualifiedNamespace`:

```csharp
builder.AddAzureServiceBus(
builder.AddAzureServiceBusClient(
"messaging",
static settings => settings.FullyQualifiedNamespace = "YOUR_SERVICE_BUS_NAMESPACE");
```

You can also set up the [ServiceBusClientOptions](/dotnet/api/azure.messaging.servicebus.servicebusclientoptions) using `Action<IAzureClientBuilder<ServiceBusClient, ServiceBusClientOptions>>` delegate, the second parameter of the `AddAzureServiceBus` method. For example to set the `ServiceBusClient` ID to identify the client:

```csharp
builder.AddAzureServiceBus(
builder.AddAzureServiceBusClient(
"messaging",
static clientBuilder =>
clientBuilder.ConfigureOptions(
IEvangelist marked this conversation as resolved.
Show resolved Hide resolved
static options => options.Identifier = "CLIENT_ID"));
```

### Named instances

If you want to add more than one [ServiceBusClient](/dotnet/api/azure.messaging.servicebus.servicebusclient) you can use named instances. Load the named configuration section from the JSON config by calling the `AddAzureServiceBus` method and passing in the `INSTANCE_NAME`.

```csharp
builder.AddAzureServiceBus("INSTANCE_NAME");
```

The corresponding configuration JSON is defined as follows:

```json
{
"Aspire": {
"Azure": {
"Messaging": {
"INSTANCE_NAME": {
"FullyQualifiedNamespace": "YOUR_SERVICE_BUS_NAMESPACE",
"ClientOptions": {
"Identifier": "CLIENT_ID"
}
}
}
}
}
}
```

### Configuration options

The following configurable options are exposed through the <xref:Aspire.Azure.Messaging.ServiceBus.AzureMessagingServiceBusSettings> class:
Expand Down
31 changes: 0 additions & 31 deletions docs/security/azure-security-key-vault-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,37 +155,6 @@ builder.AddAzureKeyVaultSecrets(
static options => options.DisableChallengeResourceVerification = true))
```

### Named instances

If you want to add more than one `SecretClient` you can use named instances. Load the named configuration section from the json config by calling the `AddAzureKeyVaultSecrets` method and passing in the `INSTANCE_NAME`.

```csharp
builder.AddAzureKeyVaultSecrets("INSTANCE_NAME");
```

The corresponding configuration JSON is defined as follows:

```json
{
"Aspire": {
"Azure": {
"Security": {
"KeyVault": {
"INSTANCE_NAME": {
"VaultUri": "YOUR_VAULT_URI",
"DisableHealthChecks": false,
"DisableTracing": true,
"ClientOptions": {
"DisableChallengeResourceVerification": true
}
}
}
}
}
}
}
```

### Configuration options

The following configurable options are exposed through the <xref:Aspire.Azure.Security.KeyVault.AzureSecurityKeyVaultSettings> class:
Expand Down
30 changes: 0 additions & 30 deletions docs/storage/azure-storage-tables-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,36 +137,6 @@ builder.AddAzureTableClient(
static options => options.EnableTenantDiscovery = true));
```

### Named instances

If you want to add more than one <xref:Azure.Data.Tables.TableServiceClient> you can use named instances. Load the named configuration section from the json config by calling the `AddAzureTableClient` method and passing in the `INSTANCE_NAME`.

```csharp
builder.AddAzureTableClient("INSTANCE_NAME");
```

The corresponding configuration JSON is defined as follows:

```json
{
"Aspire":{
"Azure": {
"Data": {
"Tables": {
"INSTANCE_NAME": {
"ServiceUri": "YOUR_URI",
"DisableHealthChecks": true,
"ClientOptions": {
"EnableTenantDiscovery": true
}
}
}
}
}
}
}
```

### Configuration options

The following configurable options are exposed through the <xref:Aspire.Azure.Data.Tables.AzureDataTablesSettings> class:
Expand Down
Loading