共用方式為


Inputs - Get

取得指定輸入的詳細數據。

GET https://management.azure.com/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}?api-version=2020-03-01

URI 參數

名稱 位於 必要 類型 Description
inputName
path True

string

輸入的名稱。

jobName
path True

string

串流作業的名稱。

resourceGroupName
path True

string

minLength: 1
maxLength: 90
pattern: ^[-\w\._\(\)]+$

資源群組的名稱。 名稱不區分大小寫。

subscriptionId
path True

string

minLength: 1

目標訂用帳戶的標識碼。

api-version
query True

string

minLength: 1

要用於這項作業的 API 版本。

回應

名稱 類型 Description
200 OK

Input

已成功擷取指定的輸入。

標題

ETag: string

Other Status Codes

Error

錯誤。

安全性

azure_auth

Azure Active Directory OAuth2 Flow

類型: oauth2
Flow: implicit
授權 URL: https://login.microsoftonline.com/common/oauth2/authorize

範圍

名稱 Description
user_impersonation 模擬您的用戶帳戶

範例

Get a reference blob input with CSV serialization
Get a stream blob input with CSV serialization
Get a stream Event Hub input with JSON serialization
Get a stream IoT Hub input with Avro serialization

Get a reference blob input with CSV serialization

範例要求

GET https://management.azure.com/subscriptions/56b5e0a9-b645-407d-99b0-c64f86013e3d/resourcegroups/sjrg8440/providers/Microsoft.StreamAnalytics/streamingjobs/sj9597/inputs/input7225?api-version=2020-03-01

範例回覆

ETag: c987701d-4039-47aa-a115-ad84f67d07c5
{
  "id": "/subscriptions/56b5e0a9-b645-407d-99b0-c64f86013e3d/resourceGroups/sjrg8440/providers/Microsoft.StreamAnalytics/streamingjobs/sj9597/inputs/input7225",
  "name": "input7225",
  "type": "Microsoft.StreamAnalytics/streamingjobs/inputs",
  "properties": {
    "type": "Reference",
    "datasource": {
      "type": "Microsoft.Storage/Blob",
      "properties": {
        "storageAccounts": [
          {
            "accountName": "someAccountName"
          }
        ],
        "container": "state",
        "pathPattern": "{date}/{time}",
        "dateFormat": "yyyy/MM/dd",
        "timeFormat": "HH"
      }
    },
    "serialization": {
      "type": "Csv",
      "properties": {
        "fieldDelimiter": ",",
        "encoding": "UTF8"
      }
    }
  }
}

Get a stream blob input with CSV serialization

範例要求

GET https://management.azure.com/subscriptions/56b5e0a9-b645-407d-99b0-c64f86013e3d/resourcegroups/sjrg8161/providers/Microsoft.StreamAnalytics/streamingjobs/sj6695/inputs/input8899?api-version=2020-03-01

範例回覆

ETag: 475074b8-c957-4b1f-a219-12b8399c3d4c
{
  "id": "/subscriptions/56b5e0a9-b645-407d-99b0-c64f86013e3d/resourceGroups/sjrg8161/providers/Microsoft.StreamAnalytics/streamingjobs/sj6695/inputs/input8899",
  "name": "input8899",
  "type": "Microsoft.StreamAnalytics/streamingjobs/inputs",
  "properties": {
    "type": "Stream",
    "datasource": {
      "type": "Microsoft.Storage/Blob",
      "properties": {
        "sourcePartitionCount": 16,
        "storageAccounts": [
          {
            "accountName": "someAccountName"
          }
        ],
        "container": "state",
        "pathPattern": "{date}/{time}",
        "dateFormat": "yyyy/MM/dd",
        "timeFormat": "HH"
      }
    },
    "serialization": {
      "type": "Csv",
      "properties": {
        "fieldDelimiter": ",",
        "encoding": "UTF8"
      }
    }
  }
}

Get a stream Event Hub input with JSON serialization

範例要求

