Files

241 lines
11 KiB
TypeScript

// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
/**
* This sample demonstrates how to Gets details about the specified output.
*
* @summary Gets details about the specified output.
* x-ms-original-file: specification/streamanalytics/resource-manager/Microsoft.StreamAnalytics/preview/2021-10-01-preview/examples/Output_Get_DeltaLake.json
*/
import { StreamAnalyticsManagementClient } from "@azure/arm-streamanalytics";
import { DefaultAzureCredential } from "@azure/identity";
import "dotenv/config";
async function getADeltaLakeOutput(): Promise<void> {
const subscriptionId =
process.env["STREAMANALYTICS_SUBSCRIPTION_ID"] || "56b5e0a9-b645-407d-99b0-c64f86013e3d";
const resourceGroupName = process.env["STREAMANALYTICS_RESOURCE_GROUP"] || "sjrg";
const jobName = "sjName";
const outputName = "output1221";
const credential = new DefaultAzureCredential();
const client = new StreamAnalyticsManagementClient(credential, subscriptionId);
const result = await client.outputs.get(resourceGroupName, jobName, outputName);
console.log(result);
}
/**
* This sample demonstrates how to Gets details about the specified output.
*
* @summary Gets details about the specified output.
* x-ms-original-file: specification/streamanalytics/resource-manager/Microsoft.StreamAnalytics/preview/2021-10-01-preview/examples/Output_Get_DocumentDB.json
*/
async function getADocumentDbOutput(): Promise<void> {
const subscriptionId =
process.env["STREAMANALYTICS_SUBSCRIPTION_ID"] || "56b5e0a9-b645-407d-99b0-c64f86013e3d";
const resourceGroupName = process.env["STREAMANALYTICS_RESOURCE_GROUP"] || "sjrg7983";
const jobName = "sj2331";
const outputName = "output3022";
const credential = new DefaultAzureCredential();
const client = new StreamAnalyticsManagementClient(credential, subscriptionId);
const result = await client.outputs.get(resourceGroupName, jobName, outputName);
console.log(result);
}
/**
* This sample demonstrates how to Gets details about the specified output.
*
* @summary Gets details about the specified output.
* x-ms-original-file: specification/streamanalytics/resource-manager/Microsoft.StreamAnalytics/preview/2021-10-01-preview/examples/Output_Get_PowerBI.json
*/
async function getAPowerBiOutput(): Promise<void> {
const subscriptionId =
process.env["STREAMANALYTICS_SUBSCRIPTION_ID"] || "56b5e0a9-b645-407d-99b0-c64f86013e3d";
const resourceGroupName = process.env["STREAMANALYTICS_RESOURCE_GROUP"] || "sjrg7983";
const jobName = "sj2331";
const outputName = "output3022";
const credential = new DefaultAzureCredential();
const client = new StreamAnalyticsManagementClient(credential, subscriptionId);
const result = await client.outputs.get(resourceGroupName, jobName, outputName);
console.log(result);
}
/**
* This sample demonstrates how to Gets details about the specified output.
*
* @summary Gets details about the specified output.
* x-ms-original-file: specification/streamanalytics/resource-manager/Microsoft.StreamAnalytics/preview/2021-10-01-preview/examples/Output_Get_ServiceBusQueue_Avro.json
*/
async function getAServiceBusQueueOutputWithAvroSerialization(): Promise<void> {
const subscriptionId =
process.env["STREAMANALYTICS_SUBSCRIPTION_ID"] || "56b5e0a9-b645-407d-99b0-c64f86013e3d";
const resourceGroupName = process.env["STREAMANALYTICS_RESOURCE_GROUP"] || "sjrg3410";
const jobName = "sj5095";
const outputName = "output3456";
const credential = new DefaultAzureCredential();
const client = new StreamAnalyticsManagementClient(credential, subscriptionId);
const result = await client.outputs.get(resourceGroupName, jobName, outputName);
console.log(result);
}
/**
* This sample demonstrates how to Gets details about the specified output.
*
* @summary Gets details about the specified output.
* x-ms-original-file: specification/streamanalytics/resource-manager/Microsoft.StreamAnalytics/preview/2021-10-01-preview/examples/Output_Get_ServiceBusTopic_CSV.json
*/
async function getAServiceBusTopicOutputWithCsvSerialization(): Promise<void> {
const subscriptionId =
process.env["STREAMANALYTICS_SUBSCRIPTION_ID"] || "56b5e0a9-b645-407d-99b0-c64f86013e3d";
const resourceGroupName = process.env["STREAMANALYTICS_RESOURCE_GROUP"] || "sjrg6450";
const jobName = "sj7094";
const outputName = "output7886";
const credential = new DefaultAzureCredential();
const client = new StreamAnalyticsManagementClient(credential, subscriptionId);
const result = await client.outputs.get(resourceGroupName, jobName, outputName);
console.log(result);
}
/**
* This sample demonstrates how to Gets details about the specified output.
*
* @summary Gets details about the specified output.
* x-ms-original-file: specification/streamanalytics/resource-manager/Microsoft.StreamAnalytics/preview/2021-10-01-preview/examples/Output_Get_Blob_CSV.json
*/
async function getABlobOutputWithCsvSerialization(): Promise<void> {
const subscriptionId =
process.env["STREAMANALYTICS_SUBSCRIPTION_ID"] || "56b5e0a9-b645-407d-99b0-c64f86013e3d";
const resourceGroupName = process.env["STREAMANALYTICS_RESOURCE_GROUP"] || "sjrg5023";
const jobName = "sj900";
const outputName = "output1623";
const credential = new DefaultAzureCredential();
const client = new StreamAnalyticsManagementClient(credential, subscriptionId);
const result = await client.outputs.get(resourceGroupName, jobName, outputName);
console.log(result);
}
/**
* This sample demonstrates how to Gets details about the specified output.
*
* @summary Gets details about the specified output.
* x-ms-original-file: specification/streamanalytics/resource-manager/Microsoft.StreamAnalytics/preview/2021-10-01-preview/examples/Output_Get_AzureDataLakeStore_JSON.json
*/
async function getAnAzureDataLakeStoreOutputWithJsonSerialization(): Promise<void> {
const subscriptionId =
process.env["STREAMANALYTICS_SUBSCRIPTION_ID"] || "56b5e0a9-b645-407d-99b0-c64f86013e3d";
const resourceGroupName = process.env["STREAMANALYTICS_RESOURCE_GROUP"] || "sjrg6912";
const jobName = "sj3310";
const outputName = "output5195";
const credential = new DefaultAzureCredential();
const client = new StreamAnalyticsManagementClient(credential, subscriptionId);
const result = await client.outputs.get(resourceGroupName, jobName, outputName);
console.log(result);
}
/**
* This sample demonstrates how to Gets details about the specified output.
*
* @summary Gets details about the specified output.
* x-ms-original-file: specification/streamanalytics/resource-manager/Microsoft.StreamAnalytics/preview/2021-10-01-preview/examples/Output_Get_DataWarehouse.json
*/
async function getAnAzureDataWarehouseOutput(): Promise<void> {
const subscriptionId =
process.env["STREAMANALYTICS_SUBSCRIPTION_ID"] || "56b5e0a9-b645-407d-99b0-c64f86013e3d";
const resourceGroupName = process.env["STREAMANALYTICS_RESOURCE_GROUP"] || "sjrg";
const jobName = "sjName";
const outputName = "dwOutput";
const credential = new DefaultAzureCredential();
const client = new StreamAnalyticsManagementClient(credential, subscriptionId);
const result = await client.outputs.get(resourceGroupName, jobName, outputName);
console.log(result);
}
/**
* This sample demonstrates how to Gets details about the specified output.
*
* @summary Gets details about the specified output.
* x-ms-original-file: specification/streamanalytics/resource-manager/Microsoft.StreamAnalytics/preview/2021-10-01-preview/examples/Output_Get_AzureFunction.json
*/
async function getAnAzureFunctionOutput(): Promise<void> {
const subscriptionId =
process.env["STREAMANALYTICS_SUBSCRIPTION_ID"] || "56b5e0a9-b645-407d-99b0-c64f86013e3d";
const resourceGroupName = process.env["STREAMANALYTICS_RESOURCE_GROUP"] || "sjrg";
const jobName = "sjName";
const outputName = "azureFunction1";
const credential = new DefaultAzureCredential();
const client = new StreamAnalyticsManagementClient(credential, subscriptionId);
const result = await client.outputs.get(resourceGroupName, jobName, outputName);
console.log(result);
}
/**
* This sample demonstrates how to Gets details about the specified output.
*
* @summary Gets details about the specified output.
* x-ms-original-file: specification/streamanalytics/resource-manager/Microsoft.StreamAnalytics/preview/2021-10-01-preview/examples/Output_Get_AzureSQL.json
*/
async function getAnAzureSqlDatabaseOutput(): Promise<void> {
const subscriptionId =
process.env["STREAMANALYTICS_SUBSCRIPTION_ID"] || "56b5e0a9-b645-407d-99b0-c64f86013e3d";
const resourceGroupName = process.env["STREAMANALYTICS_RESOURCE_GROUP"] || "sjrg2157";
const jobName = "sj6458";
const outputName = "output1755";
const credential = new DefaultAzureCredential();
const client = new StreamAnalyticsManagementClient(credential, subscriptionId);
const result = await client.outputs.get(resourceGroupName, jobName, outputName);
console.log(result);
}
/**
* This sample demonstrates how to Gets details about the specified output.
*
* @summary Gets details about the specified output.
* x-ms-original-file: specification/streamanalytics/resource-manager/Microsoft.StreamAnalytics/preview/2021-10-01-preview/examples/Output_Get_AzureTable.json
*/
async function getAnAzureTableOutput(): Promise<void> {
const subscriptionId =
process.env["STREAMANALYTICS_SUBSCRIPTION_ID"] || "56b5e0a9-b645-407d-99b0-c64f86013e3d";
const resourceGroupName = process.env["STREAMANALYTICS_RESOURCE_GROUP"] || "sjrg5176";
const jobName = "sj2790";
const outputName = "output958";
const credential = new DefaultAzureCredential();
const client = new StreamAnalyticsManagementClient(credential, subscriptionId);
const result = await client.outputs.get(resourceGroupName, jobName, outputName);
console.log(result);
}
/**
* This sample demonstrates how to Gets details about the specified output.
*
* @summary Gets details about the specified output.
* x-ms-original-file: specification/streamanalytics/resource-manager/Microsoft.StreamAnalytics/preview/2021-10-01-preview/examples/Output_Get_EventHub_JSON.json
*/
async function getAnEventHubOutputWithJsonSerialization(): Promise<void> {
const subscriptionId =
process.env["STREAMANALYTICS_SUBSCRIPTION_ID"] || "56b5e0a9-b645-407d-99b0-c64f86013e3d";
const resourceGroupName = process.env["STREAMANALYTICS_RESOURCE_GROUP"] || "sjrg6912";
const jobName = "sj3310";
const outputName = "output5195";
const credential = new DefaultAzureCredential();
const client = new StreamAnalyticsManagementClient(credential, subscriptionId);
const result = await client.outputs.get(resourceGroupName, jobName, outputName);
console.log(result);
}
async function main(): Promise<void> {
await getADeltaLakeOutput();
await getADocumentDbOutput();
await getAPowerBiOutput();
await getAServiceBusQueueOutputWithAvroSerialization();
await getAServiceBusTopicOutputWithCsvSerialization();
await getABlobOutputWithCsvSerialization();
await getAnAzureDataLakeStoreOutputWithJsonSerialization();
await getAnAzureDataWarehouseOutput();
await getAnAzureFunctionOutput();
await getAnAzureSqlDatabaseOutput();
await getAnAzureTableOutput();
await getAnEventHubOutputWithJsonSerialization();
}
main().catch(console.error);