QueueAttribute クラス

定義

パラメーターを Azure キューにバインドするために使用される属性。

[Microsoft.Azure.WebJobs.ConnectionProvider(typeof(Microsoft.Azure.WebJobs.StorageAccountAttribute))]
[Microsoft.Azure.WebJobs.Description.Binding]
[System.AttributeUsage(System.AttributeTargets.Parameter | System.AttributeTargets.ReturnValue)]
public class QueueAttribute : Attribute, Microsoft.Azure.WebJobs.IConnectionProvider
[<Microsoft.Azure.WebJobs.ConnectionProvider(typeof(Microsoft.Azure.WebJobs.StorageAccountAttribute))>]
[<Microsoft.Azure.WebJobs.Description.Binding>]
[<System.AttributeUsage(System.AttributeTargets.Parameter | System.AttributeTargets.ReturnValue)>]
type QueueAttribute = class
    inherit Attribute
    interface IConnectionProvider
Public Class QueueAttribute
Inherits Attribute
Implements IConnectionProvider
継承
QueueAttribute
属性
Microsoft.Azure.WebJobs.ConnectionProviderAttribute Microsoft.Azure.WebJobs.Description.BindingAttribute AttributeUsageAttribute
実装
Microsoft.Azure.WebJobs.IConnectionProvider

注釈

メソッド パラメーターの型には、次のいずれかを指定できます。

  • QueueClient
  • QueueMessage (out パラメーター)
  • String (out パラメーター)
  • byte[] (out パラメーター)
  • BinaryData (out パラメーター)
  • ユーザー定義型 (出力パラメーター、JSON としてシリアル化)
  • Microsoft.Azure.WebJobs.ICollector`1 これらの型の (を使用して複数のメッセージをエンキューする) Microsoft.Azure.WebJobs.ICollector`1.Add(`0)
  • Microsoft.Azure.WebJobs.IAsyncCollector`1 これらの型の (を使用して複数のメッセージをエンキューする) Microsoft.Azure.WebJobs.IAsyncCollector`1.AddAsync(`0,System.Threading.CancellationToken)

既定では、拡張機能 Base64 は送信メッセージをエンコードします。 この動作は、 を設定 MessageEncodingすることで変更できます。 たとえば、base64 エンコード/デコードを実行しないAzure Functionsを構成するには、host.json で次を指定します。

"extensions": {
  "queues": {
    "messageEncoding": "none"
  }
}

コンストラクター

QueueAttribute(String)

QueueAttribute クラスの新しいインスタンスを初期化します。

プロパティ

Connection

Azure Storage 接続文字列を含むアプリ設定名を取得または設定します。

QueueName

バインド先のキューの名前を取得します。

適用対象