GET https://management.azure.com/subscriptions/56b5e0a9-b645-407d-99b0-c64f86013e3d/resourcegroups/sjrg3139/providers/Microsoft.StreamAnalytics/streamingjobs/sj197/inputs/input7425?api-version=2020-03-01

範例回覆

ETag: afd0d184-37e9-4370-9e55-32501bc4de3a
{
  "id": "/subscriptions/56b5e0a9-b645-407d-99b0-c64f86013e3d/resourceGroups/sjrg3139/providers/Microsoft.StreamAnalytics/streamingjobs/sj197/inputs/input7425",
  "name": "input7425",
  "type": "Microsoft.StreamAnalytics/streamingjobs/inputs",
  "properties": {
    "type": "Stream",
    "datasource": {
      "type": "Microsoft.ServiceBus/EventHub",
      "properties": {
        "eventHubName": "sdkeventhub",
        "consumerGroupName": "sdkconsumergroup",
        "serviceBusNamespace": "sdktest",
        "sharedAccessPolicyName": "RootManageSharedAccessKey"
      }
    },
    "serialization": {
      "type": "Json",
      "properties": {
        "encoding": "UTF8"
      }
    }
  }
}

Get a stream IoT Hub input with Avro serialization

範例要求

GET https://management.azure.com/subscriptions/56b5e0a9-b645-407d-99b0-c64f86013e3d/resourcegroups/sjrg3467/providers/Microsoft.StreamAnalytics/streamingjobs/sj9742/inputs/input7970?api-version=2020-03-01

範例回覆

ETag: bd8009b3-8165-4bd3-aad2-29a2b378dd14
{
  "id": "/subscriptions/56b5e0a9-b645-407d-99b0-c64f86013e3d/resourceGroups/sjrg3467/providers/Microsoft.StreamAnalytics/streamingjobs/sj9742/inputs/input7970",
  "name": "input7970",
  "type": "Microsoft.StreamAnalytics/streamingjobs/inputs",
  "properties": {
    "type": "Stream",
    "datasource": {
      "type": "Microsoft.Devices/IotHubs",
      "properties": {
        "iotHubNamespace": "iothub",
        "sharedAccessPolicyName": "owner",
        "endpoint": "messages/events",
        "consumerGroupName": "sdkconsumergroup"
      }
    },
    "serialization": {
      "type": "Avro",
      "properties": {}
    }
  }
}

定義

名稱 Description
AuthenticationMode

驗證模式。 有效的模式為 ConnectionStringMsi 和 『UserToken』。

AvroSerialization

描述如何串行化來自輸入的數據,或以Avro格式寫入輸出時如何串行化數據。

AzureSqlReferenceInputDataSource

描述 Azure SQL 資料庫參考輸入數據源。

BlobReferenceInputDataSource

描述包含參考數據的 Blob 輸入數據源。

BlobStreamInputDataSource

描述包含數據流數據的 Blob 輸入數據源。

Compression

描述如何壓縮輸入數據

CompressionType

指出輸入所使用的壓縮類型。 PUT (CreateOrReplace) 要求的必要專案。

CsvSerialization

描述如何串行化輸入中的數據,或以 CSV 格式寫入輸出時如何串行化數據。

DiagnosticCondition

適用於資源或整體作業的條件,需要客戶注意。

Diagnostics

描述適用於需要客戶注意之輸入、輸出或整體作業的條件。

Encoding

指定輸入時傳入數據的編碼方式,以及輸出案例中傳出數據的編碼方式。

Error

常見的錯誤表示。

EventHubStreamInputDataSource

描述包含數據流數據的事件中樞輸入數據源。

EventHubV2StreamInputDataSource

描述包含數據流數據的事件中樞輸入數據源。

EventSerializationType

指出輸入或輸出所使用的串行化類型。 PUT (CreateOrReplace) 要求的必要專案。

FileReferenceInputDataSource

描述包含參考數據的檔案輸入數據源。

GatewayMessageBusStreamInputDataSource

描述包含數據流數據的 Blob 輸入數據源。

Input

輸入物件,包含與具名輸入相關聯的所有資訊。 所有輸入都包含在串流作業之下。

