mirror of
https://github.com/hanzoai/azure-sdk-for-js.git
synced 2026-10-30 19:51:51 +00:00
89 lines
4.0 KiB
TypeScript
89 lines
4.0 KiB
TypeScript
// Copyright (c) Microsoft Corporation.
|
|
// Licensed under the MIT License.
|
|
|
|
/**
|
|
* This sample demonstrates how to Gets details about the specified input.
|
|
*
|
|
* @summary Gets details about the specified input.
|
|
* x-ms-original-file: specification/streamanalytics/resource-manager/Microsoft.StreamAnalytics/preview/2021-10-01-preview/examples/Input_Get_Reference_Blob_CSV.json
|
|
*/
|
|
|
|
import { StreamAnalyticsManagementClient } from "@azure/arm-streamanalytics";
|
|
import { DefaultAzureCredential } from "@azure/identity";
|
|
import "dotenv/config";
|
|
|
|
async function getAReferenceBlobInputWithCsvSerialization(): Promise<void> {
|
|
const subscriptionId =
|
|
process.env["STREAMANALYTICS_SUBSCRIPTION_ID"] || "56b5e0a9-b645-407d-99b0-c64f86013e3d";
|
|
const resourceGroupName = process.env["STREAMANALYTICS_RESOURCE_GROUP"] || "sjrg8440";
|
|
const jobName = "sj9597";
|
|
const inputName = "input7225";
|
|
const credential = new DefaultAzureCredential();
|
|
const client = new StreamAnalyticsManagementClient(credential, subscriptionId);
|
|
const result = await client.inputs.get(resourceGroupName, jobName, inputName);
|
|
console.log(result);
|
|
}
|
|
|
|
/**
|
|
* This sample demonstrates how to Gets details about the specified input.
|
|
*
|
|
* @summary Gets details about the specified input.
|
|
* x-ms-original-file: specification/streamanalytics/resource-manager/Microsoft.StreamAnalytics/preview/2021-10-01-preview/examples/Input_Get_Stream_EventHub_JSON.json
|
|
*/
|
|
async function getAStreamEventHubInputWithJsonSerialization(): Promise<void> {
|
|
const subscriptionId =
|
|
process.env["STREAMANALYTICS_SUBSCRIPTION_ID"] || "56b5e0a9-b645-407d-99b0-c64f86013e3d";
|
|
const resourceGroupName = process.env["STREAMANALYTICS_RESOURCE_GROUP"] || "sjrg3139";
|
|
const jobName = "sj197";
|
|
const inputName = "input7425";
|
|
const credential = new DefaultAzureCredential();
|
|
const client = new StreamAnalyticsManagementClient(credential, subscriptionId);
|
|
const result = await client.inputs.get(resourceGroupName, jobName, inputName);
|
|
console.log(result);
|
|
}
|
|
|
|
/**
|
|
* This sample demonstrates how to Gets details about the specified input.
|
|
*
|
|
* @summary Gets details about the specified input.
|
|
* x-ms-original-file: specification/streamanalytics/resource-manager/Microsoft.StreamAnalytics/preview/2021-10-01-preview/examples/Input_Get_Stream_IoTHub_Avro.json
|
|
*/
|
|
async function getAStreamIoTHubInputWithAvroSerialization(): Promise<void> {
|
|
const subscriptionId =
|
|
process.env["STREAMANALYTICS_SUBSCRIPTION_ID"] || "56b5e0a9-b645-407d-99b0-c64f86013e3d";
|
|
const resourceGroupName = process.env["STREAMANALYTICS_RESOURCE_GROUP"] || "sjrg3467";
|
|
const jobName = "sj9742";
|
|
const inputName = "input7970";
|
|
const credential = new DefaultAzureCredential();
|
|
const client = new StreamAnalyticsManagementClient(credential, subscriptionId);
|
|
const result = await client.inputs.get(resourceGroupName, jobName, inputName);
|
|
console.log(result);
|
|
}
|
|
|
|
/**
|
|
* This sample demonstrates how to Gets details about the specified input.
|
|
*
|
|
* @summary Gets details about the specified input.
|
|
* x-ms-original-file: specification/streamanalytics/resource-manager/Microsoft.StreamAnalytics/preview/2021-10-01-preview/examples/Input_Get_Stream_Blob_CSV.json
|
|
*/
|
|
async function getAStreamBlobInputWithCsvSerialization(): Promise<void> {
|
|
const subscriptionId =
|
|
process.env["STREAMANALYTICS_SUBSCRIPTION_ID"] || "56b5e0a9-b645-407d-99b0-c64f86013e3d";
|
|
const resourceGroupName = process.env["STREAMANALYTICS_RESOURCE_GROUP"] || "sjrg8161";
|
|
const jobName = "sj6695";
|
|
const inputName = "input8899";
|
|
const credential = new DefaultAzureCredential();
|
|
const client = new StreamAnalyticsManagementClient(credential, subscriptionId);
|
|
const result = await client.inputs.get(resourceGroupName, jobName, inputName);
|
|
console.log(result);
|
|
}
|
|
|
|
async function main(): Promise<void> {
|
|
await getAReferenceBlobInputWithCsvSerialization();
|
|
await getAStreamEventHubInputWithJsonSerialization();
|
|
await getAStreamIoTHubInputWithAvroSerialization();
|
|
await getAStreamBlobInputWithCsvSerialization();
|
|
}
|
|
|
|
main().catch(console.error);
|