IoTHubStreamInputDataSource

描述包含數據流數據的IoT中樞輸入數據源。

JsonOutputSerializationFormat

指定將寫入輸出的 JSON 格式。 目前支援的值是 'lineSeparated',表示輸出的格式是讓每個 JSON 物件以新行分隔,而 'array' 表示輸出會格式化為 JSON 物件的數位。

JsonSerialization

描述如何串行化輸入中的數據,或以 JSON 格式寫入輸出時如何串行化數據。

ParquetSerialization

描述如何串行化來自輸入的數據,或當以 Parquet 格式寫入輸出時如何串行化數據。

ReferenceInputProperties

與包含參考數據的輸入相關聯的屬性。

RefreshType

表示數據重新整理選項的類型。

StorageAccount

與 Azure 記憶體帳戶相關聯的屬性

StreamInputProperties

與包含數據流數據的輸入相關聯的屬性。

AuthenticationMode

驗證模式。 有效的模式為 ConnectionStringMsi 和 『UserToken』。

Description
ConnectionString
Msi
UserToken

AvroSerialization

描述如何串行化來自輸入的數據,或以Avro格式寫入輸出時如何串行化數據。

名稱 類型 Description
type string:

Avro

指出輸入或輸出所使用的串行化類型。 PUT (CreateOrReplace) 要求的必要專案。

AzureSqlReferenceInputDataSource

描述 Azure SQL 資料庫參考輸入數據源。

名稱 類型 Description
properties.database

string

這個專案與數據源項目相關聯。 這是將寫入輸出的資料庫名稱。

properties.deltaSnapshotQuery

string

這個專案與數據源項目相關聯。 此查詢可用來從 SQL 資料庫擷取累加變更。 若要使用此選項,建議您在 Azure SQL Database 中使用時態表。

properties.fullSnapshotQuery

string

這個專案與數據源項目相關聯。 此查詢可用來從 sql 資料庫擷取數據。

properties.password

string

這個專案與數據源項目相關聯。 這是將用來連線到 SQL Database 實例的密碼。

properties.refreshRate

string

這個專案與數據源項目相關聯。 這表示從資料庫擷取數據的頻率。 它是 DateTime 格式。

properties.refreshType

RefreshType

表示數據重新整理選項的類型。

properties.server

string

這個專案與數據源項目相關聯。 這是包含要寫入之資料庫的伺服器名稱。

properties.table

string

這個專案與數據源項目相關聯。 Azure SQL 資料庫中數據表的名稱。

properties.user

string

這個專案與數據源項目相關聯。 這是將用來連線到 SQL Database 實例的用戶名稱。

type string:

Microsoft.Sql/Server/Database

表示包含參考數據的輸入數據來源類型。 PUT (CreateOrReplace) 要求的必要專案。

BlobReferenceInputDataSource

描述包含參考數據的 Blob 輸入數據源。

名稱 類型 預設值 Description
properties.authenticationMode

AuthenticationMode

ConnectionString

驗證模式。

properties.container

string

相關聯記憶體帳戶內的容器名稱。 此容器包含要讀取或寫入的 Blob。。 PUT (CreateOrReplace) 要求的必要專案。

properties.dateFormat

string

日期格式。 無論 {date} 出現在 pathPattern 中,此屬性的值會改成日期格式。

properties.pathPattern

string

Blob 路徑模式。 不是正則表達式。 它代表將比對 Blob 名稱的模式,以判斷它們是否應該包含在作業的輸入或輸出中。 如需更詳細的說明和範例,請參閱 https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-inputhttps://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-output

properties.storageAccounts

StorageAccount[]

一或多個 Azure 記憶體帳戶的清單。 PUT (CreateOrReplace) 要求的必要專案。

properties.timeFormat

string

時間格式。 無論 {time} 出現在 pathPattern 中,此屬性的值會改用為時間格式。

type string:

Microsoft.Storage/Blob

表示包含參考數據的輸入數據來源類型。 PUT (CreateOrReplace) 要求的必要專案。

BlobStreamInputDataSource

描述包含數據流數據的 Blob 輸入數據源。

名稱 類型 預設值 Description
properties.authenticationMode

AuthenticationMode

ConnectionString

驗證模式。

properties.container

string

相關聯記憶體帳戶內的容器名稱。 此容器包含要讀取或寫入的 Blob。。 PUT (CreateOrReplace) 要求的必要專案。

properties.dateFormat

string

日期格式。 無論 {date} 出現在 pathPattern 中,此屬性的值會改成日期格式。

properties.pathPattern

string

Blob 路徑模式。 不是正則表達式。 它代表將比對 Blob 名稱的模式,以判斷它們是否應該包含在作業的輸入或輸出中。 如需更詳細的說明和範例,請參閱 https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-inputhttps://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-output

properties.sourcePartitionCount

integer (int32)

Blob 輸入數據源的數據分割計數。 範圍 1 - 1024。

properties.storageAccounts

StorageAccount[]

一或多個 Azure 記憶體帳戶的清單。 PUT (CreateOrReplace) 要求的必要專案。

properties.timeFormat

string

時間格式。 無論 {time} 出現在 pathPattern 中,此屬性的值會改用為時間格式。

type string:

Microsoft.Storage/Blob

表示包含數據流數據的輸入數據來源類型。 PUT (CreateOrReplace) 要求的必要專案。

Compression

描述如何壓縮輸入數據

名稱 類型 預設值 Description
type

CompressionType

None

指出輸入所使用的壓縮類型。 PUT (CreateOrReplace) 要求的必要專案。

CompressionType

指出輸入所使用的壓縮類型。 PUT (CreateOrReplace) 要求的必要專案。

Description
Deflate
GZip
None

CsvSerialization

描述如何串行化輸入中的數據,或以 CSV 格式寫入輸出時如何串行化數據。

名稱 類型 Description
properties.encoding

Encoding

指定輸入時傳入數據的編碼方式,以及輸出案例中傳出數據的編碼方式。 PUT (CreateOrReplace) 要求的必要專案。

properties.fieldDelimiter

string

指定分隔符,用來分隔逗號分隔值 (CSV) 記錄。 如需支援的值清單,請參閱 https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-inputhttps://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-output。 PUT (CreateOrReplace) 要求的必要專案。

type string:

Csv

指出輸入或輸出所使用的串行化類型。 PUT (CreateOrReplace) 要求的必要專案。

DiagnosticCondition

適用於資源或整體作業的條件,需要客戶注意。

名稱 類型 Description
code

string

不透明的診斷程序代碼。

message

string

描述條件的人類可讀取訊息。 當地語系化為用戶端要求的 Accept-Language。

since

string

條件啟動時的 UTC 時間戳。 客戶應該能夠在此時間前後的 ops 記錄中找到對應的事件。

Diagnostics

描述適用於需要客戶注意之輸入、輸出或整體作業的條件。

名稱 類型 Description
conditions

DiagnosticCondition[]

適用於資源或整體作業之零個或多個條件的集合,值得客戶注意。

Encoding

指定輸入時傳入數據的編碼方式,以及輸出案例中傳出數據的編碼方式。

Description
UTF8

Error

常見的錯誤表示。

名稱 類型 Description
error

Error

錯誤定義屬性。

EventHubStreamInputDataSource

描述包含數據流數據的事件中樞輸入數據源。

名稱 類型 預設值 Description
authenticationMode

AuthenticationMode

ConnectionString

驗證模式。

properties.consumerGroupName

string

事件中樞取用者群組的名稱,應該用來從事件中樞讀取事件。 為多個輸入指定不同的取用者組名,可讓每個輸入從事件中樞接收相同的事件。 如果未指定,輸入會使用事件中樞的預設取用者群組。

properties.eventHubName

string

事件中樞的名稱。 PUT (CreateOrReplace) 要求的必要專案。

serviceBusNamespace

string

與所需事件中樞、服務總線佇列、服務總線主題等相關聯的命名空間。PUT (CreateOrReplace) 要求的必要專案。

sharedAccessPolicyKey

string

指定共用存取原則的共用存取原則金鑰。 PUT (CreateOrReplace) 要求的必要專案。

sharedAccessPolicyName

string

事件中樞、服務總線佇列、服務總線主題等的共用存取原則名稱。PUT (CreateOrReplace) 要求的必要專案。

type string:

Microsoft.ServiceBus/EventHub

表示包含數據流數據的輸入數據來源類型。 PUT (CreateOrReplace) 要求的必要專案。

EventHubV2StreamInputDataSource

描述包含數據流數據的事件中樞輸入數據源。

名稱 類型 預設值 Description
authenticationMode

AuthenticationMode

ConnectionString

驗證模式。

properties.consumerGroupName

string

事件中樞取用者群組的名稱,應該用來從事件中樞讀取事件。 為多個輸入指定不同的取用者組名,可讓每個輸入從事件中樞接收相同的事件。 如果未指定,輸入會使用事件中樞的預設取用者群組。

properties.eventHubName

string

事件中樞的名稱。 PUT (CreateOrReplace) 要求的必要專案。

serviceBusNamespace

string

與所需事件中樞、服務總線佇列、服務總線主題等相關聯的命名空間。PUT (CreateOrReplace) 要求的必要專案。

sharedAccessPolicyKey

string

指定共用存取原則的共用存取原則金鑰。 PUT (CreateOrReplace) 要求的必要專案。

sharedAccessPolicyName

string

事件中樞、服務總線佇列、服務總線主題等的共用存取原則名稱。PUT (CreateOrReplace) 要求的必要專案。

type string:

Microsoft.EventHub/EventHub

表示包含數據流數據的輸入數據來源類型。 PUT (CreateOrReplace) 要求的必要專案。

EventSerializationType

指出輸入或輸出所使用的串行化類型。 PUT (CreateOrReplace) 要求的必要專案。

Description
Avro
Csv
Json
Parquet

FileReferenceInputDataSource

描述包含參考數據的檔案輸入數據源。

名稱 類型 Description
properties.path

string

檔案的路徑。

type string:

File

表示包含參考數據的輸入數據來源類型。 PUT (CreateOrReplace) 要求的必要專案。

GatewayMessageBusStreamInputDataSource

描述包含數據流數據的 Blob 輸入數據源。

名稱 類型 Description
properties.topic

string

服務總線主題的名稱。

type string:

GatewayMessageBus

表示包含數據流數據的輸入數據來源類型。 PUT (CreateOrReplace) 要求的必要專案。

Input

輸入物件,包含與具名輸入相關聯的所有資訊。 所有輸入都包含在串流作業之下。

名稱 類型 Description
id

string

資源標識碼

name

string

資源名稱

properties InputProperties:

與輸入相關聯的屬性。 PUT (CreateOrReplace) 要求的必要專案。

type

string

資源類型

IoTHubStreamInputDataSource

描述包含數據流數據的IoT中樞輸入數據源。

名稱 類型 Description
properties.consumerGroupName

string

應該用來從IoT中樞讀取事件的IoT中樞取用者群組名稱。 如果未指定,輸入會使用Iot 中樞的預設取用者群組。

properties.endpoint

string

要連線到的 IoT 中樞端點(例如訊息/事件、訊息/operationsMonitoringEvents 等)。

properties.iotHubNamespace

string

IoT 中樞的名稱或 URI。 PUT (CreateOrReplace) 要求的必要專案。

properties.sharedAccessPolicyKey

string

指定共用存取原則的共用存取原則金鑰。 PUT (CreateOrReplace) 要求的必要專案。

properties.sharedAccessPolicyName

string

IoT 中樞的共用存取原則名稱。 此原則至少必須包含服務連線許可權。 PUT (CreateOrReplace) 要求的必要專案。

type string:

Microsoft.Devices/IotHubs

表示包含數據流數據的輸入數據來源類型。 PUT (CreateOrReplace) 要求的必要專案。

JsonOutputSerializationFormat

指定將寫入輸出的 JSON 格式。 目前支援的值是 'lineSeparated',表示輸出的格式是讓每個 JSON 物件以新行分隔,而 'array' 表示輸出會格式化為 JSON 物件的數位。

Description
Array
LineSeparated

JsonSerialization

描述如何串行化輸入中的數據,或以 JSON 格式寫入輸出時如何串行化數據。

名稱 類型 Description
properties.encoding

Encoding

指定輸入時傳入數據的編碼方式,以及輸出案例中傳出數據的編碼方式。 PUT (CreateOrReplace) 要求的必要專案。

properties.format

JsonOutputSerializationFormat

此屬性僅適用於輸出的 JSON 串行化。 它不適用於輸入。 這個屬性會指定將寫入輸出的 JSON 格式。 目前支援的值是 'lineSeparated',表示輸出的格式是讓每個 JSON 物件以新行分隔,而 'array' 表示輸出會格式化為 JSON 物件的數位。 如果為 null,預設值為 'lineSeparated'。

type string:

Json

指出輸入或輸出所使用的串行化類型。 PUT (CreateOrReplace) 要求的必要專案。

ParquetSerialization

描述如何串行化來自輸入的數據,或當以 Parquet 格式寫入輸出時如何串行化數據。

名稱 類型 Description
type string:

Parquet

指出輸入或輸出所使用的串行化類型。 PUT (CreateOrReplace) 要求的必要專案。

ReferenceInputProperties

與包含參考數據的輸入相關聯的屬性。

名稱 類型 Description
compression

Compression

描述如何壓縮輸入數據

datasource ReferenceInputDataSource:

描述包含參考數據的輸入數據來源。 PUT (CreateOrReplace) 要求的必要專案。

diagnostics

Diagnostics

描述適用於需要客戶注意之輸入、輸出或整體作業的條件。

etag

string

輸入的目前實體標記。 這是不透明的字串。 您可以使用它來偵測資源是否已在要求之間變更。 您也可以在 If-Match 或 If-None-Match 標頭中使用它,以用於開放式並行存取的寫入作業。

partitionKey

string

partitionKey 描述輸入數據中的索引鍵,用於分割輸入數據

serialization Serialization:

描述如何串行化輸入中的數據,或將數據寫入輸出時如何串行化。 PUT (CreateOrReplace) 要求的必要專案。

type string:

Reference

指出輸入是參考數據或數據流數據的來源。 PUT (CreateOrReplace) 要求的必要專案。

RefreshType

表示數據重新整理選項的類型。

Description
RefreshPeriodicallyWithDelta
RefreshPeriodicallyWithFull
Static

StorageAccount

與 Azure 記憶體帳戶相關聯的屬性

名稱 類型 Description
accountKey

string

Azure 記憶體帳戶的帳戶的帳戶金鑰。 PUT (CreateOrReplace) 要求的必要專案。

accountName

string

Azure 記憶體帳戶的名稱。 PUT (CreateOrReplace) 要求的必要專案。

StreamInputProperties

與包含數據流數據的輸入相關聯的屬性。

名稱 類型 Description
compression

Compression

描述如何壓縮輸入數據

datasource StreamInputDataSource:

描述包含數據流數據的輸入數據來源。 PUT (CreateOrReplace) 要求的必要專案。

diagnostics

Diagnostics

描述適用於需要客戶注意之輸入、輸出或整體作業的條件。

etag

string

輸入的目前實體標記。 這是不透明的字串。 您可以使用它來偵測資源是否已在要求之間變更。 您也可以在 If-Match 或 If-None-Match 標頭中使用它,以用於開放式並行存取的寫入作業。

partitionKey

string

partitionKey 描述輸入數據中的索引鍵,用於分割輸入數據

serialization Serialization:

描述如何串行化輸入中的數據,或將數據寫入輸出時如何串行化。 PUT (CreateOrReplace) 要求的必要專案。

type string:

Stream

指出輸入是參考數據或數據流數據的來源。 PUT (CreateOrReplace) 要求的必要專案。