From 38cd58bb3c200cda75c94284937a1db8f6003a52 Mon Sep 17 00:00:00 2001 From: colawwj Date: Mon, 14 Feb 2022 15:42:24 +0800 Subject: [PATCH 1/5] datafactory-track2 --- common/config/rush/pnpm-lock.yaml | 27 +- sdk/datafactory/arm-datafactory/CHANGELOG.md | 28 +- sdk/datafactory/arm-datafactory/_meta.json | 6 +- .../arm-datafactory/api-extractor.json | 25 +- sdk/datafactory/arm-datafactory/package.json | 26 +- .../review/arm-datafactory.api.md | 101 +++++++- sdk/datafactory/arm-datafactory/sample.env | 4 + .../activityRunsQueryByPipelineRun.ts | 43 ++++ ...tsAPrivateEndpointConnectionForAFactory.ts | 48 ++++ .../dataFlowDebugSessionAddDataFlow.ts | 102 ++++++++ .../samples-dev/dataFlowDebugSessionCreate.ts | 54 ++++ .../samples-dev/dataFlowDebugSessionDelete.ts | 40 +++ .../dataFlowDebugSessionExecuteCommand.ts | 42 +++ .../dataFlowDebugSessionQueryByFactory.ts | 36 +++ .../samples-dev/dataFlowsCreate.ts | 74 ++++++ .../samples-dev/dataFlowsDelete.ts | 35 +++ .../samples-dev/dataFlowsGet.ts | 35 +++ .../samples-dev/dataFlowsListByFactory.ts | 36 +++ .../samples-dev/dataFlowsUpdate.ts | 74 ++++++ .../samples-dev/datasetsCreate.ts | 55 ++++ .../samples-dev/datasetsDelete.ts | 35 +++ .../samples-dev/datasetsGet.ts | 35 +++ .../samples-dev/datasetsListByFactory.ts | 36 +++ .../samples-dev/datasetsUpdate.ts | 56 ++++ ...rivateEndpointConnectionForADatafactory.ts | 35 +++ .../exposureControlGetFeatureValue.ts | 39 +++ ...exposureControlGetFeatureValueByFactory.ts | 41 +++ ...osureControlQueryFeatureValuesByFactory.ts | 46 ++++ .../factoriesConfigureFactoryRepo.ts | 49 ++++ .../samples-dev/factoriesCreateOrUpdate.ts | 35 +++ .../samples-dev/factoriesDelete.ts | 30 +++ .../samples-dev/factoriesGet.ts | 30 +++ .../factoriesGetDataPlaneAccess.ts | 44 ++++ .../factoriesGetGitHubAccessToken.ts | 42 +++ .../samples-dev/factoriesList.ts | 31 +++ .../factoriesListByResourceGroup.ts | 34 +++ .../samples-dev/factoriesUpdate.ts | 40 +++ ...rivateEndpointConnectionForADatafactory.ts | 35 +++ .../getPrivateLinkResourcesOfASite.ts | 33 +++ .../samples-dev/integrationRuntimeNodesGet.ts | 37 +++ .../integrationRuntimeNodesGetIPAddress.ts | 37 +++ .../integrationRuntimeNodesUpdate.ts | 44 ++++ .../integrationRuntimeObjectMetadataGet.ts | 43 ++++ ...integrationRuntimeObjectMetadataRefresh.ts | 35 +++ .../samples-dev/integrationRuntimesCreate.ts | 45 ++++ ...nRuntimesCreateLinkedIntegrationRuntime.ts | 45 ++++ .../samples-dev/integrationRuntimesDelete.ts | 35 +++ .../samples-dev/integrationRuntimesGet.ts | 35 +++ .../integrationRuntimesGetConnectionInfo.ts | 35 +++ .../integrationRuntimesGetMonitoringData.ts | 35 +++ .../integrationRuntimesGetStatus.ts | 35 +++ .../integrationRuntimesListAuthKeys.ts | 35 +++ .../integrationRuntimesListByFactory.ts | 36 +++ .../integrationRuntimesNodesDelete.ts | 37 +++ ...mesOutboundNetworkDependenciesEndpoints.ts | 35 +++ .../integrationRuntimesRegenerateAuthKey.ts | 42 +++ .../samples-dev/integrationRuntimesStart.ts | 35 +++ .../samples-dev/integrationRuntimesStop.ts | 35 +++ .../integrationRuntimesSyncCredentials.ts | 35 +++ .../samples-dev/integrationRuntimesUpdate.ts | 43 ++++ .../samples-dev/integrationRuntimesUpgrade.ts | 42 +++ .../samples-dev/linkedServicesCreate.ts | 49 ++++ .../samples-dev/linkedServicesDelete.ts | 35 +++ .../samples-dev/linkedServicesGet.ts | 35 +++ .../linkedServicesListByFactory.ts | 36 +++ .../samples-dev/linkedServicesUpdate.ts | 50 ++++ .../samples-dev/managedPrivateEndpointsGet.ts | 37 +++ .../managedPrivateEndpointsListByFactory.ts | 38 +++ .../managedVirtualNetworksCreate.ts | 49 ++++ .../managedVirtualNetworksDelete.ts | 37 +++ .../samples-dev/managedVirtualNetworksGet.ts | 35 +++ .../managedVirtualNetworksListByFactory.ts | 36 +++ .../samples-dev/operationsList.ts | 31 +++ .../samples-dev/pipelineRunsCancel.ts | 35 +++ .../samples-dev/pipelineRunsGet.ts | 35 +++ .../samples-dev/pipelineRunsQueryByFactory.ts | 48 ++++ .../samples-dev/pipelinesCreate.ts | 90 +++++++ .../samples-dev/pipelinesCreateRun.ts | 47 ++++ .../samples-dev/pipelinesDelete.ts | 35 +++ .../samples-dev/pipelinesGet.ts | 35 +++ .../samples-dev/pipelinesListByFactory.ts | 36 +++ .../samples-dev/pipelinesUpdate.ts | 84 ++++++ ...privateEndPointConnectionsListByFactory.ts | 36 +++ .../samples-dev/triggerRunsQueryByFactory.ts | 44 ++++ .../samples-dev/triggersCancel.ts | 37 +++ .../samples-dev/triggersCreate.ts | 60 +++++ .../samples-dev/triggersDelete.ts | 35 +++ .../samples-dev/triggersGet.ts | 35 +++ .../triggersGetEventSubscriptionStatus.ts | 35 +++ .../samples-dev/triggersListByFactory.ts | 36 +++ .../samples-dev/triggersQueryByFactory.ts | 40 +++ .../samples-dev/triggersRerun.ts | 37 +++ .../samples-dev/triggersStart.ts | 35 +++ .../samples-dev/triggersStop.ts | 35 +++ .../samples-dev/triggersSubscribeToEvents.ts | 35 +++ .../triggersUnsubscribeFromEvents.ts | 35 +++ .../samples-dev/triggersUpdate.ts | 61 +++++ .../samples/v10/javascript/README.md | 228 +++++++++++++++++ .../activityRunsQueryByPipelineRun.js | 40 +++ ...tsAPrivateEndpointConnectionForAFactory.js | 45 ++++ .../dataFlowDebugSessionAddDataFlow.js | 99 +++++++ .../javascript/dataFlowDebugSessionCreate.js | 51 ++++ .../javascript/dataFlowDebugSessionDelete.js | 33 +++ .../dataFlowDebugSessionExecuteCommand.js | 39 +++ .../dataFlowDebugSessionQueryByFactory.js | 36 +++ .../samples/v10/javascript/dataFlowsCreate.js | 71 ++++++ .../samples/v10/javascript/dataFlowsDelete.js | 31 +++ .../samples/v10/javascript/dataFlowsGet.js | 31 +++ .../v10/javascript/dataFlowsListByFactory.js | 33 +++ .../samples/v10/javascript/dataFlowsUpdate.js | 71 ++++++ .../samples/v10/javascript/datasetsCreate.js | 52 ++++ .../samples/v10/javascript/datasetsDelete.js | 31 +++ .../samples/v10/javascript/datasetsGet.js | 31 +++ .../v10/javascript/datasetsListByFactory.js | 33 +++ .../samples/v10/javascript/datasetsUpdate.js | 53 ++++ ...rivateEndpointConnectionForADatafactory.js | 35 +++ .../exposureControlGetFeatureValue.js | 33 +++ ...exposureControlGetFeatureValueByFactory.js | 38 +++ ...osureControlQueryFeatureValuesByFactory.js | 43 ++++ .../factoriesConfigureFactoryRepo.js | 43 ++++ .../v10/javascript/factoriesCreateOrUpdate.js | 31 +++ .../samples/v10/javascript/factoriesDelete.js | 30 +++ .../samples/v10/javascript/factoriesGet.js | 30 +++ .../javascript/factoriesGetDataPlaneAccess.js | 37 +++ .../factoriesGetGitHubAccessToken.js | 39 +++ .../samples/v10/javascript/factoriesList.js | 31 +++ .../factoriesListByResourceGroup.js | 32 +++ .../samples/v10/javascript/factoriesUpdate.js | 37 +++ ...rivateEndpointConnectionForADatafactory.js | 35 +++ .../getPrivateLinkResourcesOfASite.js | 30 +++ .../javascript/integrationRuntimeNodesGet.js | 37 +++ .../integrationRuntimeNodesGetIPAddress.js | 37 +++ .../integrationRuntimeNodesUpdate.js | 41 +++ .../integrationRuntimeObjectMetadataGet.js | 40 +++ ...integrationRuntimeObjectMetadataRefresh.js | 35 +++ .../javascript/integrationRuntimesCreate.js | 42 +++ ...nRuntimesCreateLinkedIntegrationRuntime.js | 42 +++ .../javascript/integrationRuntimesDelete.js | 35 +++ .../v10/javascript/integrationRuntimesGet.js | 35 +++ .../integrationRuntimesGetConnectionInfo.js | 35 +++ .../integrationRuntimesGetMonitoringData.js | 35 +++ .../integrationRuntimesGetStatus.js | 35 +++ .../integrationRuntimesListAuthKeys.js | 35 +++ .../integrationRuntimesListByFactory.js | 33 +++ .../integrationRuntimesNodesDelete.js | 37 +++ ...mesOutboundNetworkDependenciesEndpoints.js | 35 +++ .../integrationRuntimesRegenerateAuthKey.js | 39 +++ .../javascript/integrationRuntimesStart.js | 35 +++ .../v10/javascript/integrationRuntimesStop.js | 35 +++ .../integrationRuntimesSyncCredentials.js | 35 +++ .../javascript/integrationRuntimesUpdate.js | 40 +++ .../javascript/integrationRuntimesUpgrade.js | 39 +++ .../v10/javascript/linkedServicesCreate.js | 46 ++++ .../v10/javascript/linkedServicesDelete.js | 35 +++ .../v10/javascript/linkedServicesGet.js | 31 +++ .../javascript/linkedServicesListByFactory.js | 33 +++ .../v10/javascript/linkedServicesUpdate.js | 47 ++++ .../javascript/managedPrivateEndpointsGet.js | 37 +++ .../managedPrivateEndpointsListByFactory.js | 38 +++ .../managedVirtualNetworksCreate.js | 46 ++++ .../managedVirtualNetworksDelete.js | 37 +++ .../javascript/managedVirtualNetworksGet.js | 35 +++ .../managedVirtualNetworksListByFactory.js | 36 +++ .../samples/v10/javascript/operationsList.js | 31 +++ .../samples/v10/javascript/package.json | 32 +++ .../v10/javascript/pipelineRunsCancel.js | 31 +++ .../samples/v10/javascript/pipelineRunsGet.js | 31 +++ .../javascript/pipelineRunsQueryByFactory.js | 45 ++++ .../samples/v10/javascript/pipelinesCreate.js | 87 +++++++ .../v10/javascript/pipelinesCreateRun.js | 44 ++++ .../samples/v10/javascript/pipelinesDelete.js | 31 +++ .../samples/v10/javascript/pipelinesGet.js | 31 +++ .../v10/javascript/pipelinesListByFactory.js | 33 +++ .../samples/v10/javascript/pipelinesUpdate.js | 81 ++++++ ...privateEndPointConnectionsListByFactory.js | 36 +++ .../samples/v10/javascript/sample.env | 4 + .../javascript/triggerRunsQueryByFactory.js | 39 +++ .../samples/v10/javascript/triggersCancel.js | 37 +++ .../samples/v10/javascript/triggersCreate.js | 57 +++++ .../samples/v10/javascript/triggersDelete.js | 31 +++ .../samples/v10/javascript/triggersGet.js | 31 +++ .../triggersGetEventSubscriptionStatus.js | 35 +++ .../v10/javascript/triggersListByFactory.js | 33 +++ .../v10/javascript/triggersQueryByFactory.js | 37 +++ .../samples/v10/javascript/triggersRerun.js | 32 +++ .../samples/v10/javascript/triggersStart.js | 35 +++ .../samples/v10/javascript/triggersStop.js | 35 +++ .../javascript/triggersSubscribeToEvents.js | 35 +++ .../triggersUnsubscribeFromEvents.js | 35 +++ .../samples/v10/javascript/triggersUpdate.js | 58 +++++ .../samples/v10/typescript/README.md | 241 ++++++++++++++++++ .../samples/v10/typescript/package.json | 41 +++ .../samples/v10/typescript/sample.env | 4 + .../src/activityRunsQueryByPipelineRun.ts | 43 ++++ ...tsAPrivateEndpointConnectionForAFactory.ts | 48 ++++ .../src/dataFlowDebugSessionAddDataFlow.ts | 102 ++++++++ .../src/dataFlowDebugSessionCreate.ts | 54 ++++ .../src/dataFlowDebugSessionDelete.ts | 40 +++ .../src/dataFlowDebugSessionExecuteCommand.ts | 42 +++ .../src/dataFlowDebugSessionQueryByFactory.ts | 36 +++ .../v10/typescript/src/dataFlowsCreate.ts | 74 ++++++ .../v10/typescript/src/dataFlowsDelete.ts | 35 +++ .../v10/typescript/src/dataFlowsGet.ts | 35 +++ .../typescript/src/dataFlowsListByFactory.ts | 36 +++ .../v10/typescript/src/dataFlowsUpdate.ts | 74 ++++++ .../v10/typescript/src/datasetsCreate.ts | 55 ++++ .../v10/typescript/src/datasetsDelete.ts | 35 +++ .../samples/v10/typescript/src/datasetsGet.ts | 35 +++ .../typescript/src/datasetsListByFactory.ts | 36 +++ .../v10/typescript/src/datasetsUpdate.ts | 56 ++++ ...rivateEndpointConnectionForADatafactory.ts | 35 +++ .../src/exposureControlGetFeatureValue.ts | 39 +++ ...exposureControlGetFeatureValueByFactory.ts | 41 +++ ...osureControlQueryFeatureValuesByFactory.ts | 46 ++++ .../src/factoriesConfigureFactoryRepo.ts | 49 ++++ .../typescript/src/factoriesCreateOrUpdate.ts | 35 +++ .../v10/typescript/src/factoriesDelete.ts | 30 +++ .../v10/typescript/src/factoriesGet.ts | 30 +++ .../src/factoriesGetDataPlaneAccess.ts | 44 ++++ .../src/factoriesGetGitHubAccessToken.ts | 42 +++ .../v10/typescript/src/factoriesList.ts | 31 +++ .../src/factoriesListByResourceGroup.ts | 34 +++ .../v10/typescript/src/factoriesUpdate.ts | 40 +++ ...rivateEndpointConnectionForADatafactory.ts | 35 +++ .../src/getPrivateLinkResourcesOfASite.ts | 33 +++ .../src/integrationRuntimeNodesGet.ts | 37 +++ .../integrationRuntimeNodesGetIPAddress.ts | 37 +++ .../src/integrationRuntimeNodesUpdate.ts | 44 ++++ .../integrationRuntimeObjectMetadataGet.ts | 43 ++++ ...integrationRuntimeObjectMetadataRefresh.ts | 35 +++ .../src/integrationRuntimesCreate.ts | 45 ++++ ...nRuntimesCreateLinkedIntegrationRuntime.ts | 45 ++++ .../src/integrationRuntimesDelete.ts | 35 +++ .../typescript/src/integrationRuntimesGet.ts | 35 +++ .../integrationRuntimesGetConnectionInfo.ts | 35 +++ .../integrationRuntimesGetMonitoringData.ts | 35 +++ .../src/integrationRuntimesGetStatus.ts | 35 +++ .../src/integrationRuntimesListAuthKeys.ts | 35 +++ .../src/integrationRuntimesListByFactory.ts | 36 +++ .../src/integrationRuntimesNodesDelete.ts | 37 +++ ...mesOutboundNetworkDependenciesEndpoints.ts | 35 +++ .../integrationRuntimesRegenerateAuthKey.ts | 42 +++ .../src/integrationRuntimesStart.ts | 35 +++ .../typescript/src/integrationRuntimesStop.ts | 35 +++ .../src/integrationRuntimesSyncCredentials.ts | 35 +++ .../src/integrationRuntimesUpdate.ts | 43 ++++ .../src/integrationRuntimesUpgrade.ts | 42 +++ .../typescript/src/linkedServicesCreate.ts | 49 ++++ .../typescript/src/linkedServicesDelete.ts | 35 +++ .../v10/typescript/src/linkedServicesGet.ts | 35 +++ .../src/linkedServicesListByFactory.ts | 36 +++ .../typescript/src/linkedServicesUpdate.ts | 50 ++++ .../src/managedPrivateEndpointsGet.ts | 37 +++ .../managedPrivateEndpointsListByFactory.ts | 38 +++ .../src/managedVirtualNetworksCreate.ts | 49 ++++ .../src/managedVirtualNetworksDelete.ts | 37 +++ .../src/managedVirtualNetworksGet.ts | 35 +++ .../managedVirtualNetworksListByFactory.ts | 36 +++ .../v10/typescript/src/operationsList.ts | 31 +++ .../v10/typescript/src/pipelineRunsCancel.ts | 35 +++ .../v10/typescript/src/pipelineRunsGet.ts | 35 +++ .../src/pipelineRunsQueryByFactory.ts | 48 ++++ .../v10/typescript/src/pipelinesCreate.ts | 90 +++++++ .../v10/typescript/src/pipelinesCreateRun.ts | 47 ++++ .../v10/typescript/src/pipelinesDelete.ts | 35 +++ .../v10/typescript/src/pipelinesGet.ts | 35 +++ .../typescript/src/pipelinesListByFactory.ts | 36 +++ .../v10/typescript/src/pipelinesUpdate.ts | 84 ++++++ ...privateEndPointConnectionsListByFactory.ts | 36 +++ .../src/triggerRunsQueryByFactory.ts | 44 ++++ .../v10/typescript/src/triggersCancel.ts | 37 +++ .../v10/typescript/src/triggersCreate.ts | 60 +++++ .../v10/typescript/src/triggersDelete.ts | 35 +++ .../samples/v10/typescript/src/triggersGet.ts | 35 +++ .../src/triggersGetEventSubscriptionStatus.ts | 35 +++ .../typescript/src/triggersListByFactory.ts | 36 +++ .../typescript/src/triggersQueryByFactory.ts | 40 +++ .../v10/typescript/src/triggersRerun.ts | 37 +++ .../v10/typescript/src/triggersStart.ts | 35 +++ .../v10/typescript/src/triggersStop.ts | 35 +++ .../src/triggersSubscribeToEvents.ts | 35 +++ .../src/triggersUnsubscribeFromEvents.ts | 35 +++ .../v10/typescript/src/triggersUpdate.ts | 61 +++++ .../samples/v10/typescript/tsconfig.json | 17 ++ .../src/dataFactoryManagementClient.ts | 2 +- .../arm-datafactory/src/models/index.ts | 137 +++++++++- .../arm-datafactory/src/models/mappers.ts | 136 +++++++++- sdk/datafactory/arm-datafactory/tsconfig.json | 23 +- 288 files changed, 12068 insertions(+), 52 deletions(-) create mode 100644 sdk/datafactory/arm-datafactory/sample.env create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/activityRunsQueryByPipelineRun.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/approvesOrRejectsAPrivateEndpointConnectionForAFactory.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/dataFlowDebugSessionAddDataFlow.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/dataFlowDebugSessionCreate.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/dataFlowDebugSessionDelete.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/dataFlowDebugSessionExecuteCommand.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/dataFlowDebugSessionQueryByFactory.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/dataFlowsCreate.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/dataFlowsDelete.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/dataFlowsGet.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/dataFlowsListByFactory.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/dataFlowsUpdate.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/datasetsCreate.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/datasetsDelete.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/datasetsGet.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/datasetsListByFactory.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/datasetsUpdate.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/deleteAPrivateEndpointConnectionForADatafactory.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/exposureControlGetFeatureValue.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/exposureControlGetFeatureValueByFactory.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/exposureControlQueryFeatureValuesByFactory.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/factoriesConfigureFactoryRepo.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/factoriesCreateOrUpdate.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/factoriesDelete.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/factoriesGet.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/factoriesGetDataPlaneAccess.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/factoriesGetGitHubAccessToken.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/factoriesList.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/factoriesListByResourceGroup.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/factoriesUpdate.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/getAPrivateEndpointConnectionForADatafactory.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/getPrivateLinkResourcesOfASite.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimeNodesGet.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimeNodesGetIPAddress.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimeNodesUpdate.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimeObjectMetadataGet.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimeObjectMetadataRefresh.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimesCreate.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimesCreateLinkedIntegrationRuntime.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimesDelete.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimesGet.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimesGetConnectionInfo.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimesGetMonitoringData.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimesGetStatus.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimesListAuthKeys.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimesListByFactory.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimesNodesDelete.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimesOutboundNetworkDependenciesEndpoints.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimesRegenerateAuthKey.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimesStart.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimesStop.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimesSyncCredentials.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimesUpdate.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimesUpgrade.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/linkedServicesCreate.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/linkedServicesDelete.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/linkedServicesGet.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/linkedServicesListByFactory.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/linkedServicesUpdate.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/managedPrivateEndpointsGet.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/managedPrivateEndpointsListByFactory.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/managedVirtualNetworksCreate.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/managedVirtualNetworksDelete.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/managedVirtualNetworksGet.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/managedVirtualNetworksListByFactory.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/operationsList.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/pipelineRunsCancel.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/pipelineRunsGet.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/pipelineRunsQueryByFactory.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/pipelinesCreate.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/pipelinesCreateRun.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/pipelinesDelete.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/pipelinesGet.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/pipelinesListByFactory.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/pipelinesUpdate.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/privateEndPointConnectionsListByFactory.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/triggerRunsQueryByFactory.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/triggersCancel.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/triggersCreate.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/triggersDelete.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/triggersGet.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/triggersGetEventSubscriptionStatus.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/triggersListByFactory.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/triggersQueryByFactory.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/triggersRerun.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/triggersStart.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/triggersStop.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/triggersSubscribeToEvents.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/triggersUnsubscribeFromEvents.ts create mode 100644 sdk/datafactory/arm-datafactory/samples-dev/triggersUpdate.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/README.md create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/activityRunsQueryByPipelineRun.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/approvesOrRejectsAPrivateEndpointConnectionForAFactory.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/dataFlowDebugSessionAddDataFlow.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/dataFlowDebugSessionCreate.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/dataFlowDebugSessionDelete.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/dataFlowDebugSessionExecuteCommand.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/dataFlowDebugSessionQueryByFactory.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/dataFlowsCreate.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/dataFlowsDelete.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/dataFlowsGet.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/dataFlowsListByFactory.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/dataFlowsUpdate.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/datasetsCreate.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/datasetsDelete.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/datasetsGet.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/datasetsListByFactory.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/datasetsUpdate.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/deleteAPrivateEndpointConnectionForADatafactory.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/exposureControlGetFeatureValue.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/exposureControlGetFeatureValueByFactory.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/exposureControlQueryFeatureValuesByFactory.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/factoriesConfigureFactoryRepo.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/factoriesCreateOrUpdate.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/factoriesDelete.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/factoriesGet.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/factoriesGetDataPlaneAccess.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/factoriesGetGitHubAccessToken.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/factoriesList.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/factoriesListByResourceGroup.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/factoriesUpdate.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/getAPrivateEndpointConnectionForADatafactory.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/getPrivateLinkResourcesOfASite.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimeNodesGet.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimeNodesGetIPAddress.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimeNodesUpdate.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimeObjectMetadataGet.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimeObjectMetadataRefresh.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesCreate.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesCreateLinkedIntegrationRuntime.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesDelete.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesGet.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesGetConnectionInfo.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesGetMonitoringData.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesGetStatus.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesListAuthKeys.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesListByFactory.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesNodesDelete.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesOutboundNetworkDependenciesEndpoints.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesRegenerateAuthKey.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesStart.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesStop.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesSyncCredentials.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesUpdate.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesUpgrade.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/linkedServicesCreate.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/linkedServicesDelete.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/linkedServicesGet.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/linkedServicesListByFactory.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/linkedServicesUpdate.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/managedPrivateEndpointsGet.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/managedPrivateEndpointsListByFactory.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/managedVirtualNetworksCreate.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/managedVirtualNetworksDelete.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/managedVirtualNetworksGet.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/managedVirtualNetworksListByFactory.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/operationsList.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/package.json create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/pipelineRunsCancel.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/pipelineRunsGet.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/pipelineRunsQueryByFactory.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/pipelinesCreate.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/pipelinesCreateRun.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/pipelinesDelete.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/pipelinesGet.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/pipelinesListByFactory.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/pipelinesUpdate.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/privateEndPointConnectionsListByFactory.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/sample.env create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/triggerRunsQueryByFactory.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/triggersCancel.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/triggersCreate.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/triggersDelete.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/triggersGet.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/triggersGetEventSubscriptionStatus.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/triggersListByFactory.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/triggersQueryByFactory.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/triggersRerun.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/triggersStart.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/triggersStop.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/triggersSubscribeToEvents.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/triggersUnsubscribeFromEvents.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/javascript/triggersUpdate.js create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/README.md create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/package.json create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/sample.env create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/activityRunsQueryByPipelineRun.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/approvesOrRejectsAPrivateEndpointConnectionForAFactory.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/dataFlowDebugSessionAddDataFlow.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/dataFlowDebugSessionCreate.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/dataFlowDebugSessionDelete.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/dataFlowDebugSessionExecuteCommand.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/dataFlowDebugSessionQueryByFactory.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/dataFlowsCreate.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/dataFlowsDelete.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/dataFlowsGet.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/dataFlowsListByFactory.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/dataFlowsUpdate.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/datasetsCreate.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/datasetsDelete.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/datasetsGet.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/datasetsListByFactory.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/datasetsUpdate.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/deleteAPrivateEndpointConnectionForADatafactory.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/exposureControlGetFeatureValue.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/exposureControlGetFeatureValueByFactory.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/exposureControlQueryFeatureValuesByFactory.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/factoriesConfigureFactoryRepo.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/factoriesCreateOrUpdate.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/factoriesDelete.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/factoriesGet.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/factoriesGetDataPlaneAccess.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/factoriesGetGitHubAccessToken.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/factoriesList.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/factoriesListByResourceGroup.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/factoriesUpdate.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/getAPrivateEndpointConnectionForADatafactory.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/getPrivateLinkResourcesOfASite.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimeNodesGet.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimeNodesGetIPAddress.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimeNodesUpdate.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimeObjectMetadataGet.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimeObjectMetadataRefresh.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesCreate.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesCreateLinkedIntegrationRuntime.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesDelete.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesGet.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesGetConnectionInfo.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesGetMonitoringData.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesGetStatus.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesListAuthKeys.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesListByFactory.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesNodesDelete.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesOutboundNetworkDependenciesEndpoints.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesRegenerateAuthKey.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesStart.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesStop.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesSyncCredentials.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesUpdate.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesUpgrade.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/linkedServicesCreate.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/linkedServicesDelete.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/linkedServicesGet.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/linkedServicesListByFactory.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/linkedServicesUpdate.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/managedPrivateEndpointsGet.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/managedPrivateEndpointsListByFactory.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/managedVirtualNetworksCreate.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/managedVirtualNetworksDelete.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/managedVirtualNetworksGet.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/managedVirtualNetworksListByFactory.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/operationsList.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/pipelineRunsCancel.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/pipelineRunsGet.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/pipelineRunsQueryByFactory.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/pipelinesCreate.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/pipelinesCreateRun.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/pipelinesDelete.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/pipelinesGet.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/pipelinesListByFactory.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/pipelinesUpdate.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/privateEndPointConnectionsListByFactory.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/triggerRunsQueryByFactory.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/triggersCancel.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/triggersCreate.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/triggersDelete.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/triggersGet.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/triggersGetEventSubscriptionStatus.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/triggersListByFactory.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/triggersQueryByFactory.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/triggersRerun.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/triggersStart.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/triggersStop.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/triggersSubscribeToEvents.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/triggersUnsubscribeFromEvents.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/src/triggersUpdate.ts create mode 100644 sdk/datafactory/arm-datafactory/samples/v10/typescript/tsconfig.json diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index bd9d228f5c9c..607be0403427 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -9821,22 +9821,22 @@ packages: dev: false file:projects/arm-datafactory.tgz: - resolution: {integrity: sha512-ysazeGstEeIGdOFX6acPvAcZn5A8j6AQCAtos+depAtZQ0z04/l+2Y+OWyuh8+uKIhY+/iz/VMqRawFRm1EY0g==, tarball: file:projects/arm-datafactory.tgz} + resolution: {integrity: sha512-UH32IrZ05BYFMqfakt70EmTQsW+QVGgMw9gtJnETJPpfoFnPYlW51xBFXxTRjHU22gqHAFjxyVHhqfF3NucErQ==, tarball: file:projects/arm-datafactory.tgz} name: '@rush-temp/arm-datafactory' version: 0.0.0 dependencies: '@azure-tools/test-recorder': 1.0.2 '@microsoft/api-extractor': 7.19.4 - '@rollup/plugin-commonjs': 21.0.1_rollup@2.67.1 - '@rollup/plugin-json': 4.1.0_rollup@2.67.1 - '@rollup/plugin-multi-entry': 3.0.1_rollup@2.67.1 - '@rollup/plugin-node-resolve': 8.4.0_rollup@2.67.1 + '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 + '@rollup/plugin-json': 4.1.0_rollup@1.32.1 + '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 cross-env: 7.0.3 mkdirp: 1.0.4 mocha: 7.2.0 rimraf: 3.0.2 - rollup: 2.67.1 - rollup-plugin-sourcemaps: 0.4.2_rollup@2.67.1 + rollup: 1.32.1 + rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 tslib: 2.3.1 typescript: 4.2.4 uglify-js: 3.15.1 @@ -12966,7 +12966,7 @@ packages: dev: false file:projects/container-registry.tgz: - resolution: {integrity: sha512-DBJrNjfBDQPpuhuC1CK2Tf09gwxZR8AFbUUmjOkxzU4Ra4+k8WNYyADJUQPWDxUnCg+/wckXoRZL/jkX39lpSg==, tarball: file:projects/container-registry.tgz} + resolution: {integrity: sha512-EFTZnQnEhHbqmL1CZJWw7bgI7vYq4WRTRkjsjf8ixNAarMw/NVp3eLd+skni99Hs4F+x4ZhIihyjSIExV5yLJA==, tarball: file:projects/container-registry.tgz} name: '@rush-temp/container-registry' version: 0.0.0 dependencies: @@ -13007,7 +13007,6 @@ packages: transitivePeerDependencies: - bufferutil - debug - - encoding - supports-color - utf-8-validate dev: false @@ -13601,7 +13600,7 @@ packages: dev: false file:projects/data-tables.tgz: - resolution: {integrity: sha512-DaRzGWNUMNnkx5XtovGZ1VfqT6XHzNoh6ivGkD3kWQEGRtv11tnZ75Aguv/eG/3SromlH20PiCA+RQWcLm3FLQ==, tarball: file:projects/data-tables.tgz} + resolution: {integrity: sha512-TEbNW856SR3kFwVpkaq6xq+/lScXvhz1tDQwNF6qBlgQOSMwk5VnR+R82rTsPT0G9gSoTWrnox0ZpAja5SolDA==, tarball: file:projects/data-tables.tgz} name: '@rush-temp/data-tables' version: 0.0.0 dependencies: @@ -13646,7 +13645,6 @@ packages: - '@swc/wasm' - bufferutil - debug - - encoding - supports-color - utf-8-validate dev: false @@ -13965,7 +13963,7 @@ packages: dev: false file:projects/eventhubs-checkpointstore-blob.tgz: - resolution: {integrity: sha512-Zjderk9z4yJ2X0VCX+Bg2mv4sRQQVGvPYhz4bqwQe8ekduCFek0KT0230RKdGANBSmWtYN/zbxmPbjexRtOv8A==, tarball: file:projects/eventhubs-checkpointstore-blob.tgz} + resolution: {integrity: sha512-/D9UB0TNxhGrAggxo5vIN6OmKdenUTYw+XbUlwEbi7efhTrXpxmBXPBZ9fDjYvWWurgmrcB5BmDbs79tY6R8Ow==, tarball: file:projects/eventhubs-checkpointstore-blob.tgz} name: '@rush-temp/eventhubs-checkpointstore-blob' version: 0.0.0 dependencies: @@ -15306,7 +15304,7 @@ packages: dev: false file:projects/purview-scanning.tgz: - resolution: {integrity: sha512-WnLaSRZ6CxnvKrbs6jpe/E/bwaNuNKvHFrC2xf1hNtmbCQffNmeVdCa0GHmsZ/GUruKGIIfeqKTw+cYOBeW0/Q==, tarball: file:projects/purview-scanning.tgz} + resolution: {integrity: sha512-CEnv0KgIVbcMcXzCebG7kDGpFwuBDO560s0N+wFTuY+PnKvNUy7frjaJUCOppWcB6hKIR0knN/idwA1GvH02DA==, tarball: file:projects/purview-scanning.tgz} name: '@rush-temp/purview-scanning' version: 0.0.0 dependencies: @@ -15346,7 +15344,6 @@ packages: transitivePeerDependencies: - bufferutil - debug - - encoding - supports-color - utf-8-validate dev: false @@ -15786,7 +15783,7 @@ packages: dev: false file:projects/storage-file-share.tgz: - resolution: {integrity: sha512-Wxf71HaHGk3OUsxKZVuBej88ap8Pft5N//7ZiLUVN3If1B+1fCanIE/T52XQhsyBXWsgvQFKFTehFLaryX4eIQ==, tarball: file:projects/storage-file-share.tgz} + resolution: {integrity: sha512-2ZH8fLmpPVmWUGAVGdmZ8P0MjIFOKfaaovnt9M901HdH6hzf7cA0zDJWrYWUdyBdWlJWr9/lcc7hNJgNHvRADw==, tarball: file:projects/storage-file-share.tgz} name: '@rush-temp/storage-file-share' version: 0.0.0 dependencies: diff --git a/sdk/datafactory/arm-datafactory/CHANGELOG.md b/sdk/datafactory/arm-datafactory/CHANGELOG.md index cceac87f6710..4415273dea6e 100644 --- a/sdk/datafactory/arm-datafactory/CHANGELOG.md +++ b/sdk/datafactory/arm-datafactory/CHANGELOG.md @@ -1,15 +1,23 @@ # Release History + +## 10.2.0 (2022-02-14) + +**Features** -## 10.1.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - + - Added Interface ScriptActivityParameter + - Added Interface ScriptActivityScriptBlock + - Added Interface ScriptActivityTypePropertiesLogSettings + - Added Type Alias ScriptActivity + - Added Type Alias ScriptActivityLogDestination + - Added Type Alias ScriptActivityParameterDirection + - Added Type Alias ScriptActivityParameterType + - Added Type Alias ScriptType + - Added Enum KnownScriptActivityLogDestination + - Added Enum KnownScriptActivityParameterDirection + - Added Enum KnownScriptActivityParameterType + - Added Enum KnownScriptType + + ## 10.1.0 (2022-01-10) **Features** diff --git a/sdk/datafactory/arm-datafactory/_meta.json b/sdk/datafactory/arm-datafactory/_meta.json index e7b5eb6c7f0f..ab16b5487484 100644 --- a/sdk/datafactory/arm-datafactory/_meta.json +++ b/sdk/datafactory/arm-datafactory/_meta.json @@ -1,7 +1,7 @@ { - "commit": "409af02e5ca217c7e7ec2acf50f4976c053496f8", + "commit": "7c98de7664d4565c088350015ccd0cfc102eab49", "readme": "specification/datafactory/resource-manager/readme.md", - "autorest_command": "autorest --version=3.1.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\mydev\\azure-sdk-for-js ../azure-rest-api-specs/specification/datafactory/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20211217.1", + "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\mydev\\azure-sdk-for-js ../azure-rest-api-specs/specification/datafactory/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20220128.1 --generate-sample=true", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "use": "@autorest/typescript@6.0.0-alpha.16.20211217.1" + "use": "@autorest/typescript@6.0.0-alpha.16.20220128.1" } \ No newline at end of file diff --git a/sdk/datafactory/arm-datafactory/api-extractor.json b/sdk/datafactory/arm-datafactory/api-extractor.json index 488370c1585e..76cff1157f82 100644 --- a/sdk/datafactory/arm-datafactory/api-extractor.json +++ b/sdk/datafactory/arm-datafactory/api-extractor.json @@ -1,18 +1,31 @@ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", "mainEntryPointFilePath": "./dist-esm/src/index.d.ts", - "docModel": { "enabled": true }, - "apiReport": { "enabled": true, "reportFolder": "./review" }, + "docModel": { + "enabled": true + }, + "apiReport": { + "enabled": true, + "reportFolder": "./review" + }, "dtsRollup": { "enabled": true, "untrimmedFilePath": "", "publicTrimmedFilePath": "./types/arm-datafactory.d.ts" }, "messages": { - "tsdocMessageReporting": { "default": { "logLevel": "none" } }, + "tsdocMessageReporting": { + "default": { + "logLevel": "none" + } + }, "extractorMessageReporting": { - "ae-missing-release-tag": { "logLevel": "none" }, - "ae-unresolved-link": { "logLevel": "none" } + "ae-missing-release-tag": { + "logLevel": "none" + }, + "ae-unresolved-link": { + "logLevel": "none" + } } } -} +} \ No newline at end of file diff --git a/sdk/datafactory/arm-datafactory/package.json b/sdk/datafactory/arm-datafactory/package.json index a8e10a2073d3..e12d8c2b71c5 100644 --- a/sdk/datafactory/arm-datafactory/package.json +++ b/sdk/datafactory/arm-datafactory/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for DataFactoryManagementClient.", - "version": "10.1.1", + "version": "10.2.0", "engines": { "node": ">=12.0.0" }, @@ -29,12 +29,12 @@ "types": "./types/arm-datafactory.d.ts", "devDependencies": { "@microsoft/api-extractor": "^7.18.11", - "@rollup/plugin-commonjs": "^21.0.1", + "@rollup/plugin-commonjs": "11.0.2", "@rollup/plugin-json": "^4.0.0", "@rollup/plugin-multi-entry": "^3.0.0", "@rollup/plugin-node-resolve": "^8.0.0", "mkdirp": "^1.0.4", - "rollup": "^2.0.0", + "rollup": "^1.16.3", "rollup-plugin-sourcemaps": "^0.4.2", "typescript": "~4.2.0", "uglify-js": "^3.4.9", @@ -98,5 +98,21 @@ "docs": "echo skipped" }, "sideEffects": false, - "autoPublish": true -} + "//metadata": { + "constantPaths": [ + { + "path": "src/dataFactoryManagementClient.ts", + "prefix": "packageDetails" + } + ] + }, + "autoPublish": true, + "//sampleConfiguration": { + "productName": "", + "productSlugs": [ + "azure" + ], + "disableDocsMs": true, + "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-datafactory?view=azure-node-preview" + } +} \ No newline at end of file diff --git a/sdk/datafactory/arm-datafactory/review/arm-datafactory.api.md b/sdk/datafactory/arm-datafactory/review/arm-datafactory.api.md index 18f5eacd849d..6be899b87768 100644 --- a/sdk/datafactory/arm-datafactory/review/arm-datafactory.api.md +++ b/sdk/datafactory/arm-datafactory/review/arm-datafactory.api.md @@ -23,7 +23,7 @@ export interface Activity { dependsOn?: ActivityDependency[]; description?: string; name: string; - type: "Container" | "Execution" | "Copy" | "HDInsightHive" | "HDInsightPig" | "HDInsightMapReduce" | "HDInsightStreaming" | "HDInsightSpark" | "ExecuteSSISPackage" | "Custom" | "SqlServerStoredProcedure" | "ExecutePipeline" | "Delete" | "AzureDataExplorerCommand" | "Lookup" | "WebActivity" | "GetMetadata" | "IfCondition" | "Switch" | "ForEach" | "AzureMLBatchExecution" | "AzureMLUpdateResource" | "AzureMLExecutePipeline" | "DataLakeAnalyticsU-SQL" | "Wait" | "Fail" | "Until" | "Validation" | "Filter" | "DatabricksNotebook" | "DatabricksSparkJar" | "DatabricksSparkPython" | "SetVariable" | "AppendVariable" | "AzureFunctionActivity" | "WebHook" | "ExecuteDataFlow" | "ExecuteWranglingDataflow"; + type: "Container" | "Execution" | "Copy" | "HDInsightHive" | "HDInsightPig" | "HDInsightMapReduce" | "HDInsightStreaming" | "HDInsightSpark" | "ExecuteSSISPackage" | "Custom" | "SqlServerStoredProcedure" | "ExecutePipeline" | "Delete" | "AzureDataExplorerCommand" | "Lookup" | "WebActivity" | "GetMetadata" | "IfCondition" | "Switch" | "ForEach" | "AzureMLBatchExecution" | "AzureMLUpdateResource" | "AzureMLExecutePipeline" | "DataLakeAnalyticsU-SQL" | "Wait" | "Fail" | "Until" | "Validation" | "Filter" | "DatabricksNotebook" | "DatabricksSparkJar" | "DatabricksSparkPython" | "SetVariable" | "AppendVariable" | "AzureFunctionActivity" | "WebHook" | "ExecuteDataFlow" | "ExecuteWranglingDataflow" | "Script"; userProperties?: UserProperty[]; } @@ -2462,13 +2462,13 @@ export type ExecuteWranglingDataflowActivity = Activity & { // @public export type ExecutionActivity = Activity & { - type: "Execution" | "Copy" | "HDInsightHive" | "HDInsightPig" | "HDInsightMapReduce" | "HDInsightStreaming" | "HDInsightSpark" | "ExecuteSSISPackage" | "Custom" | "SqlServerStoredProcedure" | "Delete" | "AzureDataExplorerCommand" | "Lookup" | "WebActivity" | "GetMetadata" | "AzureMLBatchExecution" | "AzureMLUpdateResource" | "AzureMLExecutePipeline" | "DataLakeAnalyticsU-SQL" | "DatabricksNotebook" | "DatabricksSparkJar" | "DatabricksSparkPython" | "AzureFunctionActivity" | "ExecuteDataFlow"; + type: "Execution" | "Copy" | "HDInsightHive" | "HDInsightPig" | "HDInsightMapReduce" | "HDInsightStreaming" | "HDInsightSpark" | "ExecuteSSISPackage" | "Custom" | "SqlServerStoredProcedure" | "Delete" | "AzureDataExplorerCommand" | "Lookup" | "WebActivity" | "GetMetadata" | "AzureMLBatchExecution" | "AzureMLUpdateResource" | "AzureMLExecutePipeline" | "DataLakeAnalyticsU-SQL" | "DatabricksNotebook" | "DatabricksSparkJar" | "DatabricksSparkPython" | "AzureFunctionActivity" | "ExecuteDataFlow" | "Script"; linkedServiceName?: LinkedServiceReference; policy?: ActivityPolicy; }; // @public (undocumented) -export type ExecutionActivityUnion = ExecutionActivity | CopyActivity | HDInsightHiveActivity | HDInsightPigActivity | HDInsightMapReduceActivity | HDInsightStreamingActivity | HDInsightSparkActivity | ExecuteSsisPackageActivity | CustomActivity | SqlServerStoredProcedureActivity | DeleteActivity | AzureDataExplorerCommandActivity | LookupActivity | WebActivity | GetMetadataActivity | AzureMLBatchExecutionActivity | AzureMLUpdateResourceActivity | AzureMLExecutePipelineActivity | DataLakeAnalyticsUsqlActivity | DatabricksNotebookActivity | DatabricksSparkJarActivity | DatabricksSparkPythonActivity | AzureFunctionActivity | ExecuteDataFlowActivity; +export type ExecutionActivityUnion = ExecutionActivity | CopyActivity | HDInsightHiveActivity | HDInsightPigActivity | HDInsightMapReduceActivity | HDInsightStreamingActivity | HDInsightSparkActivity | ExecuteSsisPackageActivity | CustomActivity | SqlServerStoredProcedureActivity | DeleteActivity | AzureDataExplorerCommandActivity | LookupActivity | WebActivity | GetMetadataActivity | AzureMLBatchExecutionActivity | AzureMLUpdateResourceActivity | AzureMLExecutePipelineActivity | DataLakeAnalyticsUsqlActivity | DatabricksNotebookActivity | DatabricksSparkJarActivity | DatabricksSparkPythonActivity | AzureFunctionActivity | ExecuteDataFlowActivity | ScriptActivity; // @public export interface ExportSettings { @@ -4669,6 +4669,60 @@ export enum KnownSapTablePartitionOption { PartitionOnTime = "PartitionOnTime" } +// @public +export enum KnownScriptActivityLogDestination { + // (undocumented) + ActivityOutput = "ActivityOutput", + // (undocumented) + ExternalStore = "ExternalStore" +} + +// @public +export enum KnownScriptActivityParameterDirection { + // (undocumented) + Input = "Input", + // (undocumented) + InputOutput = "InputOutput", + // (undocumented) + Output = "Output" +} + +// @public +export enum KnownScriptActivityParameterType { + // (undocumented) + Boolean = "Boolean", + // (undocumented) + DateTime = "DateTime", + // (undocumented) + DateTimeOffset = "DateTimeOffset", + // (undocumented) + Decimal = "Decimal", + // (undocumented) + Double = "Double", + // (undocumented) + Guid = "Guid", + // (undocumented) + Int16 = "Int16", + // (undocumented) + Int32 = "Int32", + // (undocumented) + Int64 = "Int64", + // (undocumented) + Single = "Single", + // (undocumented) + String = "String", + // (undocumented) + Timespan = "Timespan" +} + +// @public +export enum KnownScriptType { + // (undocumented) + NonQuery = "NonQuery", + // (undocumented) + Query = "Query" +} + // @public export enum KnownSelfHostedIntegrationRuntimeNodeStatus { // (undocumented) @@ -6848,6 +6902,47 @@ export interface ScriptAction { uri: string; } +// @public +export type ScriptActivity = ExecutionActivity & { + type: "Script"; + scripts?: ScriptActivityScriptBlock[]; + logSettings?: ScriptActivityTypePropertiesLogSettings; +}; + +// @public +export type ScriptActivityLogDestination = string; + +// @public +export interface ScriptActivityParameter { + direction?: ScriptActivityParameterDirection; + name?: Record; + size?: number; + type?: ScriptActivityParameterType; + value?: Record; +} + +// @public +export type ScriptActivityParameterDirection = string; + +// @public +export type ScriptActivityParameterType = string; + +// @public +export interface ScriptActivityScriptBlock { + parameters?: ScriptActivityParameter[]; + text: Record; + type: ScriptType; +} + +// @public +export interface ScriptActivityTypePropertiesLogSettings { + logDestination: ScriptActivityLogDestination; + logLocationSettings?: LogLocationSettings; +} + +// @public +export type ScriptType = string; + // @public export interface SecretBase { type: "SecureString" | "AzureKeyVaultSecret"; diff --git a/sdk/datafactory/arm-datafactory/sample.env b/sdk/datafactory/arm-datafactory/sample.env new file mode 100644 index 000000000000..672847a3fea0 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/sample.env @@ -0,0 +1,4 @@ +# App registration secret for AAD authentication +AZURE_CLIENT_SECRET= +AZURE_CLIENT_ID= +AZURE_TENANT_ID= \ No newline at end of file diff --git a/sdk/datafactory/arm-datafactory/samples-dev/activityRunsQueryByPipelineRun.ts b/sdk/datafactory/arm-datafactory/samples-dev/activityRunsQueryByPipelineRun.ts new file mode 100644 index 000000000000..ce2b1e48a10f --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/activityRunsQueryByPipelineRun.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Query activity runs based on input filter conditions. + * + * @summary Query activity runs based on input filter conditions. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ActivityRuns_QueryByPipelineRun.json + */ +import { + RunFilterParameters, + DataFactoryManagementClient +} from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function activityRunsQueryByPipelineRun() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const runId = "2f7fdb90-5df1-4b8e-ac2f-064cfa58202b"; + const filterParameters: RunFilterParameters = { + lastUpdatedAfter: new Date("2018-06-16T00:36:44.3345758Z"), + lastUpdatedBefore: new Date("2018-06-16T00:49:48.3686473Z") + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.activityRuns.queryByPipelineRun( + resourceGroupName, + factoryName, + runId, + filterParameters + ); + console.log(result); +} + +activityRunsQueryByPipelineRun().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/approvesOrRejectsAPrivateEndpointConnectionForAFactory.ts b/sdk/datafactory/arm-datafactory/samples-dev/approvesOrRejectsAPrivateEndpointConnectionForAFactory.ts new file mode 100644 index 000000000000..c92b58b8e589 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/approvesOrRejectsAPrivateEndpointConnectionForAFactory.ts @@ -0,0 +1,48 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Approves or rejects a private endpoint connection + * + * @summary Approves or rejects a private endpoint connection + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ApproveRejectPrivateEndpointConnection.json + */ +import { + PrivateLinkConnectionApprovalRequestResource, + DataFactoryManagementClient +} from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function approvesOrRejectsAPrivateEndpointConnectionForAFactory() { + const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const privateEndpointConnectionName = "connection"; + const privateEndpointWrapper: PrivateLinkConnectionApprovalRequestResource = { + properties: { + privateLinkServiceConnectionState: { + description: "Approved by admin.", + actionsRequired: "", + status: "Approved" + } + } + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.privateEndpointConnection.createOrUpdate( + resourceGroupName, + factoryName, + privateEndpointConnectionName, + privateEndpointWrapper + ); + console.log(result); +} + +approvesOrRejectsAPrivateEndpointConnectionForAFactory().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/dataFlowDebugSessionAddDataFlow.ts b/sdk/datafactory/arm-datafactory/samples-dev/dataFlowDebugSessionAddDataFlow.ts new file mode 100644 index 000000000000..8edfae61c641 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/dataFlowDebugSessionAddDataFlow.ts @@ -0,0 +1,102 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Add a data flow into debug session. + * + * @summary Add a data flow into debug session. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/DataFlowDebugSession_AddDataFlow.json + */ +import { + DataFlowDebugPackage, + DataFactoryManagementClient +} from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function dataFlowDebugSessionAddDataFlow() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const request: DataFlowDebugPackage = { + dataFlow: { + name: "dataflow1", + properties: { + type: "MappingDataFlow", + script: + "\n\nsource(output(\n Column_1 as string\n ),\n allowSchemaDrift: true,\n validateSchema: false) ~> source1", + sinks: [], + sources: [ + { + name: "source1", + dataset: { + type: "DatasetReference", + referenceName: "DelimitedText2" + } + } + ], + transformations: [] + } + }, + datasets: [ + { + name: "dataset1", + properties: { + type: "DelimitedText", + schema: [{ type: "String" }], + annotations: [], + columnDelimiter: ",", + escapeChar: "\\", + firstRowAsHeader: true, + linkedServiceName: { + type: "LinkedServiceReference", + referenceName: "linkedService5" + }, + location: { + type: "AzureBlobStorageLocation", + container: "dataflow-sample-data", + fileName: "Ansiencoding.csv" + }, + quoteChar: '"' + } + } + ], + debugSettings: { + datasetParameters: { Movies: { path: "abc" }, Output: { time: "def" } }, + parameters: { sourcePath: "Toy" }, + sourceSettings: [ + { rowLimit: 1000, sourceName: "source1" }, + { rowLimit: 222, sourceName: "source2" } + ] + }, + linkedServices: [ + { + name: "linkedService1", + properties: { + type: "AzureBlobStorage", + annotations: [], + connectionString: + "DefaultEndpointsProtocol=https;AccountName=;EndpointSuffix=core.windows.net;", + encryptedCredential: "" + } + } + ], + sessionId: "f06ed247-9d07-49b2-b05e-2cb4a2fc871e" + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.dataFlowDebugSession.addDataFlow( + resourceGroupName, + factoryName, + request + ); + console.log(result); +} + +dataFlowDebugSessionAddDataFlow().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/dataFlowDebugSessionCreate.ts b/sdk/datafactory/arm-datafactory/samples-dev/dataFlowDebugSessionCreate.ts new file mode 100644 index 000000000000..7bef68207ff3 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/dataFlowDebugSessionCreate.ts @@ -0,0 +1,54 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Creates a data flow debug session. + * + * @summary Creates a data flow debug session. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/DataFlowDebugSession_Create.json + */ +import { + CreateDataFlowDebugSessionRequest, + DataFactoryManagementClient +} from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function dataFlowDebugSessionCreate() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const request: CreateDataFlowDebugSessionRequest = { + integrationRuntime: { + name: "ir1", + properties: { + type: "Managed", + computeProperties: { + dataFlowProperties: { + computeType: "General", + coreCount: 48, + timeToLive: 10 + }, + location: "AutoResolve" + } + } + }, + timeToLive: 60 + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.dataFlowDebugSession.beginCreateAndWait( + resourceGroupName, + factoryName, + request + ); + console.log(result); +} + +dataFlowDebugSessionCreate().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/dataFlowDebugSessionDelete.ts b/sdk/datafactory/arm-datafactory/samples-dev/dataFlowDebugSessionDelete.ts new file mode 100644 index 000000000000..5ff5e84c98f2 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/dataFlowDebugSessionDelete.ts @@ -0,0 +1,40 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Deletes a data flow debug session. + * + * @summary Deletes a data flow debug session. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/DataFlowDebugSession_Delete.json + */ +import { + DeleteDataFlowDebugSessionRequest, + DataFactoryManagementClient +} from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function dataFlowDebugSessionDelete() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const request: DeleteDataFlowDebugSessionRequest = { + sessionId: "91fb57e0-8292-47be-89ff-c8f2d2bb2a7e" + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.dataFlowDebugSession.delete( + resourceGroupName, + factoryName, + request + ); + console.log(result); +} + +dataFlowDebugSessionDelete().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/dataFlowDebugSessionExecuteCommand.ts b/sdk/datafactory/arm-datafactory/samples-dev/dataFlowDebugSessionExecuteCommand.ts new file mode 100644 index 000000000000..438ef2df4f0a --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/dataFlowDebugSessionExecuteCommand.ts @@ -0,0 +1,42 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Execute a data flow debug command. + * + * @summary Execute a data flow debug command. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/DataFlowDebugSession_ExecuteCommand.json + */ +import { + DataFlowDebugCommandRequest, + DataFactoryManagementClient +} from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function dataFlowDebugSessionExecuteCommand() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const request: DataFlowDebugCommandRequest = { + command: "executePreviewQuery", + commandPayload: { rowLimits: 100, streamName: "source1" }, + sessionId: "f06ed247-9d07-49b2-b05e-2cb4a2fc871e" + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.dataFlowDebugSession.beginExecuteCommandAndWait( + resourceGroupName, + factoryName, + request + ); + console.log(result); +} + +dataFlowDebugSessionExecuteCommand().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/dataFlowDebugSessionQueryByFactory.ts b/sdk/datafactory/arm-datafactory/samples-dev/dataFlowDebugSessionQueryByFactory.ts new file mode 100644 index 000000000000..b0e32867730f --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/dataFlowDebugSessionQueryByFactory.ts @@ -0,0 +1,36 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Query all active data flow debug sessions. + * + * @summary Query all active data flow debug sessions. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/DataFlowDebugSession_QueryByFactory.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function dataFlowDebugSessionQueryByFactory() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.dataFlowDebugSession.listQueryByFactory( + resourceGroupName, + factoryName + )) { + resArray.push(item); + } + console.log(resArray); +} + +dataFlowDebugSessionQueryByFactory().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/dataFlowsCreate.ts b/sdk/datafactory/arm-datafactory/samples-dev/dataFlowsCreate.ts new file mode 100644 index 000000000000..4340671df1e1 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/dataFlowsCreate.ts @@ -0,0 +1,74 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Creates or updates a data flow. + * + * @summary Creates or updates a data flow. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/DataFlows_Create.json + */ +import { + DataFlowResource, + DataFactoryManagementClient +} from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function dataFlowsCreate() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const dataFlowName = "exampleDataFlow"; + const dataFlow: DataFlowResource = { + properties: { + type: "MappingDataFlow", + description: + "Sample demo data flow to convert currencies showing usage of union, derive and conditional split transformation.", + script: + "source(output(PreviousConversionRate as double,Country as string,DateTime1 as string,CurrentConversionRate as double),allowSchemaDrift: false,validateSchema: false) ~> USDCurrency\nsource(output(PreviousConversionRate as double,Country as string,DateTime1 as string,CurrentConversionRate as double),allowSchemaDrift: true,validateSchema: false) ~> CADSource\nUSDCurrency, CADSource union(byName: true)~> Union\nUnion derive(NewCurrencyRate = round(CurrentConversionRate*1.25)) ~> NewCurrencyColumn\nNewCurrencyColumn split(Country == 'USD',Country == 'CAD',disjoint: false) ~> ConditionalSplit1@(USD, CAD)\nConditionalSplit1@USD sink(saveMode:'overwrite' ) ~> USDSink\nConditionalSplit1@CAD sink(saveMode:'overwrite' ) ~> CADSink", + sinks: [ + { + name: "USDSink", + dataset: { type: "DatasetReference", referenceName: "USDOutput" } + }, + { + name: "CADSink", + dataset: { type: "DatasetReference", referenceName: "CADOutput" } + } + ], + sources: [ + { + name: "USDCurrency", + dataset: { + type: "DatasetReference", + referenceName: "CurrencyDatasetUSD" + } + }, + { + name: "CADSource", + dataset: { + type: "DatasetReference", + referenceName: "CurrencyDatasetCAD" + } + } + ] + } + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.dataFlows.createOrUpdate( + resourceGroupName, + factoryName, + dataFlowName, + dataFlow + ); + console.log(result); +} + +dataFlowsCreate().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/dataFlowsDelete.ts b/sdk/datafactory/arm-datafactory/samples-dev/dataFlowsDelete.ts new file mode 100644 index 000000000000..07053f38ba04 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/dataFlowsDelete.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Deletes a data flow. + * + * @summary Deletes a data flow. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/DataFlows_Delete.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function dataFlowsDelete() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const dataFlowName = "exampleDataFlow"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.dataFlows.delete( + resourceGroupName, + factoryName, + dataFlowName + ); + console.log(result); +} + +dataFlowsDelete().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/dataFlowsGet.ts b/sdk/datafactory/arm-datafactory/samples-dev/dataFlowsGet.ts new file mode 100644 index 000000000000..fdc035baf21d --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/dataFlowsGet.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Gets a data flow. + * + * @summary Gets a data flow. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/DataFlows_Get.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function dataFlowsGet() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const dataFlowName = "exampleDataFlow"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.dataFlows.get( + resourceGroupName, + factoryName, + dataFlowName + ); + console.log(result); +} + +dataFlowsGet().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/dataFlowsListByFactory.ts b/sdk/datafactory/arm-datafactory/samples-dev/dataFlowsListByFactory.ts new file mode 100644 index 000000000000..3907ccac48a4 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/dataFlowsListByFactory.ts @@ -0,0 +1,36 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Lists data flows. + * + * @summary Lists data flows. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/DataFlows_ListByFactory.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function dataFlowsListByFactory() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.dataFlows.listByFactory( + resourceGroupName, + factoryName + )) { + resArray.push(item); + } + console.log(resArray); +} + +dataFlowsListByFactory().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/dataFlowsUpdate.ts b/sdk/datafactory/arm-datafactory/samples-dev/dataFlowsUpdate.ts new file mode 100644 index 000000000000..e7f2dcb6eb26 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/dataFlowsUpdate.ts @@ -0,0 +1,74 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Creates or updates a data flow. + * + * @summary Creates or updates a data flow. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/DataFlows_Update.json + */ +import { + DataFlowResource, + DataFactoryManagementClient +} from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function dataFlowsUpdate() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const dataFlowName = "exampleDataFlow"; + const dataFlow: DataFlowResource = { + properties: { + type: "MappingDataFlow", + description: + "Sample demo data flow to convert currencies showing usage of union, derive and conditional split transformation.", + script: + "source(output(PreviousConversionRate as double,Country as string,DateTime1 as string,CurrentConversionRate as double),allowSchemaDrift: false,validateSchema: false) ~> USDCurrency\nsource(output(PreviousConversionRate as double,Country as string,DateTime1 as string,CurrentConversionRate as double),allowSchemaDrift: true,validateSchema: false) ~> CADSource\nUSDCurrency, CADSource union(byName: true)~> Union\nUnion derive(NewCurrencyRate = round(CurrentConversionRate*1.25)) ~> NewCurrencyColumn\nNewCurrencyColumn split(Country == 'USD',Country == 'CAD',disjoint: false) ~> ConditionalSplit1@(USD, CAD)\nConditionalSplit1@USD sink(saveMode:'overwrite' ) ~> USDSink\nConditionalSplit1@CAD sink(saveMode:'overwrite' ) ~> CADSink", + sinks: [ + { + name: "USDSink", + dataset: { type: "DatasetReference", referenceName: "USDOutput" } + }, + { + name: "CADSink", + dataset: { type: "DatasetReference", referenceName: "CADOutput" } + } + ], + sources: [ + { + name: "USDCurrency", + dataset: { + type: "DatasetReference", + referenceName: "CurrencyDatasetUSD" + } + }, + { + name: "CADSource", + dataset: { + type: "DatasetReference", + referenceName: "CurrencyDatasetCAD" + } + } + ] + } + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.dataFlows.createOrUpdate( + resourceGroupName, + factoryName, + dataFlowName, + dataFlow + ); + console.log(result); +} + +dataFlowsUpdate().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/datasetsCreate.ts b/sdk/datafactory/arm-datafactory/samples-dev/datasetsCreate.ts new file mode 100644 index 000000000000..91c17f5983e1 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/datasetsCreate.ts @@ -0,0 +1,55 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Creates or updates a dataset. + * + * @summary Creates or updates a dataset. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Datasets_Create.json + */ +import { + DatasetResource, + DataFactoryManagementClient +} from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function datasetsCreate() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const datasetName = "exampleDataset"; + const dataset: DatasetResource = { + properties: { + type: "AzureBlob", + format: { type: "TextFormat" }, + fileName: { type: "Expression", value: "@dataset().MyFileName" }, + folderPath: { type: "Expression", value: "@dataset().MyFolderPath" }, + linkedServiceName: { + type: "LinkedServiceReference", + referenceName: "exampleLinkedService" + }, + parameters: { + myFileName: { type: "String" }, + myFolderPath: { type: "String" } + } + } + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.datasets.createOrUpdate( + resourceGroupName, + factoryName, + datasetName, + dataset + ); + console.log(result); +} + +datasetsCreate().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/datasetsDelete.ts b/sdk/datafactory/arm-datafactory/samples-dev/datasetsDelete.ts new file mode 100644 index 000000000000..20f5aa9fd770 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/datasetsDelete.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Deletes a dataset. + * + * @summary Deletes a dataset. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Datasets_Delete.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function datasetsDelete() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const datasetName = "exampleDataset"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.datasets.delete( + resourceGroupName, + factoryName, + datasetName + ); + console.log(result); +} + +datasetsDelete().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/datasetsGet.ts b/sdk/datafactory/arm-datafactory/samples-dev/datasetsGet.ts new file mode 100644 index 000000000000..12bcb052cb14 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/datasetsGet.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Gets a dataset. + * + * @summary Gets a dataset. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Datasets_Get.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function datasetsGet() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const datasetName = "exampleDataset"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.datasets.get( + resourceGroupName, + factoryName, + datasetName + ); + console.log(result); +} + +datasetsGet().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/datasetsListByFactory.ts b/sdk/datafactory/arm-datafactory/samples-dev/datasetsListByFactory.ts new file mode 100644 index 000000000000..4dbb8f0da866 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/datasetsListByFactory.ts @@ -0,0 +1,36 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Lists datasets. + * + * @summary Lists datasets. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Datasets_ListByFactory.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function datasetsListByFactory() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.datasets.listByFactory( + resourceGroupName, + factoryName + )) { + resArray.push(item); + } + console.log(resArray); +} + +datasetsListByFactory().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/datasetsUpdate.ts b/sdk/datafactory/arm-datafactory/samples-dev/datasetsUpdate.ts new file mode 100644 index 000000000000..51403c6bc715 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/datasetsUpdate.ts @@ -0,0 +1,56 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Creates or updates a dataset. + * + * @summary Creates or updates a dataset. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Datasets_Update.json + */ +import { + DatasetResource, + DataFactoryManagementClient +} from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function datasetsUpdate() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const datasetName = "exampleDataset"; + const dataset: DatasetResource = { + properties: { + type: "AzureBlob", + format: { type: "TextFormat" }, + description: "Example description", + fileName: { type: "Expression", value: "@dataset().MyFileName" }, + folderPath: { type: "Expression", value: "@dataset().MyFolderPath" }, + linkedServiceName: { + type: "LinkedServiceReference", + referenceName: "exampleLinkedService" + }, + parameters: { + myFileName: { type: "String" }, + myFolderPath: { type: "String" } + } + } + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.datasets.createOrUpdate( + resourceGroupName, + factoryName, + datasetName, + dataset + ); + console.log(result); +} + +datasetsUpdate().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/deleteAPrivateEndpointConnectionForADatafactory.ts b/sdk/datafactory/arm-datafactory/samples-dev/deleteAPrivateEndpointConnectionForADatafactory.ts new file mode 100644 index 000000000000..0bacd3de9a83 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/deleteAPrivateEndpointConnectionForADatafactory.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Deletes a private endpoint connection + * + * @summary Deletes a private endpoint connection + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/DeletePrivateEndpointConnection.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function deleteAPrivateEndpointConnectionForADatafactory() { + const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const privateEndpointConnectionName = "connection"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.privateEndpointConnection.delete( + resourceGroupName, + factoryName, + privateEndpointConnectionName + ); + console.log(result); +} + +deleteAPrivateEndpointConnectionForADatafactory().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/exposureControlGetFeatureValue.ts b/sdk/datafactory/arm-datafactory/samples-dev/exposureControlGetFeatureValue.ts new file mode 100644 index 000000000000..16de0ddfc49e --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/exposureControlGetFeatureValue.ts @@ -0,0 +1,39 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Get exposure control feature for specific location. + * + * @summary Get exposure control feature for specific location. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ExposureControl_GetFeatureValue.json + */ +import { + ExposureControlRequest, + DataFactoryManagementClient +} from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function exposureControlGetFeatureValue() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const locationId = "WestEurope"; + const exposureControlRequest: ExposureControlRequest = { + featureName: "ADFIntegrationRuntimeSharingRbac", + featureType: "Feature" + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.exposureControl.getFeatureValue( + locationId, + exposureControlRequest + ); + console.log(result); +} + +exposureControlGetFeatureValue().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/exposureControlGetFeatureValueByFactory.ts b/sdk/datafactory/arm-datafactory/samples-dev/exposureControlGetFeatureValueByFactory.ts new file mode 100644 index 000000000000..3965f2e296d1 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/exposureControlGetFeatureValueByFactory.ts @@ -0,0 +1,41 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Get exposure control feature for specific factory. + * + * @summary Get exposure control feature for specific factory. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ExposureControl_GetFeatureValueByFactory.json + */ +import { + ExposureControlRequest, + DataFactoryManagementClient +} from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function exposureControlGetFeatureValueByFactory() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const exposureControlRequest: ExposureControlRequest = { + featureName: "ADFIntegrationRuntimeSharingRbac", + featureType: "Feature" + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.exposureControl.getFeatureValueByFactory( + resourceGroupName, + factoryName, + exposureControlRequest + ); + console.log(result); +} + +exposureControlGetFeatureValueByFactory().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/exposureControlQueryFeatureValuesByFactory.ts b/sdk/datafactory/arm-datafactory/samples-dev/exposureControlQueryFeatureValuesByFactory.ts new file mode 100644 index 000000000000..6fd9aad4836e --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/exposureControlQueryFeatureValuesByFactory.ts @@ -0,0 +1,46 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Get list of exposure control features for specific factory. + * + * @summary Get list of exposure control features for specific factory. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ExposureControl_QueryFeatureValuesByFactory.json + */ +import { + ExposureControlBatchRequest, + DataFactoryManagementClient +} from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function exposureControlQueryFeatureValuesByFactory() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const exposureControlBatchRequest: ExposureControlBatchRequest = { + exposureControlRequests: [ + { + featureName: "ADFIntegrationRuntimeSharingRbac", + featureType: "Feature" + }, + { featureName: "ADFSampleFeature", featureType: "Feature" } + ] + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.exposureControl.queryFeatureValuesByFactory( + resourceGroupName, + factoryName, + exposureControlBatchRequest + ); + console.log(result); +} + +exposureControlQueryFeatureValuesByFactory().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/factoriesConfigureFactoryRepo.ts b/sdk/datafactory/arm-datafactory/samples-dev/factoriesConfigureFactoryRepo.ts new file mode 100644 index 000000000000..3c384a10819a --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/factoriesConfigureFactoryRepo.ts @@ -0,0 +1,49 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Updates a factory's repo information. + * + * @summary Updates a factory's repo information. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Factories_ConfigureFactoryRepo.json + */ +import { + FactoryRepoUpdate, + DataFactoryManagementClient +} from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function factoriesConfigureFactoryRepo() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const locationId = "East US"; + const factoryRepoUpdate: FactoryRepoUpdate = { + factoryResourceId: + "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName", + repoConfiguration: { + type: "FactoryVSTSConfiguration", + accountName: "ADF", + collaborationBranch: "master", + lastCommitId: "", + projectName: "project", + repositoryName: "repo", + rootFolder: "/", + tenantId: "" + } + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.factories.configureFactoryRepo( + locationId, + factoryRepoUpdate + ); + console.log(result); +} + +factoriesConfigureFactoryRepo().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/factoriesCreateOrUpdate.ts b/sdk/datafactory/arm-datafactory/samples-dev/factoriesCreateOrUpdate.ts new file mode 100644 index 000000000000..deaa26bbf77d --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/factoriesCreateOrUpdate.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Creates or updates a factory. + * + * @summary Creates or updates a factory. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Factories_CreateOrUpdate.json + */ +import { Factory, DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function factoriesCreateOrUpdate() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const factory: Factory = { location: "East US" }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.factories.createOrUpdate( + resourceGroupName, + factoryName, + factory + ); + console.log(result); +} + +factoriesCreateOrUpdate().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/factoriesDelete.ts b/sdk/datafactory/arm-datafactory/samples-dev/factoriesDelete.ts new file mode 100644 index 000000000000..9db486ce0dea --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/factoriesDelete.ts @@ -0,0 +1,30 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Deletes a factory. + * + * @summary Deletes a factory. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Factories_Delete.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function factoriesDelete() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.factories.delete(resourceGroupName, factoryName); + console.log(result); +} + +factoriesDelete().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/factoriesGet.ts b/sdk/datafactory/arm-datafactory/samples-dev/factoriesGet.ts new file mode 100644 index 000000000000..9c12511a8d03 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/factoriesGet.ts @@ -0,0 +1,30 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Gets a factory. + * + * @summary Gets a factory. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Factories_Get.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function factoriesGet() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.factories.get(resourceGroupName, factoryName); + console.log(result); +} + +factoriesGet().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/factoriesGetDataPlaneAccess.ts b/sdk/datafactory/arm-datafactory/samples-dev/factoriesGetDataPlaneAccess.ts new file mode 100644 index 000000000000..dddacf10a2be --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/factoriesGetDataPlaneAccess.ts @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Get Data Plane access. + * + * @summary Get Data Plane access. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Factories_GetDataPlaneAccess.json + */ +import { + UserAccessPolicy, + DataFactoryManagementClient +} from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function factoriesGetDataPlaneAccess() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const policy: UserAccessPolicy = { + accessResourcePath: "", + expireTime: "2018-11-10T09:46:20.2659347Z", + permissions: "r", + profileName: "DefaultProfile", + startTime: "2018-11-10T02:46:20.2659347Z" + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.factories.getDataPlaneAccess( + resourceGroupName, + factoryName, + policy + ); + console.log(result); +} + +factoriesGetDataPlaneAccess().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/factoriesGetGitHubAccessToken.ts b/sdk/datafactory/arm-datafactory/samples-dev/factoriesGetGitHubAccessToken.ts new file mode 100644 index 000000000000..5f24ddddcfa9 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/factoriesGetGitHubAccessToken.ts @@ -0,0 +1,42 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Get GitHub Access Token. + * + * @summary Get GitHub Access Token. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Factories_GetGitHubAccessToken.json + */ +import { + GitHubAccessTokenRequest, + DataFactoryManagementClient +} from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function factoriesGetGitHubAccessToken() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const gitHubAccessTokenRequest: GitHubAccessTokenRequest = { + gitHubAccessCode: "some", + gitHubAccessTokenBaseUrl: "some", + gitHubClientId: "some" + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.factories.getGitHubAccessToken( + resourceGroupName, + factoryName, + gitHubAccessTokenRequest + ); + console.log(result); +} + +factoriesGetGitHubAccessToken().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/factoriesList.ts b/sdk/datafactory/arm-datafactory/samples-dev/factoriesList.ts new file mode 100644 index 000000000000..884cb07e076b --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/factoriesList.ts @@ -0,0 +1,31 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Lists factories under the specified subscription. + * + * @summary Lists factories under the specified subscription. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Factories_List.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function factoriesList() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.factories.list()) { + resArray.push(item); + } + console.log(resArray); +} + +factoriesList().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/factoriesListByResourceGroup.ts b/sdk/datafactory/arm-datafactory/samples-dev/factoriesListByResourceGroup.ts new file mode 100644 index 000000000000..1acef1bba5cd --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/factoriesListByResourceGroup.ts @@ -0,0 +1,34 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Lists factories. + * + * @summary Lists factories. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Factories_ListByResourceGroup.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function factoriesListByResourceGroup() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.factories.listByResourceGroup( + resourceGroupName + )) { + resArray.push(item); + } + console.log(resArray); +} + +factoriesListByResourceGroup().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/factoriesUpdate.ts b/sdk/datafactory/arm-datafactory/samples-dev/factoriesUpdate.ts new file mode 100644 index 000000000000..9ce5993ac416 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/factoriesUpdate.ts @@ -0,0 +1,40 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Updates a factory. + * + * @summary Updates a factory. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Factories_Update.json + */ +import { + FactoryUpdateParameters, + DataFactoryManagementClient +} from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function factoriesUpdate() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const factoryUpdateParameters: FactoryUpdateParameters = { + tags: { exampleTag: "exampleValue" } + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.factories.update( + resourceGroupName, + factoryName, + factoryUpdateParameters + ); + console.log(result); +} + +factoriesUpdate().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/getAPrivateEndpointConnectionForADatafactory.ts b/sdk/datafactory/arm-datafactory/samples-dev/getAPrivateEndpointConnectionForADatafactory.ts new file mode 100644 index 000000000000..3ef0f5b1a82c --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/getAPrivateEndpointConnectionForADatafactory.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Gets a private endpoint connection + * + * @summary Gets a private endpoint connection + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/GetPrivateEndpointConnection.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function getAPrivateEndpointConnectionForADatafactory() { + const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const privateEndpointConnectionName = "connection"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.privateEndpointConnection.get( + resourceGroupName, + factoryName, + privateEndpointConnectionName + ); + console.log(result); +} + +getAPrivateEndpointConnectionForADatafactory().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/getPrivateLinkResourcesOfASite.ts b/sdk/datafactory/arm-datafactory/samples-dev/getPrivateLinkResourcesOfASite.ts new file mode 100644 index 000000000000..b2ed45469574 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/getPrivateLinkResourcesOfASite.ts @@ -0,0 +1,33 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Gets the private link resources + * + * @summary Gets the private link resources + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/GetPrivateLinkResources.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function getPrivateLinkResourcesOfASite() { + const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.privateLinkResources.get( + resourceGroupName, + factoryName + ); + console.log(result); +} + +getPrivateLinkResourcesOfASite().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimeNodesGet.ts b/sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimeNodesGet.ts new file mode 100644 index 000000000000..6976cd890e55 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimeNodesGet.ts @@ -0,0 +1,37 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Gets a self-hosted integration runtime node. + * + * @summary Gets a self-hosted integration runtime node. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimeNodes_Get.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function integrationRuntimeNodesGet() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const integrationRuntimeName = "exampleIntegrationRuntime"; + const nodeName = "Node_1"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.integrationRuntimeNodes.get( + resourceGroupName, + factoryName, + integrationRuntimeName, + nodeName + ); + console.log(result); +} + +integrationRuntimeNodesGet().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimeNodesGetIPAddress.ts b/sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimeNodesGetIPAddress.ts new file mode 100644 index 000000000000..6efd6178154b --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimeNodesGetIPAddress.ts @@ -0,0 +1,37 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Get the IP address of self-hosted integration runtime node. + * + * @summary Get the IP address of self-hosted integration runtime node. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimeNodes_GetIpAddress.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function integrationRuntimeNodesGetIPAddress() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const integrationRuntimeName = "exampleIntegrationRuntime"; + const nodeName = "Node_1"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.integrationRuntimeNodes.getIpAddress( + resourceGroupName, + factoryName, + integrationRuntimeName, + nodeName + ); + console.log(result); +} + +integrationRuntimeNodesGetIPAddress().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimeNodesUpdate.ts b/sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimeNodesUpdate.ts new file mode 100644 index 000000000000..3a72624cd522 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimeNodesUpdate.ts @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Updates a self-hosted integration runtime node. + * + * @summary Updates a self-hosted integration runtime node. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimeNodes_Update.json + */ +import { + UpdateIntegrationRuntimeNodeRequest, + DataFactoryManagementClient +} from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function integrationRuntimeNodesUpdate() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const integrationRuntimeName = "exampleIntegrationRuntime"; + const nodeName = "Node_1"; + const updateIntegrationRuntimeNodeRequest: UpdateIntegrationRuntimeNodeRequest = { + concurrentJobsLimit: 2 + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.integrationRuntimeNodes.update( + resourceGroupName, + factoryName, + integrationRuntimeName, + nodeName, + updateIntegrationRuntimeNodeRequest + ); + console.log(result); +} + +integrationRuntimeNodesUpdate().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimeObjectMetadataGet.ts b/sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimeObjectMetadataGet.ts new file mode 100644 index 000000000000..530e3c030aca --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimeObjectMetadataGet.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Get a SSIS integration runtime object metadata by specified path. The return is pageable metadata list. + * + * @summary Get a SSIS integration runtime object metadata by specified path. The return is pageable metadata list. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimeObjectMetadata_Get.json + */ +import { + GetSsisObjectMetadataRequest, + DataFactoryManagementClient +} from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function integrationRuntimeObjectMetadataGet() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const integrationRuntimeName = "testactivityv2"; + const getMetadataRequest: GetSsisObjectMetadataRequest = { + metadataPath: "ssisFolders" + }; + const options = { getMetadataRequest: getMetadataRequest }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.integrationRuntimeObjectMetadata.get( + resourceGroupName, + factoryName, + integrationRuntimeName, + options + ); + console.log(result); +} + +integrationRuntimeObjectMetadataGet().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimeObjectMetadataRefresh.ts b/sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimeObjectMetadataRefresh.ts new file mode 100644 index 000000000000..928e241c6ff4 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimeObjectMetadataRefresh.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Refresh a SSIS integration runtime object metadata. + * + * @summary Refresh a SSIS integration runtime object metadata. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimeObjectMetadata_Refresh.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function integrationRuntimeObjectMetadataRefresh() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const integrationRuntimeName = "testactivityv2"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.integrationRuntimeObjectMetadata.beginRefreshAndWait( + resourceGroupName, + factoryName, + integrationRuntimeName + ); + console.log(result); +} + +integrationRuntimeObjectMetadataRefresh().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimesCreate.ts b/sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimesCreate.ts new file mode 100644 index 000000000000..3304cae29725 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimesCreate.ts @@ -0,0 +1,45 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Creates or updates an integration runtime. + * + * @summary Creates or updates an integration runtime. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_Create.json + */ +import { + IntegrationRuntimeResource, + DataFactoryManagementClient +} from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function integrationRuntimesCreate() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const integrationRuntimeName = "exampleIntegrationRuntime"; + const integrationRuntime: IntegrationRuntimeResource = { + properties: { + type: "SelfHosted", + description: "A selfhosted integration runtime" + } + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.integrationRuntimes.createOrUpdate( + resourceGroupName, + factoryName, + integrationRuntimeName, + integrationRuntime + ); + console.log(result); +} + +integrationRuntimesCreate().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimesCreateLinkedIntegrationRuntime.ts b/sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimesCreateLinkedIntegrationRuntime.ts new file mode 100644 index 000000000000..14e8a8ed4306 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimesCreateLinkedIntegrationRuntime.ts @@ -0,0 +1,45 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Create a linked integration runtime entry in a shared integration runtime. + * + * @summary Create a linked integration runtime entry in a shared integration runtime. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_CreateLinkedIntegrationRuntime.json + */ +import { + CreateLinkedIntegrationRuntimeRequest, + DataFactoryManagementClient +} from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function integrationRuntimesCreateLinkedIntegrationRuntime() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const integrationRuntimeName = "exampleIntegrationRuntime"; + const createLinkedIntegrationRuntimeRequest: CreateLinkedIntegrationRuntimeRequest = { + name: "bfa92911-9fb6-4fbe-8f23-beae87bc1c83", + dataFactoryLocation: "West US", + dataFactoryName: "e9955d6d-56ea-4be3-841c-52a12c1a9981", + subscriptionId: "061774c7-4b5a-4159-a55b-365581830283" + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.integrationRuntimes.createLinkedIntegrationRuntime( + resourceGroupName, + factoryName, + integrationRuntimeName, + createLinkedIntegrationRuntimeRequest + ); + console.log(result); +} + +integrationRuntimesCreateLinkedIntegrationRuntime().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimesDelete.ts b/sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimesDelete.ts new file mode 100644 index 000000000000..abcd62f9ef84 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimesDelete.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Deletes an integration runtime. + * + * @summary Deletes an integration runtime. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_Delete.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function integrationRuntimesDelete() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const integrationRuntimeName = "exampleIntegrationRuntime"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.integrationRuntimes.delete( + resourceGroupName, + factoryName, + integrationRuntimeName + ); + console.log(result); +} + +integrationRuntimesDelete().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimesGet.ts b/sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimesGet.ts new file mode 100644 index 000000000000..ed92ad0d2e56 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimesGet.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Gets an integration runtime. + * + * @summary Gets an integration runtime. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_Get.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function integrationRuntimesGet() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const integrationRuntimeName = "exampleIntegrationRuntime"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.integrationRuntimes.get( + resourceGroupName, + factoryName, + integrationRuntimeName + ); + console.log(result); +} + +integrationRuntimesGet().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimesGetConnectionInfo.ts b/sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimesGetConnectionInfo.ts new file mode 100644 index 000000000000..934720d526e8 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimesGetConnectionInfo.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Gets the on-premises integration runtime connection information for encrypting the on-premises data source credentials. + * + * @summary Gets the on-premises integration runtime connection information for encrypting the on-premises data source credentials. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_GetConnectionInfo.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function integrationRuntimesGetConnectionInfo() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const integrationRuntimeName = "exampleIntegrationRuntime"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.integrationRuntimes.getConnectionInfo( + resourceGroupName, + factoryName, + integrationRuntimeName + ); + console.log(result); +} + +integrationRuntimesGetConnectionInfo().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimesGetMonitoringData.ts b/sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimesGetMonitoringData.ts new file mode 100644 index 000000000000..7136d1d11334 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimesGetMonitoringData.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Get the integration runtime monitoring data, which includes the monitor data for all the nodes under this integration runtime. + * + * @summary Get the integration runtime monitoring data, which includes the monitor data for all the nodes under this integration runtime. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_GetMonitoringData.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function integrationRuntimesGetMonitoringData() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const integrationRuntimeName = "exampleIntegrationRuntime"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.integrationRuntimes.getMonitoringData( + resourceGroupName, + factoryName, + integrationRuntimeName + ); + console.log(result); +} + +integrationRuntimesGetMonitoringData().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimesGetStatus.ts b/sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimesGetStatus.ts new file mode 100644 index 000000000000..177ca7074268 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimesGetStatus.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Gets detailed status information for an integration runtime. + * + * @summary Gets detailed status information for an integration runtime. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_GetStatus.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function integrationRuntimesGetStatus() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const integrationRuntimeName = "exampleIntegrationRuntime"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.integrationRuntimes.getStatus( + resourceGroupName, + factoryName, + integrationRuntimeName + ); + console.log(result); +} + +integrationRuntimesGetStatus().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimesListAuthKeys.ts b/sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimesListAuthKeys.ts new file mode 100644 index 000000000000..27882b60be46 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimesListAuthKeys.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Retrieves the authentication keys for an integration runtime. + * + * @summary Retrieves the authentication keys for an integration runtime. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_ListAuthKeys.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function integrationRuntimesListAuthKeys() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const integrationRuntimeName = "exampleIntegrationRuntime"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.integrationRuntimes.listAuthKeys( + resourceGroupName, + factoryName, + integrationRuntimeName + ); + console.log(result); +} + +integrationRuntimesListAuthKeys().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimesListByFactory.ts b/sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimesListByFactory.ts new file mode 100644 index 000000000000..02189b190064 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimesListByFactory.ts @@ -0,0 +1,36 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Lists integration runtimes. + * + * @summary Lists integration runtimes. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_ListByFactory.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function integrationRuntimesListByFactory() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.integrationRuntimes.listByFactory( + resourceGroupName, + factoryName + )) { + resArray.push(item); + } + console.log(resArray); +} + +integrationRuntimesListByFactory().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimesNodesDelete.ts b/sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimesNodesDelete.ts new file mode 100644 index 000000000000..bdb70425ed5b --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimesNodesDelete.ts @@ -0,0 +1,37 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Deletes a self-hosted integration runtime node. + * + * @summary Deletes a self-hosted integration runtime node. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimeNodes_Delete.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function integrationRuntimesNodesDelete() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const integrationRuntimeName = "exampleIntegrationRuntime"; + const nodeName = "Node_1"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.integrationRuntimeNodes.delete( + resourceGroupName, + factoryName, + integrationRuntimeName, + nodeName + ); + console.log(result); +} + +integrationRuntimesNodesDelete().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimesOutboundNetworkDependenciesEndpoints.ts b/sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimesOutboundNetworkDependenciesEndpoints.ts new file mode 100644 index 000000000000..23d407aaccb0 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimesOutboundNetworkDependenciesEndpoints.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Gets the list of outbound network dependencies for a given Azure-SSIS integration runtime. + * + * @summary Gets the list of outbound network dependencies for a given Azure-SSIS integration runtime. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_ListOutboundNetworkDependenciesEndpoints.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function integrationRuntimesOutboundNetworkDependenciesEndpoints() { + const subscriptionId = "7ad7c73b-38b8-4df3-84ee-52ff91092f61"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const integrationRuntimeName = "exampleIntegrationRuntime"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.integrationRuntimes.listOutboundNetworkDependenciesEndpoints( + resourceGroupName, + factoryName, + integrationRuntimeName + ); + console.log(result); +} + +integrationRuntimesOutboundNetworkDependenciesEndpoints().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimesRegenerateAuthKey.ts b/sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimesRegenerateAuthKey.ts new file mode 100644 index 000000000000..71b9a3997684 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimesRegenerateAuthKey.ts @@ -0,0 +1,42 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Regenerates the authentication key for an integration runtime. + * + * @summary Regenerates the authentication key for an integration runtime. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_RegenerateAuthKey.json + */ +import { + IntegrationRuntimeRegenerateKeyParameters, + DataFactoryManagementClient +} from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function integrationRuntimesRegenerateAuthKey() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const integrationRuntimeName = "exampleIntegrationRuntime"; + const regenerateKeyParameters: IntegrationRuntimeRegenerateKeyParameters = { + keyName: "authKey2" + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.integrationRuntimes.regenerateAuthKey( + resourceGroupName, + factoryName, + integrationRuntimeName, + regenerateKeyParameters + ); + console.log(result); +} + +integrationRuntimesRegenerateAuthKey().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimesStart.ts b/sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimesStart.ts new file mode 100644 index 000000000000..a295f9505706 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimesStart.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Starts a ManagedReserved type integration runtime. + * + * @summary Starts a ManagedReserved type integration runtime. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_Start.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function integrationRuntimesStart() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const integrationRuntimeName = "exampleManagedIntegrationRuntime"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.integrationRuntimes.beginStartAndWait( + resourceGroupName, + factoryName, + integrationRuntimeName + ); + console.log(result); +} + +integrationRuntimesStart().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimesStop.ts b/sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimesStop.ts new file mode 100644 index 000000000000..783fc05e8021 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimesStop.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Stops a ManagedReserved type integration runtime. + * + * @summary Stops a ManagedReserved type integration runtime. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_Stop.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function integrationRuntimesStop() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const integrationRuntimeName = "exampleManagedIntegrationRuntime"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.integrationRuntimes.beginStopAndWait( + resourceGroupName, + factoryName, + integrationRuntimeName + ); + console.log(result); +} + +integrationRuntimesStop().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimesSyncCredentials.ts b/sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimesSyncCredentials.ts new file mode 100644 index 000000000000..29dad8ce1dd8 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimesSyncCredentials.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Force the integration runtime to synchronize credentials across integration runtime nodes, and this will override the credentials across all worker nodes with those available on the dispatcher node. If you already have the latest credential backup file, you should manually import it (preferred) on any self-hosted integration runtime node than using this API directly. + * + * @summary Force the integration runtime to synchronize credentials across integration runtime nodes, and this will override the credentials across all worker nodes with those available on the dispatcher node. If you already have the latest credential backup file, you should manually import it (preferred) on any self-hosted integration runtime node than using this API directly. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_SyncCredentials.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function integrationRuntimesSyncCredentials() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const integrationRuntimeName = "exampleIntegrationRuntime"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.integrationRuntimes.syncCredentials( + resourceGroupName, + factoryName, + integrationRuntimeName + ); + console.log(result); +} + +integrationRuntimesSyncCredentials().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimesUpdate.ts b/sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimesUpdate.ts new file mode 100644 index 000000000000..ec6dac37aabf --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimesUpdate.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Updates an integration runtime. + * + * @summary Updates an integration runtime. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_Update.json + */ +import { + UpdateIntegrationRuntimeRequest, + DataFactoryManagementClient +} from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function integrationRuntimesUpdate() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const integrationRuntimeName = "exampleIntegrationRuntime"; + const updateIntegrationRuntimeRequest: UpdateIntegrationRuntimeRequest = { + autoUpdate: "Off", + updateDelayOffset: '"PT3H"' + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.integrationRuntimes.update( + resourceGroupName, + factoryName, + integrationRuntimeName, + updateIntegrationRuntimeRequest + ); + console.log(result); +} + +integrationRuntimesUpdate().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimesUpgrade.ts b/sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimesUpgrade.ts new file mode 100644 index 000000000000..b083284d4ccb --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/integrationRuntimesUpgrade.ts @@ -0,0 +1,42 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Remove all linked integration runtimes under specific data factory in a self-hosted integration runtime. + * + * @summary Remove all linked integration runtimes under specific data factory in a self-hosted integration runtime. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_RemoveLinks.json + */ +import { + LinkedIntegrationRuntimeRequest, + DataFactoryManagementClient +} from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function integrationRuntimesUpgrade() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const integrationRuntimeName = "exampleIntegrationRuntime"; + const linkedIntegrationRuntimeRequest: LinkedIntegrationRuntimeRequest = { + linkedFactoryName: "exampleFactoryName-linked" + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.integrationRuntimes.removeLinks( + resourceGroupName, + factoryName, + integrationRuntimeName, + linkedIntegrationRuntimeRequest + ); + console.log(result); +} + +integrationRuntimesUpgrade().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/linkedServicesCreate.ts b/sdk/datafactory/arm-datafactory/samples-dev/linkedServicesCreate.ts new file mode 100644 index 000000000000..6efed15f2b45 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/linkedServicesCreate.ts @@ -0,0 +1,49 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Creates or updates a linked service. + * + * @summary Creates or updates a linked service. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/LinkedServices_Create.json + */ +import { + LinkedServiceResource, + DataFactoryManagementClient +} from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function linkedServicesCreate() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const linkedServiceName = "exampleLinkedService"; + const linkedService: LinkedServiceResource = { + properties: { + type: "AzureStorage", + connectionString: { + type: "SecureString", + value: + "DefaultEndpointsProtocol=https;AccountName=examplestorageaccount;AccountKey=" + } + } + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.linkedServices.createOrUpdate( + resourceGroupName, + factoryName, + linkedServiceName, + linkedService + ); + console.log(result); +} + +linkedServicesCreate().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/linkedServicesDelete.ts b/sdk/datafactory/arm-datafactory/samples-dev/linkedServicesDelete.ts new file mode 100644 index 000000000000..72e31329b5bb --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/linkedServicesDelete.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Deletes a linked service. + * + * @summary Deletes a linked service. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/LinkedServices_Delete.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function linkedServicesDelete() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const linkedServiceName = "exampleLinkedService"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.linkedServices.delete( + resourceGroupName, + factoryName, + linkedServiceName + ); + console.log(result); +} + +linkedServicesDelete().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/linkedServicesGet.ts b/sdk/datafactory/arm-datafactory/samples-dev/linkedServicesGet.ts new file mode 100644 index 000000000000..2fcec3406e69 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/linkedServicesGet.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Gets a linked service. + * + * @summary Gets a linked service. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/LinkedServices_Get.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function linkedServicesGet() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const linkedServiceName = "exampleLinkedService"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.linkedServices.get( + resourceGroupName, + factoryName, + linkedServiceName + ); + console.log(result); +} + +linkedServicesGet().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/linkedServicesListByFactory.ts b/sdk/datafactory/arm-datafactory/samples-dev/linkedServicesListByFactory.ts new file mode 100644 index 000000000000..a772f2443756 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/linkedServicesListByFactory.ts @@ -0,0 +1,36 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Lists linked services. + * + * @summary Lists linked services. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/LinkedServices_ListByFactory.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function linkedServicesListByFactory() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.linkedServices.listByFactory( + resourceGroupName, + factoryName + )) { + resArray.push(item); + } + console.log(resArray); +} + +linkedServicesListByFactory().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/linkedServicesUpdate.ts b/sdk/datafactory/arm-datafactory/samples-dev/linkedServicesUpdate.ts new file mode 100644 index 000000000000..2a6bedc4719b --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/linkedServicesUpdate.ts @@ -0,0 +1,50 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Creates or updates a linked service. + * + * @summary Creates or updates a linked service. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/LinkedServices_Update.json + */ +import { + LinkedServiceResource, + DataFactoryManagementClient +} from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function linkedServicesUpdate() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const linkedServiceName = "exampleLinkedService"; + const linkedService: LinkedServiceResource = { + properties: { + type: "AzureStorage", + description: "Example description", + connectionString: { + type: "SecureString", + value: + "DefaultEndpointsProtocol=https;AccountName=examplestorageaccount;AccountKey=" + } + } + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.linkedServices.createOrUpdate( + resourceGroupName, + factoryName, + linkedServiceName, + linkedService + ); + console.log(result); +} + +linkedServicesUpdate().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/managedPrivateEndpointsGet.ts b/sdk/datafactory/arm-datafactory/samples-dev/managedPrivateEndpointsGet.ts new file mode 100644 index 000000000000..b13905f9a74c --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/managedPrivateEndpointsGet.ts @@ -0,0 +1,37 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Gets a managed private endpoint. + * + * @summary Gets a managed private endpoint. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ManagedPrivateEndpoints_Get.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function managedPrivateEndpointsGet() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const managedVirtualNetworkName = "exampleManagedVirtualNetworkName"; + const managedPrivateEndpointName = "exampleManagedPrivateEndpointName"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.managedPrivateEndpoints.get( + resourceGroupName, + factoryName, + managedVirtualNetworkName, + managedPrivateEndpointName + ); + console.log(result); +} + +managedPrivateEndpointsGet().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/managedPrivateEndpointsListByFactory.ts b/sdk/datafactory/arm-datafactory/samples-dev/managedPrivateEndpointsListByFactory.ts new file mode 100644 index 000000000000..89a7ebcb1f5f --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/managedPrivateEndpointsListByFactory.ts @@ -0,0 +1,38 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Lists managed private endpoints. + * + * @summary Lists managed private endpoints. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ManagedPrivateEndpoints_ListByFactory.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function managedPrivateEndpointsListByFactory() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const managedVirtualNetworkName = "exampleManagedVirtualNetworkName"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.managedPrivateEndpoints.listByFactory( + resourceGroupName, + factoryName, + managedVirtualNetworkName + )) { + resArray.push(item); + } + console.log(resArray); +} + +managedPrivateEndpointsListByFactory().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/managedVirtualNetworksCreate.ts b/sdk/datafactory/arm-datafactory/samples-dev/managedVirtualNetworksCreate.ts new file mode 100644 index 000000000000..5df96460ef61 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/managedVirtualNetworksCreate.ts @@ -0,0 +1,49 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Creates or updates a managed private endpoint. + * + * @summary Creates or updates a managed private endpoint. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ManagedPrivateEndpoints_Create.json + */ +import { + ManagedPrivateEndpointResource, + DataFactoryManagementClient +} from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function managedVirtualNetworksCreate() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const managedVirtualNetworkName = "exampleManagedVirtualNetworkName"; + const managedPrivateEndpointName = "exampleManagedPrivateEndpointName"; + const managedPrivateEndpoint: ManagedPrivateEndpointResource = { + properties: { + fqdns: [], + groupId: "blob", + privateLinkResourceId: + "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.Storage/storageAccounts/exampleBlobStorage" + } + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.managedPrivateEndpoints.createOrUpdate( + resourceGroupName, + factoryName, + managedVirtualNetworkName, + managedPrivateEndpointName, + managedPrivateEndpoint + ); + console.log(result); +} + +managedVirtualNetworksCreate().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/managedVirtualNetworksDelete.ts b/sdk/datafactory/arm-datafactory/samples-dev/managedVirtualNetworksDelete.ts new file mode 100644 index 000000000000..77f635359ea8 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/managedVirtualNetworksDelete.ts @@ -0,0 +1,37 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Deletes a managed private endpoint. + * + * @summary Deletes a managed private endpoint. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ManagedPrivateEndpoints_Delete.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function managedVirtualNetworksDelete() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const managedVirtualNetworkName = "exampleManagedVirtualNetworkName"; + const managedPrivateEndpointName = "exampleManagedPrivateEndpointName"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.managedPrivateEndpoints.delete( + resourceGroupName, + factoryName, + managedVirtualNetworkName, + managedPrivateEndpointName + ); + console.log(result); +} + +managedVirtualNetworksDelete().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/managedVirtualNetworksGet.ts b/sdk/datafactory/arm-datafactory/samples-dev/managedVirtualNetworksGet.ts new file mode 100644 index 000000000000..255e215b0991 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/managedVirtualNetworksGet.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Gets a managed Virtual Network. + * + * @summary Gets a managed Virtual Network. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ManagedVirtualNetworks_Get.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function managedVirtualNetworksGet() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const managedVirtualNetworkName = "exampleManagedVirtualNetworkName"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.managedVirtualNetworks.get( + resourceGroupName, + factoryName, + managedVirtualNetworkName + ); + console.log(result); +} + +managedVirtualNetworksGet().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/managedVirtualNetworksListByFactory.ts b/sdk/datafactory/arm-datafactory/samples-dev/managedVirtualNetworksListByFactory.ts new file mode 100644 index 000000000000..4a550e8c6011 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/managedVirtualNetworksListByFactory.ts @@ -0,0 +1,36 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Lists managed Virtual Networks. + * + * @summary Lists managed Virtual Networks. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ManagedVirtualNetworks_ListByFactory.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function managedVirtualNetworksListByFactory() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.managedVirtualNetworks.listByFactory( + resourceGroupName, + factoryName + )) { + resArray.push(item); + } + console.log(resArray); +} + +managedVirtualNetworksListByFactory().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/operationsList.ts b/sdk/datafactory/arm-datafactory/samples-dev/operationsList.ts new file mode 100644 index 000000000000..0d4259f2c520 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/operationsList.ts @@ -0,0 +1,31 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Lists the available Azure Data Factory API operations. + * + * @summary Lists the available Azure Data Factory API operations. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Operations_List.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function operationsList() { + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.operations.list()) { + resArray.push(item); + } + console.log(resArray); +} + +operationsList().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/pipelineRunsCancel.ts b/sdk/datafactory/arm-datafactory/samples-dev/pipelineRunsCancel.ts new file mode 100644 index 000000000000..944058bd1904 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/pipelineRunsCancel.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Cancel a pipeline run by its run ID. + * + * @summary Cancel a pipeline run by its run ID. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/PipelineRuns_Cancel.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function pipelineRunsCancel() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const runId = "16ac5348-ff82-4f95-a80d-638c1d47b721"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.pipelineRuns.cancel( + resourceGroupName, + factoryName, + runId + ); + console.log(result); +} + +pipelineRunsCancel().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/pipelineRunsGet.ts b/sdk/datafactory/arm-datafactory/samples-dev/pipelineRunsGet.ts new file mode 100644 index 000000000000..e6e2d80b8f3d --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/pipelineRunsGet.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Get a pipeline run by its run ID. + * + * @summary Get a pipeline run by its run ID. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/PipelineRuns_Get.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function pipelineRunsGet() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const runId = "2f7fdb90-5df1-4b8e-ac2f-064cfa58202b"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.pipelineRuns.get( + resourceGroupName, + factoryName, + runId + ); + console.log(result); +} + +pipelineRunsGet().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/pipelineRunsQueryByFactory.ts b/sdk/datafactory/arm-datafactory/samples-dev/pipelineRunsQueryByFactory.ts new file mode 100644 index 000000000000..fe068725d8c0 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/pipelineRunsQueryByFactory.ts @@ -0,0 +1,48 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Query pipeline runs in the factory based on input filter conditions. + * + * @summary Query pipeline runs in the factory based on input filter conditions. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/PipelineRuns_QueryByFactory.json + */ +import { + RunFilterParameters, + DataFactoryManagementClient +} from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function pipelineRunsQueryByFactory() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const filterParameters: RunFilterParameters = { + filters: [ + { + operand: "PipelineName", + operator: "Equals", + values: ["examplePipeline"] + } + ], + lastUpdatedAfter: new Date("2018-06-16T00:36:44.3345758Z"), + lastUpdatedBefore: new Date("2018-06-16T00:49:48.3686473Z") + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.pipelineRuns.queryByFactory( + resourceGroupName, + factoryName, + filterParameters + ); + console.log(result); +} + +pipelineRunsQueryByFactory().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/pipelinesCreate.ts b/sdk/datafactory/arm-datafactory/samples-dev/pipelinesCreate.ts new file mode 100644 index 000000000000..b3b34894f0fe --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/pipelinesCreate.ts @@ -0,0 +1,90 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Creates or updates a pipeline. + * + * @summary Creates or updates a pipeline. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Pipelines_Create.json + */ +import { + PipelineResource, + DataFactoryManagementClient +} from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function pipelinesCreate() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const pipelineName = "examplePipeline"; + const pipeline: PipelineResource = { + activities: [ + { + name: "ExampleForeachActivity", + type: "ForEach", + activities: [ + { + name: "ExampleCopyActivity", + type: "Copy", + dataIntegrationUnits: 32, + inputs: [ + { + type: "DatasetReference", + parameters: { + myFileName: "examplecontainer.csv", + myFolderPath: "examplecontainer" + }, + referenceName: "exampleDataset" + } + ], + outputs: [ + { + type: "DatasetReference", + parameters: { + myFileName: { type: "Expression", value: "@item()" }, + myFolderPath: "examplecontainer" + }, + referenceName: "exampleDataset" + } + ], + sink: { type: "BlobSink" }, + source: { type: "BlobSource" } + } + ], + isSequential: true, + items: { + type: "Expression", + value: "@pipeline().parameters.OutputBlobNameList" + } + } + ], + parameters: { + jobId: { type: "String" }, + outputBlobNameList: { type: "Array" } + }, + policy: { elapsedTimeMetric: { duration: "0.00:10:00" } }, + runDimensions: { + jobId: { type: "Expression", value: "@pipeline().parameters.JobId" } + }, + variables: { testVariableArray: { type: "Array" } } + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.pipelines.createOrUpdate( + resourceGroupName, + factoryName, + pipelineName, + pipeline + ); + console.log(result); +} + +pipelinesCreate().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/pipelinesCreateRun.ts b/sdk/datafactory/arm-datafactory/samples-dev/pipelinesCreateRun.ts new file mode 100644 index 000000000000..0d58f0646fe5 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/pipelinesCreateRun.ts @@ -0,0 +1,47 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Creates a run of a pipeline. + * + * @summary Creates a run of a pipeline. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Pipelines_CreateRun.json + */ +import { + ParameterValueSpecification, + DataFactoryManagementClient +} from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function pipelinesCreateRun() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const pipelineName = "examplePipeline"; + const referencePipelineRunId = undefined; + const parameters: ParameterValueSpecification = { + outputBlobNameList: ["exampleoutput.csv"] + }; + const options = { + referencePipelineRunId: referencePipelineRunId, + parameters: parameters + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.pipelines.createRun( + resourceGroupName, + factoryName, + pipelineName, + options + ); + console.log(result); +} + +pipelinesCreateRun().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/pipelinesDelete.ts b/sdk/datafactory/arm-datafactory/samples-dev/pipelinesDelete.ts new file mode 100644 index 000000000000..a2152296a29d --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/pipelinesDelete.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Deletes a pipeline. + * + * @summary Deletes a pipeline. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Pipelines_Delete.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function pipelinesDelete() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const pipelineName = "examplePipeline"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.pipelines.delete( + resourceGroupName, + factoryName, + pipelineName + ); + console.log(result); +} + +pipelinesDelete().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/pipelinesGet.ts b/sdk/datafactory/arm-datafactory/samples-dev/pipelinesGet.ts new file mode 100644 index 000000000000..c023210f1e3b --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/pipelinesGet.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Gets a pipeline. + * + * @summary Gets a pipeline. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Pipelines_Get.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function pipelinesGet() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const pipelineName = "examplePipeline"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.pipelines.get( + resourceGroupName, + factoryName, + pipelineName + ); + console.log(result); +} + +pipelinesGet().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/pipelinesListByFactory.ts b/sdk/datafactory/arm-datafactory/samples-dev/pipelinesListByFactory.ts new file mode 100644 index 000000000000..2a322acec4de --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/pipelinesListByFactory.ts @@ -0,0 +1,36 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Lists pipelines. + * + * @summary Lists pipelines. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Pipelines_ListByFactory.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function pipelinesListByFactory() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.pipelines.listByFactory( + resourceGroupName, + factoryName + )) { + resArray.push(item); + } + console.log(resArray); +} + +pipelinesListByFactory().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/pipelinesUpdate.ts b/sdk/datafactory/arm-datafactory/samples-dev/pipelinesUpdate.ts new file mode 100644 index 000000000000..f941123f8e22 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/pipelinesUpdate.ts @@ -0,0 +1,84 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Creates or updates a pipeline. + * + * @summary Creates or updates a pipeline. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Pipelines_Update.json + */ +import { + PipelineResource, + DataFactoryManagementClient +} from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function pipelinesUpdate() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const pipelineName = "examplePipeline"; + const pipeline: PipelineResource = { + description: "Example description", + activities: [ + { + name: "ExampleForeachActivity", + type: "ForEach", + activities: [ + { + name: "ExampleCopyActivity", + type: "Copy", + dataIntegrationUnits: 32, + inputs: [ + { + type: "DatasetReference", + parameters: { + myFileName: "examplecontainer.csv", + myFolderPath: "examplecontainer" + }, + referenceName: "exampleDataset" + } + ], + outputs: [ + { + type: "DatasetReference", + parameters: { + myFileName: { type: "Expression", value: "@item()" }, + myFolderPath: "examplecontainer" + }, + referenceName: "exampleDataset" + } + ], + sink: { type: "BlobSink" }, + source: { type: "BlobSource" } + } + ], + isSequential: true, + items: { + type: "Expression", + value: "@pipeline().parameters.OutputBlobNameList" + } + } + ], + parameters: { outputBlobNameList: { type: "Array" } }, + policy: { elapsedTimeMetric: { duration: "0.00:10:00" } } + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.pipelines.createOrUpdate( + resourceGroupName, + factoryName, + pipelineName, + pipeline + ); + console.log(result); +} + +pipelinesUpdate().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/privateEndPointConnectionsListByFactory.ts b/sdk/datafactory/arm-datafactory/samples-dev/privateEndPointConnectionsListByFactory.ts new file mode 100644 index 000000000000..bfae373cf910 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/privateEndPointConnectionsListByFactory.ts @@ -0,0 +1,36 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Lists Private endpoint connections + * + * @summary Lists Private endpoint connections + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/PrivateEndPointConnections_ListByFactory.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function privateEndPointConnectionsListByFactory() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.privateEndPointConnections.listByFactory( + resourceGroupName, + factoryName + )) { + resArray.push(item); + } + console.log(resArray); +} + +privateEndPointConnectionsListByFactory().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/triggerRunsQueryByFactory.ts b/sdk/datafactory/arm-datafactory/samples-dev/triggerRunsQueryByFactory.ts new file mode 100644 index 000000000000..edd356661e89 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/triggerRunsQueryByFactory.ts @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Query trigger runs. + * + * @summary Query trigger runs. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/TriggerRuns_QueryByFactory.json + */ +import { + RunFilterParameters, + DataFactoryManagementClient +} from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function triggerRunsQueryByFactory() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const filterParameters: RunFilterParameters = { + filters: [ + { operand: "TriggerName", operator: "Equals", values: ["exampleTrigger"] } + ], + lastUpdatedAfter: new Date("2018-06-16T00:36:44.3345758Z"), + lastUpdatedBefore: new Date("2018-06-16T00:49:48.3686473Z") + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.triggerRuns.queryByFactory( + resourceGroupName, + factoryName, + filterParameters + ); + console.log(result); +} + +triggerRunsQueryByFactory().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/triggersCancel.ts b/sdk/datafactory/arm-datafactory/samples-dev/triggersCancel.ts new file mode 100644 index 000000000000..3e86cdd2c132 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/triggersCancel.ts @@ -0,0 +1,37 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Cancel a single trigger instance by runId. + * + * @summary Cancel a single trigger instance by runId. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/TriggerRuns_Cancel.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function triggersCancel() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const triggerName = "exampleTrigger"; + const runId = "2f7fdb90-5df1-4b8e-ac2f-064cfa58202b"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.triggerRuns.cancel( + resourceGroupName, + factoryName, + triggerName, + runId + ); + console.log(result); +} + +triggersCancel().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/triggersCreate.ts b/sdk/datafactory/arm-datafactory/samples-dev/triggersCreate.ts new file mode 100644 index 000000000000..7285d32ec201 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/triggersCreate.ts @@ -0,0 +1,60 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Creates or updates a trigger. + * + * @summary Creates or updates a trigger. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_Create.json + */ +import { + TriggerResource, + DataFactoryManagementClient +} from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function triggersCreate() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const triggerName = "exampleTrigger"; + const trigger: TriggerResource = { + properties: { + type: "ScheduleTrigger", + pipelines: [ + { + parameters: { outputBlobNameList: ["exampleoutput.csv"] }, + pipelineReference: { + type: "PipelineReference", + referenceName: "examplePipeline" + } + } + ], + recurrence: { + endTime: new Date("2018-06-16T00:55:13.8441801Z"), + frequency: "Minute", + interval: 4, + startTime: new Date("2018-06-16T00:39:13.8441801Z"), + timeZone: "UTC" + } + } + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.triggers.createOrUpdate( + resourceGroupName, + factoryName, + triggerName, + trigger + ); + console.log(result); +} + +triggersCreate().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/triggersDelete.ts b/sdk/datafactory/arm-datafactory/samples-dev/triggersDelete.ts new file mode 100644 index 000000000000..b45d1a02f60c --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/triggersDelete.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Deletes a trigger. + * + * @summary Deletes a trigger. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_Delete.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function triggersDelete() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const triggerName = "exampleTrigger"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.triggers.delete( + resourceGroupName, + factoryName, + triggerName + ); + console.log(result); +} + +triggersDelete().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/triggersGet.ts b/sdk/datafactory/arm-datafactory/samples-dev/triggersGet.ts new file mode 100644 index 000000000000..bd136ee515c1 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/triggersGet.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Gets a trigger. + * + * @summary Gets a trigger. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_Get.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function triggersGet() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const triggerName = "exampleTrigger"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.triggers.get( + resourceGroupName, + factoryName, + triggerName + ); + console.log(result); +} + +triggersGet().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/triggersGetEventSubscriptionStatus.ts b/sdk/datafactory/arm-datafactory/samples-dev/triggersGetEventSubscriptionStatus.ts new file mode 100644 index 000000000000..377e1c94f9a3 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/triggersGetEventSubscriptionStatus.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Get a trigger's event subscription status. + * + * @summary Get a trigger's event subscription status. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_GetEventSubscriptionStatus.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function triggersGetEventSubscriptionStatus() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const triggerName = "exampleTrigger"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.triggers.getEventSubscriptionStatus( + resourceGroupName, + factoryName, + triggerName + ); + console.log(result); +} + +triggersGetEventSubscriptionStatus().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/triggersListByFactory.ts b/sdk/datafactory/arm-datafactory/samples-dev/triggersListByFactory.ts new file mode 100644 index 000000000000..01bb10bf056e --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/triggersListByFactory.ts @@ -0,0 +1,36 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Lists triggers. + * + * @summary Lists triggers. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_ListByFactory.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function triggersListByFactory() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.triggers.listByFactory( + resourceGroupName, + factoryName + )) { + resArray.push(item); + } + console.log(resArray); +} + +triggersListByFactory().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/triggersQueryByFactory.ts b/sdk/datafactory/arm-datafactory/samples-dev/triggersQueryByFactory.ts new file mode 100644 index 000000000000..c24ab77c5d57 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/triggersQueryByFactory.ts @@ -0,0 +1,40 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Query triggers. + * + * @summary Query triggers. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_QueryByFactory.json + */ +import { + TriggerFilterParameters, + DataFactoryManagementClient +} from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function triggersQueryByFactory() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const filterParameters: TriggerFilterParameters = { + parentTriggerName: "exampleTrigger" + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.triggers.queryByFactory( + resourceGroupName, + factoryName, + filterParameters + ); + console.log(result); +} + +triggersQueryByFactory().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/triggersRerun.ts b/sdk/datafactory/arm-datafactory/samples-dev/triggersRerun.ts new file mode 100644 index 000000000000..2873de02b6be --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/triggersRerun.ts @@ -0,0 +1,37 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Rerun single trigger instance by runId. + * + * @summary Rerun single trigger instance by runId. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/TriggerRuns_Rerun.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function triggersRerun() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const triggerName = "exampleTrigger"; + const runId = "2f7fdb90-5df1-4b8e-ac2f-064cfa58202b"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.triggerRuns.rerun( + resourceGroupName, + factoryName, + triggerName, + runId + ); + console.log(result); +} + +triggersRerun().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/triggersStart.ts b/sdk/datafactory/arm-datafactory/samples-dev/triggersStart.ts new file mode 100644 index 000000000000..4c09a67caf28 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/triggersStart.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Starts a trigger. + * + * @summary Starts a trigger. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_Start.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function triggersStart() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const triggerName = "exampleTrigger"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.triggers.beginStartAndWait( + resourceGroupName, + factoryName, + triggerName + ); + console.log(result); +} + +triggersStart().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/triggersStop.ts b/sdk/datafactory/arm-datafactory/samples-dev/triggersStop.ts new file mode 100644 index 000000000000..01f43e2c9213 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/triggersStop.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Stops a trigger. + * + * @summary Stops a trigger. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_Stop.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function triggersStop() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const triggerName = "exampleTrigger"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.triggers.beginStopAndWait( + resourceGroupName, + factoryName, + triggerName + ); + console.log(result); +} + +triggersStop().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/triggersSubscribeToEvents.ts b/sdk/datafactory/arm-datafactory/samples-dev/triggersSubscribeToEvents.ts new file mode 100644 index 000000000000..f0fb5ec2eb24 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/triggersSubscribeToEvents.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Subscribe event trigger to events. + * + * @summary Subscribe event trigger to events. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_SubscribeToEvents.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function triggersSubscribeToEvents() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const triggerName = "exampleTrigger"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.triggers.beginSubscribeToEventsAndWait( + resourceGroupName, + factoryName, + triggerName + ); + console.log(result); +} + +triggersSubscribeToEvents().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/triggersUnsubscribeFromEvents.ts b/sdk/datafactory/arm-datafactory/samples-dev/triggersUnsubscribeFromEvents.ts new file mode 100644 index 000000000000..ee8887b78e93 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/triggersUnsubscribeFromEvents.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Unsubscribe event trigger from events. + * + * @summary Unsubscribe event trigger from events. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_UnsubscribeFromEvents.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function triggersUnsubscribeFromEvents() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const triggerName = "exampleTrigger"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.triggers.beginUnsubscribeFromEventsAndWait( + resourceGroupName, + factoryName, + triggerName + ); + console.log(result); +} + +triggersUnsubscribeFromEvents().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples-dev/triggersUpdate.ts b/sdk/datafactory/arm-datafactory/samples-dev/triggersUpdate.ts new file mode 100644 index 000000000000..9ecb809db909 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples-dev/triggersUpdate.ts @@ -0,0 +1,61 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Creates or updates a trigger. + * + * @summary Creates or updates a trigger. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_Update.json + */ +import { + TriggerResource, + DataFactoryManagementClient +} from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function triggersUpdate() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const triggerName = "exampleTrigger"; + const trigger: TriggerResource = { + properties: { + type: "ScheduleTrigger", + description: "Example description", + pipelines: [ + { + parameters: { outputBlobNameList: ["exampleoutput.csv"] }, + pipelineReference: { + type: "PipelineReference", + referenceName: "examplePipeline" + } + } + ], + recurrence: { + endTime: new Date("2018-06-16T00:55:14.905167Z"), + frequency: "Minute", + interval: 4, + startTime: new Date("2018-06-16T00:39:14.905167Z"), + timeZone: "UTC" + } + } + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.triggers.createOrUpdate( + resourceGroupName, + factoryName, + triggerName, + trigger + ); + console.log(result); +} + +triggersUpdate().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/README.md b/sdk/datafactory/arm-datafactory/samples/v10/javascript/README.md new file mode 100644 index 000000000000..918f53c346a9 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/README.md @@ -0,0 +1,228 @@ +# client library samples for JavaScript + +These sample programs show how to use the JavaScript client libraries for in some common scenarios. + +| **File Name** | **Description** | +| --------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| [activityRunsQueryByPipelineRun.js][activityrunsquerybypipelinerun] | Query activity runs based on input filter conditions. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ActivityRuns_QueryByPipelineRun.json | +| [approvesOrRejectsAPrivateEndpointConnectionForAFactory.js][approvesorrejectsaprivateendpointconnectionforafactory] | Approves or rejects a private endpoint connection x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ApproveRejectPrivateEndpointConnection.json | +| [dataFlowDebugSessionAddDataFlow.js][dataflowdebugsessionadddataflow] | Add a data flow into debug session. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/DataFlowDebugSession_AddDataFlow.json | +| [dataFlowDebugSessionCreate.js][dataflowdebugsessioncreate] | Creates a data flow debug session. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/DataFlowDebugSession_Create.json | +| [dataFlowDebugSessionDelete.js][dataflowdebugsessiondelete] | Deletes a data flow debug session. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/DataFlowDebugSession_Delete.json | +| [dataFlowDebugSessionExecuteCommand.js][dataflowdebugsessionexecutecommand] | Execute a data flow debug command. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/DataFlowDebugSession_ExecuteCommand.json | +| [dataFlowDebugSessionQueryByFactory.js][dataflowdebugsessionquerybyfactory] | Query all active data flow debug sessions. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/DataFlowDebugSession_QueryByFactory.json | +| [dataFlowsCreate.js][dataflowscreate] | Creates or updates a data flow. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/DataFlows_Create.json | +| [dataFlowsDelete.js][dataflowsdelete] | Deletes a data flow. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/DataFlows_Delete.json | +| [dataFlowsGet.js][dataflowsget] | Gets a data flow. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/DataFlows_Get.json | +| [dataFlowsListByFactory.js][dataflowslistbyfactory] | Lists data flows. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/DataFlows_ListByFactory.json | +| [dataFlowsUpdate.js][dataflowsupdate] | Creates or updates a data flow. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/DataFlows_Update.json | +| [datasetsCreate.js][datasetscreate] | Creates or updates a dataset. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Datasets_Create.json | +| [datasetsDelete.js][datasetsdelete] | Deletes a dataset. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Datasets_Delete.json | +| [datasetsGet.js][datasetsget] | Gets a dataset. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Datasets_Get.json | +| [datasetsListByFactory.js][datasetslistbyfactory] | Lists datasets. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Datasets_ListByFactory.json | +| [datasetsUpdate.js][datasetsupdate] | Creates or updates a dataset. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Datasets_Update.json | +| [deleteAPrivateEndpointConnectionForADatafactory.js][deleteaprivateendpointconnectionforadatafactory] | Deletes a private endpoint connection x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/DeletePrivateEndpointConnection.json | +| [exposureControlGetFeatureValue.js][exposurecontrolgetfeaturevalue] | Get exposure control feature for specific location. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ExposureControl_GetFeatureValue.json | +| [exposureControlGetFeatureValueByFactory.js][exposurecontrolgetfeaturevaluebyfactory] | Get exposure control feature for specific factory. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ExposureControl_GetFeatureValueByFactory.json | +| [exposureControlQueryFeatureValuesByFactory.js][exposurecontrolqueryfeaturevaluesbyfactory] | Get list of exposure control features for specific factory. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ExposureControl_QueryFeatureValuesByFactory.json | +| [factoriesConfigureFactoryRepo.js][factoriesconfigurefactoryrepo] | Updates a factory's repo information. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Factories_ConfigureFactoryRepo.json | +| [factoriesCreateOrUpdate.js][factoriescreateorupdate] | Creates or updates a factory. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Factories_CreateOrUpdate.json | +| [factoriesDelete.js][factoriesdelete] | Deletes a factory. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Factories_Delete.json | +| [factoriesGet.js][factoriesget] | Gets a factory. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Factories_Get.json | +| [factoriesGetDataPlaneAccess.js][factoriesgetdataplaneaccess] | Get Data Plane access. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Factories_GetDataPlaneAccess.json | +| [factoriesGetGitHubAccessToken.js][factoriesgetgithubaccesstoken] | Get GitHub Access Token. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Factories_GetGitHubAccessToken.json | +| [factoriesList.js][factorieslist] | Lists factories under the specified subscription. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Factories_List.json | +| [factoriesListByResourceGroup.js][factorieslistbyresourcegroup] | Lists factories. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Factories_ListByResourceGroup.json | +| [factoriesUpdate.js][factoriesupdate] | Updates a factory. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Factories_Update.json | +| [getAPrivateEndpointConnectionForADatafactory.js][getaprivateendpointconnectionforadatafactory] | Gets a private endpoint connection x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/GetPrivateEndpointConnection.json | +| [getPrivateLinkResourcesOfASite.js][getprivatelinkresourcesofasite] | Gets the private link resources x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/GetPrivateLinkResources.json | +| [integrationRuntimeNodesGet.js][integrationruntimenodesget] | Gets a self-hosted integration runtime node. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimeNodes_Get.json | +| [integrationRuntimeNodesGetIPAddress.js][integrationruntimenodesgetipaddress] | Get the IP address of self-hosted integration runtime node. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimeNodes_GetIpAddress.json | +| [integrationRuntimeNodesUpdate.js][integrationruntimenodesupdate] | Updates a self-hosted integration runtime node. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimeNodes_Update.json | +| [integrationRuntimeObjectMetadataGet.js][integrationruntimeobjectmetadataget] | Get a SSIS integration runtime object metadata by specified path. The return is pageable metadata list. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimeObjectMetadata_Get.json | +| [integrationRuntimeObjectMetadataRefresh.js][integrationruntimeobjectmetadatarefresh] | Refresh a SSIS integration runtime object metadata. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimeObjectMetadata_Refresh.json | +| [integrationRuntimesCreate.js][integrationruntimescreate] | Creates or updates an integration runtime. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_Create.json | +| [integrationRuntimesCreateLinkedIntegrationRuntime.js][integrationruntimescreatelinkedintegrationruntime] | Create a linked integration runtime entry in a shared integration runtime. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_CreateLinkedIntegrationRuntime.json | +| [integrationRuntimesDelete.js][integrationruntimesdelete] | Deletes an integration runtime. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_Delete.json | +| [integrationRuntimesGet.js][integrationruntimesget] | Gets an integration runtime. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_Get.json | +| [integrationRuntimesGetConnectionInfo.js][integrationruntimesgetconnectioninfo] | Gets the on-premises integration runtime connection information for encrypting the on-premises data source credentials. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_GetConnectionInfo.json | +| [integrationRuntimesGetMonitoringData.js][integrationruntimesgetmonitoringdata] | Get the integration runtime monitoring data, which includes the monitor data for all the nodes under this integration runtime. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_GetMonitoringData.json | +| [integrationRuntimesGetStatus.js][integrationruntimesgetstatus] | Gets detailed status information for an integration runtime. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_GetStatus.json | +| [integrationRuntimesListAuthKeys.js][integrationruntimeslistauthkeys] | Retrieves the authentication keys for an integration runtime. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_ListAuthKeys.json | +| [integrationRuntimesListByFactory.js][integrationruntimeslistbyfactory] | Lists integration runtimes. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_ListByFactory.json | +| [integrationRuntimesNodesDelete.js][integrationruntimesnodesdelete] | Deletes a self-hosted integration runtime node. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimeNodes_Delete.json | +| [integrationRuntimesOutboundNetworkDependenciesEndpoints.js][integrationruntimesoutboundnetworkdependenciesendpoints] | Gets the list of outbound network dependencies for a given Azure-SSIS integration runtime. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_ListOutboundNetworkDependenciesEndpoints.json | +| [integrationRuntimesRegenerateAuthKey.js][integrationruntimesregenerateauthkey] | Regenerates the authentication key for an integration runtime. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_RegenerateAuthKey.json | +| [integrationRuntimesStart.js][integrationruntimesstart] | Starts a ManagedReserved type integration runtime. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_Start.json | +| [integrationRuntimesStop.js][integrationruntimesstop] | Stops a ManagedReserved type integration runtime. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_Stop.json | +| [integrationRuntimesSyncCredentials.js][integrationruntimessynccredentials] | Force the integration runtime to synchronize credentials across integration runtime nodes, and this will override the credentials across all worker nodes with those available on the dispatcher node. If you already have the latest credential backup file, you should manually import it (preferred) on any self-hosted integration runtime node than using this API directly. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_SyncCredentials.json | +| [integrationRuntimesUpdate.js][integrationruntimesupdate] | Updates an integration runtime. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_Update.json | +| [integrationRuntimesUpgrade.js][integrationruntimesupgrade] | Remove all linked integration runtimes under specific data factory in a self-hosted integration runtime. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_RemoveLinks.json | +| [linkedServicesCreate.js][linkedservicescreate] | Creates or updates a linked service. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/LinkedServices_Create.json | +| [linkedServicesDelete.js][linkedservicesdelete] | Deletes a linked service. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/LinkedServices_Delete.json | +| [linkedServicesGet.js][linkedservicesget] | Gets a linked service. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/LinkedServices_Get.json | +| [linkedServicesListByFactory.js][linkedserviceslistbyfactory] | Lists linked services. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/LinkedServices_ListByFactory.json | +| [linkedServicesUpdate.js][linkedservicesupdate] | Creates or updates a linked service. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/LinkedServices_Update.json | +| [managedPrivateEndpointsGet.js][managedprivateendpointsget] | Gets a managed private endpoint. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ManagedPrivateEndpoints_Get.json | +| [managedPrivateEndpointsListByFactory.js][managedprivateendpointslistbyfactory] | Lists managed private endpoints. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ManagedPrivateEndpoints_ListByFactory.json | +| [managedVirtualNetworksCreate.js][managedvirtualnetworkscreate] | Creates or updates a managed private endpoint. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ManagedPrivateEndpoints_Create.json | +| [managedVirtualNetworksDelete.js][managedvirtualnetworksdelete] | Deletes a managed private endpoint. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ManagedPrivateEndpoints_Delete.json | +| [managedVirtualNetworksGet.js][managedvirtualnetworksget] | Gets a managed Virtual Network. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ManagedVirtualNetworks_Get.json | +| [managedVirtualNetworksListByFactory.js][managedvirtualnetworkslistbyfactory] | Lists managed Virtual Networks. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ManagedVirtualNetworks_ListByFactory.json | +| [operationsList.js][operationslist] | Lists the available Azure Data Factory API operations. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Operations_List.json | +| [pipelineRunsCancel.js][pipelinerunscancel] | Cancel a pipeline run by its run ID. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/PipelineRuns_Cancel.json | +| [pipelineRunsGet.js][pipelinerunsget] | Get a pipeline run by its run ID. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/PipelineRuns_Get.json | +| [pipelineRunsQueryByFactory.js][pipelinerunsquerybyfactory] | Query pipeline runs in the factory based on input filter conditions. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/PipelineRuns_QueryByFactory.json | +| [pipelinesCreate.js][pipelinescreate] | Creates or updates a pipeline. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Pipelines_Create.json | +| [pipelinesCreateRun.js][pipelinescreaterun] | Creates a run of a pipeline. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Pipelines_CreateRun.json | +| [pipelinesDelete.js][pipelinesdelete] | Deletes a pipeline. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Pipelines_Delete.json | +| [pipelinesGet.js][pipelinesget] | Gets a pipeline. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Pipelines_Get.json | +| [pipelinesListByFactory.js][pipelineslistbyfactory] | Lists pipelines. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Pipelines_ListByFactory.json | +| [pipelinesUpdate.js][pipelinesupdate] | Creates or updates a pipeline. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Pipelines_Update.json | +| [privateEndPointConnectionsListByFactory.js][privateendpointconnectionslistbyfactory] | Lists Private endpoint connections x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/PrivateEndPointConnections_ListByFactory.json | +| [triggerRunsQueryByFactory.js][triggerrunsquerybyfactory] | Query trigger runs. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/TriggerRuns_QueryByFactory.json | +| [triggersCancel.js][triggerscancel] | Cancel a single trigger instance by runId. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/TriggerRuns_Cancel.json | +| [triggersCreate.js][triggerscreate] | Creates or updates a trigger. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_Create.json | +| [triggersDelete.js][triggersdelete] | Deletes a trigger. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_Delete.json | +| [triggersGet.js][triggersget] | Gets a trigger. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_Get.json | +| [triggersGetEventSubscriptionStatus.js][triggersgeteventsubscriptionstatus] | Get a trigger's event subscription status. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_GetEventSubscriptionStatus.json | +| [triggersListByFactory.js][triggerslistbyfactory] | Lists triggers. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_ListByFactory.json | +| [triggersQueryByFactory.js][triggersquerybyfactory] | Query triggers. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_QueryByFactory.json | +| [triggersRerun.js][triggersrerun] | Rerun single trigger instance by runId. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/TriggerRuns_Rerun.json | +| [triggersStart.js][triggersstart] | Starts a trigger. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_Start.json | +| [triggersStop.js][triggersstop] | Stops a trigger. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_Stop.json | +| [triggersSubscribeToEvents.js][triggerssubscribetoevents] | Subscribe event trigger to events. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_SubscribeToEvents.json | +| [triggersUnsubscribeFromEvents.js][triggersunsubscribefromevents] | Unsubscribe event trigger from events. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_UnsubscribeFromEvents.json | +| [triggersUpdate.js][triggersupdate] | Creates or updates a trigger. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_Update.json | + +## Prerequisites + +The sample programs are compatible with [LTS versions of Node.js](https://nodejs.org/about/releases/). + +You need [an Azure subscription][freesub] to run these sample programs. + +Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. + +Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. + +## Setup + +To run the samples using the published version of the package: + +1. Install the dependencies using `npm`: + +```bash +npm install +``` + +2. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. + +3. Run whichever samples you like (note that some samples may require additional setup, see the table above): + +```bash +node activityRunsQueryByPipelineRun.js +``` + +Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): + +```bash +npx cross-env node activityRunsQueryByPipelineRun.js +``` + +## Next Steps + +Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. + +[activityrunsquerybypipelinerun]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/activityRunsQueryByPipelineRun.js +[approvesorrejectsaprivateendpointconnectionforafactory]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/approvesOrRejectsAPrivateEndpointConnectionForAFactory.js +[dataflowdebugsessionadddataflow]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/dataFlowDebugSessionAddDataFlow.js +[dataflowdebugsessioncreate]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/dataFlowDebugSessionCreate.js +[dataflowdebugsessiondelete]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/dataFlowDebugSessionDelete.js +[dataflowdebugsessionexecutecommand]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/dataFlowDebugSessionExecuteCommand.js +[dataflowdebugsessionquerybyfactory]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/dataFlowDebugSessionQueryByFactory.js +[dataflowscreate]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/dataFlowsCreate.js +[dataflowsdelete]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/dataFlowsDelete.js +[dataflowsget]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/dataFlowsGet.js +[dataflowslistbyfactory]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/dataFlowsListByFactory.js +[dataflowsupdate]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/dataFlowsUpdate.js +[datasetscreate]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/datasetsCreate.js +[datasetsdelete]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/datasetsDelete.js +[datasetsget]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/datasetsGet.js +[datasetslistbyfactory]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/datasetsListByFactory.js +[datasetsupdate]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/datasetsUpdate.js +[deleteaprivateendpointconnectionforadatafactory]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/deleteAPrivateEndpointConnectionForADatafactory.js +[exposurecontrolgetfeaturevalue]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/exposureControlGetFeatureValue.js +[exposurecontrolgetfeaturevaluebyfactory]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/exposureControlGetFeatureValueByFactory.js +[exposurecontrolqueryfeaturevaluesbyfactory]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/exposureControlQueryFeatureValuesByFactory.js +[factoriesconfigurefactoryrepo]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/factoriesConfigureFactoryRepo.js +[factoriescreateorupdate]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/factoriesCreateOrUpdate.js +[factoriesdelete]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/factoriesDelete.js +[factoriesget]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/factoriesGet.js +[factoriesgetdataplaneaccess]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/factoriesGetDataPlaneAccess.js +[factoriesgetgithubaccesstoken]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/factoriesGetGitHubAccessToken.js +[factorieslist]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/factoriesList.js +[factorieslistbyresourcegroup]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/factoriesListByResourceGroup.js +[factoriesupdate]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/factoriesUpdate.js +[getaprivateendpointconnectionforadatafactory]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/getAPrivateEndpointConnectionForADatafactory.js +[getprivatelinkresourcesofasite]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/getPrivateLinkResourcesOfASite.js +[integrationruntimenodesget]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimeNodesGet.js +[integrationruntimenodesgetipaddress]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimeNodesGetIPAddress.js +[integrationruntimenodesupdate]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimeNodesUpdate.js +[integrationruntimeobjectmetadataget]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimeObjectMetadataGet.js +[integrationruntimeobjectmetadatarefresh]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimeObjectMetadataRefresh.js +[integrationruntimescreate]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesCreate.js +[integrationruntimescreatelinkedintegrationruntime]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesCreateLinkedIntegrationRuntime.js +[integrationruntimesdelete]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesDelete.js +[integrationruntimesget]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesGet.js +[integrationruntimesgetconnectioninfo]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesGetConnectionInfo.js +[integrationruntimesgetmonitoringdata]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesGetMonitoringData.js +[integrationruntimesgetstatus]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesGetStatus.js +[integrationruntimeslistauthkeys]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesListAuthKeys.js +[integrationruntimeslistbyfactory]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesListByFactory.js +[integrationruntimesnodesdelete]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesNodesDelete.js +[integrationruntimesoutboundnetworkdependenciesendpoints]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesOutboundNetworkDependenciesEndpoints.js +[integrationruntimesregenerateauthkey]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesRegenerateAuthKey.js +[integrationruntimesstart]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesStart.js +[integrationruntimesstop]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesStop.js +[integrationruntimessynccredentials]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesSyncCredentials.js +[integrationruntimesupdate]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesUpdate.js +[integrationruntimesupgrade]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesUpgrade.js +[linkedservicescreate]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/linkedServicesCreate.js +[linkedservicesdelete]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/linkedServicesDelete.js +[linkedservicesget]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/linkedServicesGet.js +[linkedserviceslistbyfactory]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/linkedServicesListByFactory.js +[linkedservicesupdate]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/linkedServicesUpdate.js +[managedprivateendpointsget]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/managedPrivateEndpointsGet.js +[managedprivateendpointslistbyfactory]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/managedPrivateEndpointsListByFactory.js +[managedvirtualnetworkscreate]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/managedVirtualNetworksCreate.js +[managedvirtualnetworksdelete]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/managedVirtualNetworksDelete.js +[managedvirtualnetworksget]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/managedVirtualNetworksGet.js +[managedvirtualnetworkslistbyfactory]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/managedVirtualNetworksListByFactory.js +[operationslist]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/operationsList.js +[pipelinerunscancel]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/pipelineRunsCancel.js +[pipelinerunsget]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/pipelineRunsGet.js +[pipelinerunsquerybyfactory]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/pipelineRunsQueryByFactory.js +[pipelinescreate]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/pipelinesCreate.js +[pipelinescreaterun]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/pipelinesCreateRun.js +[pipelinesdelete]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/pipelinesDelete.js +[pipelinesget]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/pipelinesGet.js +[pipelineslistbyfactory]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/pipelinesListByFactory.js +[pipelinesupdate]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/pipelinesUpdate.js +[privateendpointconnectionslistbyfactory]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/privateEndPointConnectionsListByFactory.js +[triggerrunsquerybyfactory]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/triggerRunsQueryByFactory.js +[triggerscancel]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/triggersCancel.js +[triggerscreate]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/triggersCreate.js +[triggersdelete]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/triggersDelete.js +[triggersget]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/triggersGet.js +[triggersgeteventsubscriptionstatus]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/triggersGetEventSubscriptionStatus.js +[triggerslistbyfactory]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/triggersListByFactory.js +[triggersquerybyfactory]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/triggersQueryByFactory.js +[triggersrerun]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/triggersRerun.js +[triggersstart]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/triggersStart.js +[triggersstop]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/triggersStop.js +[triggerssubscribetoevents]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/triggersSubscribeToEvents.js +[triggersunsubscribefromevents]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/triggersUnsubscribeFromEvents.js +[triggersupdate]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/javascript/triggersUpdate.js +[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-datafactory?view=azure-node-preview +[freesub]: https://azure.microsoft.com/free/ +[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/datafactory/arm-datafactory/README.md diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/activityRunsQueryByPipelineRun.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/activityRunsQueryByPipelineRun.js new file mode 100644 index 000000000000..85a6d72d4e22 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/activityRunsQueryByPipelineRun.js @@ -0,0 +1,40 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Query activity runs based on input filter conditions. + * + * @summary Query activity runs based on input filter conditions. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ActivityRuns_QueryByPipelineRun.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function activityRunsQueryByPipelineRun() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const runId = "2f7fdb90-5df1-4b8e-ac2f-064cfa58202b"; + const filterParameters = { + lastUpdatedAfter: new Date("2018-06-16T00:36:44.3345758Z"), + lastUpdatedBefore: new Date("2018-06-16T00:49:48.3686473Z"), + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.activityRuns.queryByPipelineRun( + resourceGroupName, + factoryName, + runId, + filterParameters + ); + console.log(result); +} + +activityRunsQueryByPipelineRun().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/approvesOrRejectsAPrivateEndpointConnectionForAFactory.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/approvesOrRejectsAPrivateEndpointConnectionForAFactory.js new file mode 100644 index 000000000000..cdc8fe8b0ef0 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/approvesOrRejectsAPrivateEndpointConnectionForAFactory.js @@ -0,0 +1,45 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Approves or rejects a private endpoint connection + * + * @summary Approves or rejects a private endpoint connection + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ApproveRejectPrivateEndpointConnection.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function approvesOrRejectsAPrivateEndpointConnectionForAFactory() { + const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const privateEndpointConnectionName = "connection"; + const privateEndpointWrapper = { + properties: { + privateLinkServiceConnectionState: { + description: "Approved by admin.", + actionsRequired: "", + status: "Approved", + }, + }, + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.privateEndpointConnection.createOrUpdate( + resourceGroupName, + factoryName, + privateEndpointConnectionName, + privateEndpointWrapper + ); + console.log(result); +} + +approvesOrRejectsAPrivateEndpointConnectionForAFactory().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/dataFlowDebugSessionAddDataFlow.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/dataFlowDebugSessionAddDataFlow.js new file mode 100644 index 000000000000..8c229ae1f50f --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/dataFlowDebugSessionAddDataFlow.js @@ -0,0 +1,99 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Add a data flow into debug session. + * + * @summary Add a data flow into debug session. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/DataFlowDebugSession_AddDataFlow.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function dataFlowDebugSessionAddDataFlow() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const request = { + dataFlow: { + name: "dataflow1", + properties: { + type: "MappingDataFlow", + script: + "\n\nsource(output(\n Column_1 as string\n ),\n allowSchemaDrift: true,\n validateSchema: false) ~> source1", + sinks: [], + sources: [ + { + name: "source1", + dataset: { + type: "DatasetReference", + referenceName: "DelimitedText2", + }, + }, + ], + transformations: [], + }, + }, + datasets: [ + { + name: "dataset1", + properties: { + type: "DelimitedText", + schema: [{ type: "String" }], + annotations: [], + columnDelimiter: ",", + escapeChar: "\\", + firstRowAsHeader: true, + linkedServiceName: { + type: "LinkedServiceReference", + referenceName: "linkedService5", + }, + location: { + type: "AzureBlobStorageLocation", + container: "dataflow-sample-data", + fileName: "Ansiencoding.csv", + }, + quoteChar: '"', + }, + }, + ], + debugSettings: { + datasetParameters: { Movies: { path: "abc" }, Output: { time: "def" } }, + parameters: { sourcePath: "Toy" }, + sourceSettings: [ + { rowLimit: 1000, sourceName: "source1" }, + { rowLimit: 222, sourceName: "source2" }, + ], + }, + linkedServices: [ + { + name: "linkedService1", + properties: { + type: "AzureBlobStorage", + annotations: [], + connectionString: + "DefaultEndpointsProtocol=https;AccountName=;EndpointSuffix=core.windows.net;", + encryptedCredential: "", + }, + }, + ], + sessionId: "f06ed247-9d07-49b2-b05e-2cb4a2fc871e", + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.dataFlowDebugSession.addDataFlow( + resourceGroupName, + factoryName, + request + ); + console.log(result); +} + +dataFlowDebugSessionAddDataFlow().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/dataFlowDebugSessionCreate.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/dataFlowDebugSessionCreate.js new file mode 100644 index 000000000000..2400769c6893 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/dataFlowDebugSessionCreate.js @@ -0,0 +1,51 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Creates a data flow debug session. + * + * @summary Creates a data flow debug session. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/DataFlowDebugSession_Create.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function dataFlowDebugSessionCreate() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const request = { + integrationRuntime: { + name: "ir1", + properties: { + type: "Managed", + computeProperties: { + dataFlowProperties: { + computeType: "General", + coreCount: 48, + timeToLive: 10, + }, + location: "AutoResolve", + }, + }, + }, + timeToLive: 60, + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.dataFlowDebugSession.beginCreateAndWait( + resourceGroupName, + factoryName, + request + ); + console.log(result); +} + +dataFlowDebugSessionCreate().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/dataFlowDebugSessionDelete.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/dataFlowDebugSessionDelete.js new file mode 100644 index 000000000000..cf52303669b4 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/dataFlowDebugSessionDelete.js @@ -0,0 +1,33 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Deletes a data flow debug session. + * + * @summary Deletes a data flow debug session. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/DataFlowDebugSession_Delete.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function dataFlowDebugSessionDelete() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const request = { + sessionId: "91fb57e0-8292-47be-89ff-c8f2d2bb2a7e", + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.dataFlowDebugSession.delete(resourceGroupName, factoryName, request); + console.log(result); +} + +dataFlowDebugSessionDelete().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/dataFlowDebugSessionExecuteCommand.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/dataFlowDebugSessionExecuteCommand.js new file mode 100644 index 000000000000..fb09018cf9c1 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/dataFlowDebugSessionExecuteCommand.js @@ -0,0 +1,39 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Execute a data flow debug command. + * + * @summary Execute a data flow debug command. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/DataFlowDebugSession_ExecuteCommand.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function dataFlowDebugSessionExecuteCommand() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const request = { + command: "executePreviewQuery", + commandPayload: { rowLimits: 100, streamName: "source1" }, + sessionId: "f06ed247-9d07-49b2-b05e-2cb4a2fc871e", + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.dataFlowDebugSession.beginExecuteCommandAndWait( + resourceGroupName, + factoryName, + request + ); + console.log(result); +} + +dataFlowDebugSessionExecuteCommand().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/dataFlowDebugSessionQueryByFactory.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/dataFlowDebugSessionQueryByFactory.js new file mode 100644 index 000000000000..05e3b9758000 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/dataFlowDebugSessionQueryByFactory.js @@ -0,0 +1,36 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Query all active data flow debug sessions. + * + * @summary Query all active data flow debug sessions. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/DataFlowDebugSession_QueryByFactory.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function dataFlowDebugSessionQueryByFactory() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.dataFlowDebugSession.listQueryByFactory( + resourceGroupName, + factoryName + )) { + resArray.push(item); + } + console.log(resArray); +} + +dataFlowDebugSessionQueryByFactory().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/dataFlowsCreate.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/dataFlowsCreate.js new file mode 100644 index 000000000000..32e249e107ac --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/dataFlowsCreate.js @@ -0,0 +1,71 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Creates or updates a data flow. + * + * @summary Creates or updates a data flow. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/DataFlows_Create.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function dataFlowsCreate() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const dataFlowName = "exampleDataFlow"; + const dataFlow = { + properties: { + type: "MappingDataFlow", + description: + "Sample demo data flow to convert currencies showing usage of union, derive and conditional split transformation.", + script: + "source(output(PreviousConversionRate as double,Country as string,DateTime1 as string,CurrentConversionRate as double),allowSchemaDrift: false,validateSchema: false) ~> USDCurrency\nsource(output(PreviousConversionRate as double,Country as string,DateTime1 as string,CurrentConversionRate as double),allowSchemaDrift: true,validateSchema: false) ~> CADSource\nUSDCurrency, CADSource union(byName: true)~> Union\nUnion derive(NewCurrencyRate = round(CurrentConversionRate*1.25)) ~> NewCurrencyColumn\nNewCurrencyColumn split(Country == 'USD',Country == 'CAD',disjoint: false) ~> ConditionalSplit1@(USD, CAD)\nConditionalSplit1@USD sink(saveMode:'overwrite' ) ~> USDSink\nConditionalSplit1@CAD sink(saveMode:'overwrite' ) ~> CADSink", + sinks: [ + { + name: "USDSink", + dataset: { type: "DatasetReference", referenceName: "USDOutput" }, + }, + { + name: "CADSink", + dataset: { type: "DatasetReference", referenceName: "CADOutput" }, + }, + ], + sources: [ + { + name: "USDCurrency", + dataset: { + type: "DatasetReference", + referenceName: "CurrencyDatasetUSD", + }, + }, + { + name: "CADSource", + dataset: { + type: "DatasetReference", + referenceName: "CurrencyDatasetCAD", + }, + }, + ], + }, + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.dataFlows.createOrUpdate( + resourceGroupName, + factoryName, + dataFlowName, + dataFlow + ); + console.log(result); +} + +dataFlowsCreate().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/dataFlowsDelete.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/dataFlowsDelete.js new file mode 100644 index 000000000000..da766e95887f --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/dataFlowsDelete.js @@ -0,0 +1,31 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Deletes a data flow. + * + * @summary Deletes a data flow. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/DataFlows_Delete.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function dataFlowsDelete() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const dataFlowName = "exampleDataFlow"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.dataFlows.delete(resourceGroupName, factoryName, dataFlowName); + console.log(result); +} + +dataFlowsDelete().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/dataFlowsGet.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/dataFlowsGet.js new file mode 100644 index 000000000000..e72273c66581 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/dataFlowsGet.js @@ -0,0 +1,31 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Gets a data flow. + * + * @summary Gets a data flow. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/DataFlows_Get.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function dataFlowsGet() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const dataFlowName = "exampleDataFlow"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.dataFlows.get(resourceGroupName, factoryName, dataFlowName); + console.log(result); +} + +dataFlowsGet().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/dataFlowsListByFactory.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/dataFlowsListByFactory.js new file mode 100644 index 000000000000..8e0b62ae49ab --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/dataFlowsListByFactory.js @@ -0,0 +1,33 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Lists data flows. + * + * @summary Lists data flows. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/DataFlows_ListByFactory.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function dataFlowsListByFactory() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.dataFlows.listByFactory(resourceGroupName, factoryName)) { + resArray.push(item); + } + console.log(resArray); +} + +dataFlowsListByFactory().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/dataFlowsUpdate.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/dataFlowsUpdate.js new file mode 100644 index 000000000000..7e5264191cc2 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/dataFlowsUpdate.js @@ -0,0 +1,71 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Creates or updates a data flow. + * + * @summary Creates or updates a data flow. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/DataFlows_Update.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function dataFlowsUpdate() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const dataFlowName = "exampleDataFlow"; + const dataFlow = { + properties: { + type: "MappingDataFlow", + description: + "Sample demo data flow to convert currencies showing usage of union, derive and conditional split transformation.", + script: + "source(output(PreviousConversionRate as double,Country as string,DateTime1 as string,CurrentConversionRate as double),allowSchemaDrift: false,validateSchema: false) ~> USDCurrency\nsource(output(PreviousConversionRate as double,Country as string,DateTime1 as string,CurrentConversionRate as double),allowSchemaDrift: true,validateSchema: false) ~> CADSource\nUSDCurrency, CADSource union(byName: true)~> Union\nUnion derive(NewCurrencyRate = round(CurrentConversionRate*1.25)) ~> NewCurrencyColumn\nNewCurrencyColumn split(Country == 'USD',Country == 'CAD',disjoint: false) ~> ConditionalSplit1@(USD, CAD)\nConditionalSplit1@USD sink(saveMode:'overwrite' ) ~> USDSink\nConditionalSplit1@CAD sink(saveMode:'overwrite' ) ~> CADSink", + sinks: [ + { + name: "USDSink", + dataset: { type: "DatasetReference", referenceName: "USDOutput" }, + }, + { + name: "CADSink", + dataset: { type: "DatasetReference", referenceName: "CADOutput" }, + }, + ], + sources: [ + { + name: "USDCurrency", + dataset: { + type: "DatasetReference", + referenceName: "CurrencyDatasetUSD", + }, + }, + { + name: "CADSource", + dataset: { + type: "DatasetReference", + referenceName: "CurrencyDatasetCAD", + }, + }, + ], + }, + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.dataFlows.createOrUpdate( + resourceGroupName, + factoryName, + dataFlowName, + dataFlow + ); + console.log(result); +} + +dataFlowsUpdate().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/datasetsCreate.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/datasetsCreate.js new file mode 100644 index 000000000000..b8b54a23e24d --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/datasetsCreate.js @@ -0,0 +1,52 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Creates or updates a dataset. + * + * @summary Creates or updates a dataset. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Datasets_Create.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function datasetsCreate() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const datasetName = "exampleDataset"; + const dataset = { + properties: { + type: "AzureBlob", + format: { type: "TextFormat" }, + fileName: { type: "Expression", value: "@dataset().MyFileName" }, + folderPath: { type: "Expression", value: "@dataset().MyFolderPath" }, + linkedServiceName: { + type: "LinkedServiceReference", + referenceName: "exampleLinkedService", + }, + parameters: { + myFileName: { type: "String" }, + myFolderPath: { type: "String" }, + }, + }, + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.datasets.createOrUpdate( + resourceGroupName, + factoryName, + datasetName, + dataset + ); + console.log(result); +} + +datasetsCreate().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/datasetsDelete.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/datasetsDelete.js new file mode 100644 index 000000000000..bd4e0f71e589 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/datasetsDelete.js @@ -0,0 +1,31 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Deletes a dataset. + * + * @summary Deletes a dataset. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Datasets_Delete.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function datasetsDelete() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const datasetName = "exampleDataset"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.datasets.delete(resourceGroupName, factoryName, datasetName); + console.log(result); +} + +datasetsDelete().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/datasetsGet.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/datasetsGet.js new file mode 100644 index 000000000000..f3b3354c0c2f --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/datasetsGet.js @@ -0,0 +1,31 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Gets a dataset. + * + * @summary Gets a dataset. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Datasets_Get.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function datasetsGet() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const datasetName = "exampleDataset"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.datasets.get(resourceGroupName, factoryName, datasetName); + console.log(result); +} + +datasetsGet().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/datasetsListByFactory.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/datasetsListByFactory.js new file mode 100644 index 000000000000..6ed14417dcf8 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/datasetsListByFactory.js @@ -0,0 +1,33 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Lists datasets. + * + * @summary Lists datasets. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Datasets_ListByFactory.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function datasetsListByFactory() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.datasets.listByFactory(resourceGroupName, factoryName)) { + resArray.push(item); + } + console.log(resArray); +} + +datasetsListByFactory().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/datasetsUpdate.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/datasetsUpdate.js new file mode 100644 index 000000000000..a0ac6e3bd174 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/datasetsUpdate.js @@ -0,0 +1,53 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Creates or updates a dataset. + * + * @summary Creates or updates a dataset. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Datasets_Update.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function datasetsUpdate() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const datasetName = "exampleDataset"; + const dataset = { + properties: { + type: "AzureBlob", + format: { type: "TextFormat" }, + description: "Example description", + fileName: { type: "Expression", value: "@dataset().MyFileName" }, + folderPath: { type: "Expression", value: "@dataset().MyFolderPath" }, + linkedServiceName: { + type: "LinkedServiceReference", + referenceName: "exampleLinkedService", + }, + parameters: { + myFileName: { type: "String" }, + myFolderPath: { type: "String" }, + }, + }, + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.datasets.createOrUpdate( + resourceGroupName, + factoryName, + datasetName, + dataset + ); + console.log(result); +} + +datasetsUpdate().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/deleteAPrivateEndpointConnectionForADatafactory.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/deleteAPrivateEndpointConnectionForADatafactory.js new file mode 100644 index 000000000000..7d692ced40c6 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/deleteAPrivateEndpointConnectionForADatafactory.js @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Deletes a private endpoint connection + * + * @summary Deletes a private endpoint connection + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/DeletePrivateEndpointConnection.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function deleteAPrivateEndpointConnectionForADatafactory() { + const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const privateEndpointConnectionName = "connection"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.privateEndpointConnection.delete( + resourceGroupName, + factoryName, + privateEndpointConnectionName + ); + console.log(result); +} + +deleteAPrivateEndpointConnectionForADatafactory().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/exposureControlGetFeatureValue.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/exposureControlGetFeatureValue.js new file mode 100644 index 000000000000..76f5b236bdf6 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/exposureControlGetFeatureValue.js @@ -0,0 +1,33 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Get exposure control feature for specific location. + * + * @summary Get exposure control feature for specific location. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ExposureControl_GetFeatureValue.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function exposureControlGetFeatureValue() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const locationId = "WestEurope"; + const exposureControlRequest = { + featureName: "ADFIntegrationRuntimeSharingRbac", + featureType: "Feature", + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.exposureControl.getFeatureValue(locationId, exposureControlRequest); + console.log(result); +} + +exposureControlGetFeatureValue().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/exposureControlGetFeatureValueByFactory.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/exposureControlGetFeatureValueByFactory.js new file mode 100644 index 000000000000..2348b3498788 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/exposureControlGetFeatureValueByFactory.js @@ -0,0 +1,38 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Get exposure control feature for specific factory. + * + * @summary Get exposure control feature for specific factory. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ExposureControl_GetFeatureValueByFactory.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function exposureControlGetFeatureValueByFactory() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const exposureControlRequest = { + featureName: "ADFIntegrationRuntimeSharingRbac", + featureType: "Feature", + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.exposureControl.getFeatureValueByFactory( + resourceGroupName, + factoryName, + exposureControlRequest + ); + console.log(result); +} + +exposureControlGetFeatureValueByFactory().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/exposureControlQueryFeatureValuesByFactory.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/exposureControlQueryFeatureValuesByFactory.js new file mode 100644 index 000000000000..565caa476a7f --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/exposureControlQueryFeatureValuesByFactory.js @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Get list of exposure control features for specific factory. + * + * @summary Get list of exposure control features for specific factory. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ExposureControl_QueryFeatureValuesByFactory.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function exposureControlQueryFeatureValuesByFactory() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const exposureControlBatchRequest = { + exposureControlRequests: [ + { + featureName: "ADFIntegrationRuntimeSharingRbac", + featureType: "Feature", + }, + { featureName: "ADFSampleFeature", featureType: "Feature" }, + ], + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.exposureControl.queryFeatureValuesByFactory( + resourceGroupName, + factoryName, + exposureControlBatchRequest + ); + console.log(result); +} + +exposureControlQueryFeatureValuesByFactory().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/factoriesConfigureFactoryRepo.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/factoriesConfigureFactoryRepo.js new file mode 100644 index 000000000000..4c501e22491a --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/factoriesConfigureFactoryRepo.js @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Updates a factory's repo information. + * + * @summary Updates a factory's repo information. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Factories_ConfigureFactoryRepo.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function factoriesConfigureFactoryRepo() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const locationId = "East US"; + const factoryRepoUpdate = { + factoryResourceId: + "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName", + repoConfiguration: { + type: "FactoryVSTSConfiguration", + accountName: "ADF", + collaborationBranch: "master", + lastCommitId: "", + projectName: "project", + repositoryName: "repo", + rootFolder: "/", + tenantId: "", + }, + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.factories.configureFactoryRepo(locationId, factoryRepoUpdate); + console.log(result); +} + +factoriesConfigureFactoryRepo().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/factoriesCreateOrUpdate.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/factoriesCreateOrUpdate.js new file mode 100644 index 000000000000..5cfb0e391fc7 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/factoriesCreateOrUpdate.js @@ -0,0 +1,31 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Creates or updates a factory. + * + * @summary Creates or updates a factory. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Factories_CreateOrUpdate.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function factoriesCreateOrUpdate() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const factory = { location: "East US" }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.factories.createOrUpdate(resourceGroupName, factoryName, factory); + console.log(result); +} + +factoriesCreateOrUpdate().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/factoriesDelete.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/factoriesDelete.js new file mode 100644 index 000000000000..f7e46aac4692 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/factoriesDelete.js @@ -0,0 +1,30 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Deletes a factory. + * + * @summary Deletes a factory. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Factories_Delete.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function factoriesDelete() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.factories.delete(resourceGroupName, factoryName); + console.log(result); +} + +factoriesDelete().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/factoriesGet.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/factoriesGet.js new file mode 100644 index 000000000000..9f093d342900 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/factoriesGet.js @@ -0,0 +1,30 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Gets a factory. + * + * @summary Gets a factory. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Factories_Get.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function factoriesGet() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.factories.get(resourceGroupName, factoryName); + console.log(result); +} + +factoriesGet().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/factoriesGetDataPlaneAccess.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/factoriesGetDataPlaneAccess.js new file mode 100644 index 000000000000..bab5e1824a4b --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/factoriesGetDataPlaneAccess.js @@ -0,0 +1,37 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Get Data Plane access. + * + * @summary Get Data Plane access. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Factories_GetDataPlaneAccess.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function factoriesGetDataPlaneAccess() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const policy = { + accessResourcePath: "", + expireTime: "2018-11-10T09:46:20.2659347Z", + permissions: "r", + profileName: "DefaultProfile", + startTime: "2018-11-10T02:46:20.2659347Z", + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.factories.getDataPlaneAccess(resourceGroupName, factoryName, policy); + console.log(result); +} + +factoriesGetDataPlaneAccess().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/factoriesGetGitHubAccessToken.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/factoriesGetGitHubAccessToken.js new file mode 100644 index 000000000000..ade10b8fe9aa --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/factoriesGetGitHubAccessToken.js @@ -0,0 +1,39 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Get GitHub Access Token. + * + * @summary Get GitHub Access Token. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Factories_GetGitHubAccessToken.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function factoriesGetGitHubAccessToken() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const gitHubAccessTokenRequest = { + gitHubAccessCode: "some", + gitHubAccessTokenBaseUrl: "some", + gitHubClientId: "some", + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.factories.getGitHubAccessToken( + resourceGroupName, + factoryName, + gitHubAccessTokenRequest + ); + console.log(result); +} + +factoriesGetGitHubAccessToken().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/factoriesList.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/factoriesList.js new file mode 100644 index 000000000000..8020cedd43e4 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/factoriesList.js @@ -0,0 +1,31 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Lists factories under the specified subscription. + * + * @summary Lists factories under the specified subscription. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Factories_List.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function factoriesList() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.factories.list()) { + resArray.push(item); + } + console.log(resArray); +} + +factoriesList().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/factoriesListByResourceGroup.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/factoriesListByResourceGroup.js new file mode 100644 index 000000000000..6074a7bdd257 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/factoriesListByResourceGroup.js @@ -0,0 +1,32 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Lists factories. + * + * @summary Lists factories. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Factories_ListByResourceGroup.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function factoriesListByResourceGroup() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.factories.listByResourceGroup(resourceGroupName)) { + resArray.push(item); + } + console.log(resArray); +} + +factoriesListByResourceGroup().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/factoriesUpdate.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/factoriesUpdate.js new file mode 100644 index 000000000000..91574e103c24 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/factoriesUpdate.js @@ -0,0 +1,37 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Updates a factory. + * + * @summary Updates a factory. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Factories_Update.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function factoriesUpdate() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const factoryUpdateParameters = { + tags: { exampleTag: "exampleValue" }, + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.factories.update( + resourceGroupName, + factoryName, + factoryUpdateParameters + ); + console.log(result); +} + +factoriesUpdate().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/getAPrivateEndpointConnectionForADatafactory.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/getAPrivateEndpointConnectionForADatafactory.js new file mode 100644 index 000000000000..b7ed6ca23c6b --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/getAPrivateEndpointConnectionForADatafactory.js @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Gets a private endpoint connection + * + * @summary Gets a private endpoint connection + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/GetPrivateEndpointConnection.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function getAPrivateEndpointConnectionForADatafactory() { + const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const privateEndpointConnectionName = "connection"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.privateEndpointConnection.get( + resourceGroupName, + factoryName, + privateEndpointConnectionName + ); + console.log(result); +} + +getAPrivateEndpointConnectionForADatafactory().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/getPrivateLinkResourcesOfASite.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/getPrivateLinkResourcesOfASite.js new file mode 100644 index 000000000000..a6a9082c172e --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/getPrivateLinkResourcesOfASite.js @@ -0,0 +1,30 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Gets the private link resources + * + * @summary Gets the private link resources + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/GetPrivateLinkResources.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function getPrivateLinkResourcesOfASite() { + const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.privateLinkResources.get(resourceGroupName, factoryName); + console.log(result); +} + +getPrivateLinkResourcesOfASite().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimeNodesGet.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimeNodesGet.js new file mode 100644 index 000000000000..7e5c4bfd793f --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimeNodesGet.js @@ -0,0 +1,37 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Gets a self-hosted integration runtime node. + * + * @summary Gets a self-hosted integration runtime node. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimeNodes_Get.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function integrationRuntimeNodesGet() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const integrationRuntimeName = "exampleIntegrationRuntime"; + const nodeName = "Node_1"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.integrationRuntimeNodes.get( + resourceGroupName, + factoryName, + integrationRuntimeName, + nodeName + ); + console.log(result); +} + +integrationRuntimeNodesGet().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimeNodesGetIPAddress.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimeNodesGetIPAddress.js new file mode 100644 index 000000000000..7b890fb3429c --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimeNodesGetIPAddress.js @@ -0,0 +1,37 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Get the IP address of self-hosted integration runtime node. + * + * @summary Get the IP address of self-hosted integration runtime node. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimeNodes_GetIpAddress.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function integrationRuntimeNodesGetIPAddress() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const integrationRuntimeName = "exampleIntegrationRuntime"; + const nodeName = "Node_1"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.integrationRuntimeNodes.getIpAddress( + resourceGroupName, + factoryName, + integrationRuntimeName, + nodeName + ); + console.log(result); +} + +integrationRuntimeNodesGetIPAddress().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimeNodesUpdate.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimeNodesUpdate.js new file mode 100644 index 000000000000..914732b7f0df --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimeNodesUpdate.js @@ -0,0 +1,41 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Updates a self-hosted integration runtime node. + * + * @summary Updates a self-hosted integration runtime node. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimeNodes_Update.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function integrationRuntimeNodesUpdate() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const integrationRuntimeName = "exampleIntegrationRuntime"; + const nodeName = "Node_1"; + const updateIntegrationRuntimeNodeRequest = { + concurrentJobsLimit: 2, + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.integrationRuntimeNodes.update( + resourceGroupName, + factoryName, + integrationRuntimeName, + nodeName, + updateIntegrationRuntimeNodeRequest + ); + console.log(result); +} + +integrationRuntimeNodesUpdate().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimeObjectMetadataGet.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimeObjectMetadataGet.js new file mode 100644 index 000000000000..96bc5b5ec087 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimeObjectMetadataGet.js @@ -0,0 +1,40 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Get a SSIS integration runtime object metadata by specified path. The return is pageable metadata list. + * + * @summary Get a SSIS integration runtime object metadata by specified path. The return is pageable metadata list. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimeObjectMetadata_Get.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function integrationRuntimeObjectMetadataGet() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const integrationRuntimeName = "testactivityv2"; + const getMetadataRequest = { + metadataPath: "ssisFolders", + }; + const options = { getMetadataRequest: getMetadataRequest }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.integrationRuntimeObjectMetadata.get( + resourceGroupName, + factoryName, + integrationRuntimeName, + options + ); + console.log(result); +} + +integrationRuntimeObjectMetadataGet().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimeObjectMetadataRefresh.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimeObjectMetadataRefresh.js new file mode 100644 index 000000000000..3f631db4fac1 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimeObjectMetadataRefresh.js @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Refresh a SSIS integration runtime object metadata. + * + * @summary Refresh a SSIS integration runtime object metadata. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimeObjectMetadata_Refresh.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function integrationRuntimeObjectMetadataRefresh() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const integrationRuntimeName = "testactivityv2"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.integrationRuntimeObjectMetadata.beginRefreshAndWait( + resourceGroupName, + factoryName, + integrationRuntimeName + ); + console.log(result); +} + +integrationRuntimeObjectMetadataRefresh().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesCreate.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesCreate.js new file mode 100644 index 000000000000..33b1cf6a27bb --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesCreate.js @@ -0,0 +1,42 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Creates or updates an integration runtime. + * + * @summary Creates or updates an integration runtime. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_Create.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function integrationRuntimesCreate() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const integrationRuntimeName = "exampleIntegrationRuntime"; + const integrationRuntime = { + properties: { + type: "SelfHosted", + description: "A selfhosted integration runtime", + }, + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.integrationRuntimes.createOrUpdate( + resourceGroupName, + factoryName, + integrationRuntimeName, + integrationRuntime + ); + console.log(result); +} + +integrationRuntimesCreate().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesCreateLinkedIntegrationRuntime.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesCreateLinkedIntegrationRuntime.js new file mode 100644 index 000000000000..84ed05938906 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesCreateLinkedIntegrationRuntime.js @@ -0,0 +1,42 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Create a linked integration runtime entry in a shared integration runtime. + * + * @summary Create a linked integration runtime entry in a shared integration runtime. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_CreateLinkedIntegrationRuntime.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function integrationRuntimesCreateLinkedIntegrationRuntime() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const integrationRuntimeName = "exampleIntegrationRuntime"; + const createLinkedIntegrationRuntimeRequest = { + name: "bfa92911-9fb6-4fbe-8f23-beae87bc1c83", + dataFactoryLocation: "West US", + dataFactoryName: "e9955d6d-56ea-4be3-841c-52a12c1a9981", + subscriptionId: "061774c7-4b5a-4159-a55b-365581830283", + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.integrationRuntimes.createLinkedIntegrationRuntime( + resourceGroupName, + factoryName, + integrationRuntimeName, + createLinkedIntegrationRuntimeRequest + ); + console.log(result); +} + +integrationRuntimesCreateLinkedIntegrationRuntime().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesDelete.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesDelete.js new file mode 100644 index 000000000000..6d3b670af556 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesDelete.js @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Deletes an integration runtime. + * + * @summary Deletes an integration runtime. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_Delete.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function integrationRuntimesDelete() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const integrationRuntimeName = "exampleIntegrationRuntime"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.integrationRuntimes.delete( + resourceGroupName, + factoryName, + integrationRuntimeName + ); + console.log(result); +} + +integrationRuntimesDelete().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesGet.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesGet.js new file mode 100644 index 000000000000..f14e7eeeb55d --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesGet.js @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Gets an integration runtime. + * + * @summary Gets an integration runtime. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_Get.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function integrationRuntimesGet() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const integrationRuntimeName = "exampleIntegrationRuntime"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.integrationRuntimes.get( + resourceGroupName, + factoryName, + integrationRuntimeName + ); + console.log(result); +} + +integrationRuntimesGet().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesGetConnectionInfo.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesGetConnectionInfo.js new file mode 100644 index 000000000000..a4247534d0b7 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesGetConnectionInfo.js @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Gets the on-premises integration runtime connection information for encrypting the on-premises data source credentials. + * + * @summary Gets the on-premises integration runtime connection information for encrypting the on-premises data source credentials. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_GetConnectionInfo.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function integrationRuntimesGetConnectionInfo() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const integrationRuntimeName = "exampleIntegrationRuntime"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.integrationRuntimes.getConnectionInfo( + resourceGroupName, + factoryName, + integrationRuntimeName + ); + console.log(result); +} + +integrationRuntimesGetConnectionInfo().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesGetMonitoringData.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesGetMonitoringData.js new file mode 100644 index 000000000000..6b6b1bc5447f --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesGetMonitoringData.js @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Get the integration runtime monitoring data, which includes the monitor data for all the nodes under this integration runtime. + * + * @summary Get the integration runtime monitoring data, which includes the monitor data for all the nodes under this integration runtime. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_GetMonitoringData.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function integrationRuntimesGetMonitoringData() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const integrationRuntimeName = "exampleIntegrationRuntime"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.integrationRuntimes.getMonitoringData( + resourceGroupName, + factoryName, + integrationRuntimeName + ); + console.log(result); +} + +integrationRuntimesGetMonitoringData().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesGetStatus.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesGetStatus.js new file mode 100644 index 000000000000..9ae36969b559 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesGetStatus.js @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Gets detailed status information for an integration runtime. + * + * @summary Gets detailed status information for an integration runtime. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_GetStatus.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function integrationRuntimesGetStatus() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const integrationRuntimeName = "exampleIntegrationRuntime"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.integrationRuntimes.getStatus( + resourceGroupName, + factoryName, + integrationRuntimeName + ); + console.log(result); +} + +integrationRuntimesGetStatus().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesListAuthKeys.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesListAuthKeys.js new file mode 100644 index 000000000000..63876da2e553 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesListAuthKeys.js @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Retrieves the authentication keys for an integration runtime. + * + * @summary Retrieves the authentication keys for an integration runtime. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_ListAuthKeys.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function integrationRuntimesListAuthKeys() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const integrationRuntimeName = "exampleIntegrationRuntime"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.integrationRuntimes.listAuthKeys( + resourceGroupName, + factoryName, + integrationRuntimeName + ); + console.log(result); +} + +integrationRuntimesListAuthKeys().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesListByFactory.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesListByFactory.js new file mode 100644 index 000000000000..add0269b663a --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesListByFactory.js @@ -0,0 +1,33 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Lists integration runtimes. + * + * @summary Lists integration runtimes. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_ListByFactory.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function integrationRuntimesListByFactory() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.integrationRuntimes.listByFactory(resourceGroupName, factoryName)) { + resArray.push(item); + } + console.log(resArray); +} + +integrationRuntimesListByFactory().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesNodesDelete.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesNodesDelete.js new file mode 100644 index 000000000000..046d3c6e7cfb --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesNodesDelete.js @@ -0,0 +1,37 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Deletes a self-hosted integration runtime node. + * + * @summary Deletes a self-hosted integration runtime node. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimeNodes_Delete.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function integrationRuntimesNodesDelete() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const integrationRuntimeName = "exampleIntegrationRuntime"; + const nodeName = "Node_1"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.integrationRuntimeNodes.delete( + resourceGroupName, + factoryName, + integrationRuntimeName, + nodeName + ); + console.log(result); +} + +integrationRuntimesNodesDelete().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesOutboundNetworkDependenciesEndpoints.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesOutboundNetworkDependenciesEndpoints.js new file mode 100644 index 000000000000..cd3beb041f19 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesOutboundNetworkDependenciesEndpoints.js @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Gets the list of outbound network dependencies for a given Azure-SSIS integration runtime. + * + * @summary Gets the list of outbound network dependencies for a given Azure-SSIS integration runtime. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_ListOutboundNetworkDependenciesEndpoints.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function integrationRuntimesOutboundNetworkDependenciesEndpoints() { + const subscriptionId = "7ad7c73b-38b8-4df3-84ee-52ff91092f61"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const integrationRuntimeName = "exampleIntegrationRuntime"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.integrationRuntimes.listOutboundNetworkDependenciesEndpoints( + resourceGroupName, + factoryName, + integrationRuntimeName + ); + console.log(result); +} + +integrationRuntimesOutboundNetworkDependenciesEndpoints().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesRegenerateAuthKey.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesRegenerateAuthKey.js new file mode 100644 index 000000000000..3a0df9e6fcfe --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesRegenerateAuthKey.js @@ -0,0 +1,39 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Regenerates the authentication key for an integration runtime. + * + * @summary Regenerates the authentication key for an integration runtime. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_RegenerateAuthKey.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function integrationRuntimesRegenerateAuthKey() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const integrationRuntimeName = "exampleIntegrationRuntime"; + const regenerateKeyParameters = { + keyName: "authKey2", + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.integrationRuntimes.regenerateAuthKey( + resourceGroupName, + factoryName, + integrationRuntimeName, + regenerateKeyParameters + ); + console.log(result); +} + +integrationRuntimesRegenerateAuthKey().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesStart.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesStart.js new file mode 100644 index 000000000000..586adc82d532 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesStart.js @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Starts a ManagedReserved type integration runtime. + * + * @summary Starts a ManagedReserved type integration runtime. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_Start.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function integrationRuntimesStart() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const integrationRuntimeName = "exampleManagedIntegrationRuntime"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.integrationRuntimes.beginStartAndWait( + resourceGroupName, + factoryName, + integrationRuntimeName + ); + console.log(result); +} + +integrationRuntimesStart().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesStop.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesStop.js new file mode 100644 index 000000000000..a7587e7663ce --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesStop.js @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Stops a ManagedReserved type integration runtime. + * + * @summary Stops a ManagedReserved type integration runtime. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_Stop.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function integrationRuntimesStop() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const integrationRuntimeName = "exampleManagedIntegrationRuntime"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.integrationRuntimes.beginStopAndWait( + resourceGroupName, + factoryName, + integrationRuntimeName + ); + console.log(result); +} + +integrationRuntimesStop().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesSyncCredentials.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesSyncCredentials.js new file mode 100644 index 000000000000..64076de41322 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesSyncCredentials.js @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Force the integration runtime to synchronize credentials across integration runtime nodes, and this will override the credentials across all worker nodes with those available on the dispatcher node. If you already have the latest credential backup file, you should manually import it (preferred) on any self-hosted integration runtime node than using this API directly. + * + * @summary Force the integration runtime to synchronize credentials across integration runtime nodes, and this will override the credentials across all worker nodes with those available on the dispatcher node. If you already have the latest credential backup file, you should manually import it (preferred) on any self-hosted integration runtime node than using this API directly. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_SyncCredentials.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function integrationRuntimesSyncCredentials() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const integrationRuntimeName = "exampleIntegrationRuntime"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.integrationRuntimes.syncCredentials( + resourceGroupName, + factoryName, + integrationRuntimeName + ); + console.log(result); +} + +integrationRuntimesSyncCredentials().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesUpdate.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesUpdate.js new file mode 100644 index 000000000000..b64c518935d1 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesUpdate.js @@ -0,0 +1,40 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Updates an integration runtime. + * + * @summary Updates an integration runtime. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_Update.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function integrationRuntimesUpdate() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const integrationRuntimeName = "exampleIntegrationRuntime"; + const updateIntegrationRuntimeRequest = { + autoUpdate: "Off", + updateDelayOffset: '"PT3H"', + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.integrationRuntimes.update( + resourceGroupName, + factoryName, + integrationRuntimeName, + updateIntegrationRuntimeRequest + ); + console.log(result); +} + +integrationRuntimesUpdate().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesUpgrade.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesUpgrade.js new file mode 100644 index 000000000000..98cc16021e1f --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/integrationRuntimesUpgrade.js @@ -0,0 +1,39 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Remove all linked integration runtimes under specific data factory in a self-hosted integration runtime. + * + * @summary Remove all linked integration runtimes under specific data factory in a self-hosted integration runtime. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_RemoveLinks.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function integrationRuntimesUpgrade() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const integrationRuntimeName = "exampleIntegrationRuntime"; + const linkedIntegrationRuntimeRequest = { + linkedFactoryName: "exampleFactoryName-linked", + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.integrationRuntimes.removeLinks( + resourceGroupName, + factoryName, + integrationRuntimeName, + linkedIntegrationRuntimeRequest + ); + console.log(result); +} + +integrationRuntimesUpgrade().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/linkedServicesCreate.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/linkedServicesCreate.js new file mode 100644 index 000000000000..b26a6c96dddf --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/linkedServicesCreate.js @@ -0,0 +1,46 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Creates or updates a linked service. + * + * @summary Creates or updates a linked service. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/LinkedServices_Create.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function linkedServicesCreate() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const linkedServiceName = "exampleLinkedService"; + const linkedService = { + properties: { + type: "AzureStorage", + connectionString: { + type: "SecureString", + value: + "DefaultEndpointsProtocol=https;AccountName=examplestorageaccount;AccountKey=", + }, + }, + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.linkedServices.createOrUpdate( + resourceGroupName, + factoryName, + linkedServiceName, + linkedService + ); + console.log(result); +} + +linkedServicesCreate().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/linkedServicesDelete.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/linkedServicesDelete.js new file mode 100644 index 000000000000..6ceae078cdf5 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/linkedServicesDelete.js @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Deletes a linked service. + * + * @summary Deletes a linked service. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/LinkedServices_Delete.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function linkedServicesDelete() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const linkedServiceName = "exampleLinkedService"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.linkedServices.delete( + resourceGroupName, + factoryName, + linkedServiceName + ); + console.log(result); +} + +linkedServicesDelete().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/linkedServicesGet.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/linkedServicesGet.js new file mode 100644 index 000000000000..beb6f53504c9 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/linkedServicesGet.js @@ -0,0 +1,31 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Gets a linked service. + * + * @summary Gets a linked service. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/LinkedServices_Get.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function linkedServicesGet() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const linkedServiceName = "exampleLinkedService"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.linkedServices.get(resourceGroupName, factoryName, linkedServiceName); + console.log(result); +} + +linkedServicesGet().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/linkedServicesListByFactory.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/linkedServicesListByFactory.js new file mode 100644 index 000000000000..e25c44b98c64 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/linkedServicesListByFactory.js @@ -0,0 +1,33 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Lists linked services. + * + * @summary Lists linked services. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/LinkedServices_ListByFactory.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function linkedServicesListByFactory() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.linkedServices.listByFactory(resourceGroupName, factoryName)) { + resArray.push(item); + } + console.log(resArray); +} + +linkedServicesListByFactory().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/linkedServicesUpdate.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/linkedServicesUpdate.js new file mode 100644 index 000000000000..b7f0f9c70589 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/linkedServicesUpdate.js @@ -0,0 +1,47 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Creates or updates a linked service. + * + * @summary Creates or updates a linked service. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/LinkedServices_Update.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function linkedServicesUpdate() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const linkedServiceName = "exampleLinkedService"; + const linkedService = { + properties: { + type: "AzureStorage", + description: "Example description", + connectionString: { + type: "SecureString", + value: + "DefaultEndpointsProtocol=https;AccountName=examplestorageaccount;AccountKey=", + }, + }, + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.linkedServices.createOrUpdate( + resourceGroupName, + factoryName, + linkedServiceName, + linkedService + ); + console.log(result); +} + +linkedServicesUpdate().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/managedPrivateEndpointsGet.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/managedPrivateEndpointsGet.js new file mode 100644 index 000000000000..ed25213a1f7c --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/managedPrivateEndpointsGet.js @@ -0,0 +1,37 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Gets a managed private endpoint. + * + * @summary Gets a managed private endpoint. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ManagedPrivateEndpoints_Get.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function managedPrivateEndpointsGet() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const managedVirtualNetworkName = "exampleManagedVirtualNetworkName"; + const managedPrivateEndpointName = "exampleManagedPrivateEndpointName"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.managedPrivateEndpoints.get( + resourceGroupName, + factoryName, + managedVirtualNetworkName, + managedPrivateEndpointName + ); + console.log(result); +} + +managedPrivateEndpointsGet().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/managedPrivateEndpointsListByFactory.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/managedPrivateEndpointsListByFactory.js new file mode 100644 index 000000000000..e404509fcb6b --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/managedPrivateEndpointsListByFactory.js @@ -0,0 +1,38 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Lists managed private endpoints. + * + * @summary Lists managed private endpoints. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ManagedPrivateEndpoints_ListByFactory.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function managedPrivateEndpointsListByFactory() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const managedVirtualNetworkName = "exampleManagedVirtualNetworkName"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.managedPrivateEndpoints.listByFactory( + resourceGroupName, + factoryName, + managedVirtualNetworkName + )) { + resArray.push(item); + } + console.log(resArray); +} + +managedPrivateEndpointsListByFactory().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/managedVirtualNetworksCreate.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/managedVirtualNetworksCreate.js new file mode 100644 index 000000000000..f94f8272e24d --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/managedVirtualNetworksCreate.js @@ -0,0 +1,46 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Creates or updates a managed private endpoint. + * + * @summary Creates or updates a managed private endpoint. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ManagedPrivateEndpoints_Create.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function managedVirtualNetworksCreate() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const managedVirtualNetworkName = "exampleManagedVirtualNetworkName"; + const managedPrivateEndpointName = "exampleManagedPrivateEndpointName"; + const managedPrivateEndpoint = { + properties: { + fqdns: [], + groupId: "blob", + privateLinkResourceId: + "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.Storage/storageAccounts/exampleBlobStorage", + }, + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.managedPrivateEndpoints.createOrUpdate( + resourceGroupName, + factoryName, + managedVirtualNetworkName, + managedPrivateEndpointName, + managedPrivateEndpoint + ); + console.log(result); +} + +managedVirtualNetworksCreate().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/managedVirtualNetworksDelete.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/managedVirtualNetworksDelete.js new file mode 100644 index 000000000000..f98dd696e338 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/managedVirtualNetworksDelete.js @@ -0,0 +1,37 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Deletes a managed private endpoint. + * + * @summary Deletes a managed private endpoint. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ManagedPrivateEndpoints_Delete.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function managedVirtualNetworksDelete() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const managedVirtualNetworkName = "exampleManagedVirtualNetworkName"; + const managedPrivateEndpointName = "exampleManagedPrivateEndpointName"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.managedPrivateEndpoints.delete( + resourceGroupName, + factoryName, + managedVirtualNetworkName, + managedPrivateEndpointName + ); + console.log(result); +} + +managedVirtualNetworksDelete().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/managedVirtualNetworksGet.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/managedVirtualNetworksGet.js new file mode 100644 index 000000000000..f968a80defda --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/managedVirtualNetworksGet.js @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Gets a managed Virtual Network. + * + * @summary Gets a managed Virtual Network. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ManagedVirtualNetworks_Get.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function managedVirtualNetworksGet() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const managedVirtualNetworkName = "exampleManagedVirtualNetworkName"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.managedVirtualNetworks.get( + resourceGroupName, + factoryName, + managedVirtualNetworkName + ); + console.log(result); +} + +managedVirtualNetworksGet().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/managedVirtualNetworksListByFactory.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/managedVirtualNetworksListByFactory.js new file mode 100644 index 000000000000..e53a45db122e --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/managedVirtualNetworksListByFactory.js @@ -0,0 +1,36 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Lists managed Virtual Networks. + * + * @summary Lists managed Virtual Networks. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ManagedVirtualNetworks_ListByFactory.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function managedVirtualNetworksListByFactory() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.managedVirtualNetworks.listByFactory( + resourceGroupName, + factoryName + )) { + resArray.push(item); + } + console.log(resArray); +} + +managedVirtualNetworksListByFactory().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/operationsList.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/operationsList.js new file mode 100644 index 000000000000..8fb5b5102d3e --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/operationsList.js @@ -0,0 +1,31 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Lists the available Azure Data Factory API operations. + * + * @summary Lists the available Azure Data Factory API operations. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Operations_List.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function operationsList() { + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.operations.list()) { + resArray.push(item); + } + console.log(resArray); +} + +operationsList().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/package.json b/sdk/datafactory/arm-datafactory/samples/v10/javascript/package.json new file mode 100644 index 000000000000..2383742a5aa3 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/package.json @@ -0,0 +1,32 @@ +{ + "name": "azure-arm-datafactory-samples-js", + "private": true, + "version": "1.0.0", + "description": " client library samples for JavaScript", + "engines": { + "node": ">=12.0.0" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/Azure/azure-sdk-for-js.git", + "directory": "sdk/datafactory/arm-datafactory" + }, + "keywords": [ + "node", + "azure", + "typescript", + "browser", + "isomorphic" + ], + "author": "Microsoft Corporation", + "license": "MIT", + "bugs": { + "url": "https://github.com/Azure/azure-sdk-for-js/issues" + }, + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/datafactory/arm-datafactory", + "dependencies": { + "@azure/arm-datafactory": "latest", + "dotenv": "latest", + "@azure/identity": "^2.0.1" + } +} diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/pipelineRunsCancel.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/pipelineRunsCancel.js new file mode 100644 index 000000000000..c57a240fd8cf --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/pipelineRunsCancel.js @@ -0,0 +1,31 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Cancel a pipeline run by its run ID. + * + * @summary Cancel a pipeline run by its run ID. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/PipelineRuns_Cancel.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function pipelineRunsCancel() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const runId = "16ac5348-ff82-4f95-a80d-638c1d47b721"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.pipelineRuns.cancel(resourceGroupName, factoryName, runId); + console.log(result); +} + +pipelineRunsCancel().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/pipelineRunsGet.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/pipelineRunsGet.js new file mode 100644 index 000000000000..0d1fd6e1a477 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/pipelineRunsGet.js @@ -0,0 +1,31 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Get a pipeline run by its run ID. + * + * @summary Get a pipeline run by its run ID. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/PipelineRuns_Get.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function pipelineRunsGet() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const runId = "2f7fdb90-5df1-4b8e-ac2f-064cfa58202b"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.pipelineRuns.get(resourceGroupName, factoryName, runId); + console.log(result); +} + +pipelineRunsGet().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/pipelineRunsQueryByFactory.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/pipelineRunsQueryByFactory.js new file mode 100644 index 000000000000..fcc1e1803eec --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/pipelineRunsQueryByFactory.js @@ -0,0 +1,45 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Query pipeline runs in the factory based on input filter conditions. + * + * @summary Query pipeline runs in the factory based on input filter conditions. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/PipelineRuns_QueryByFactory.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function pipelineRunsQueryByFactory() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const filterParameters = { + filters: [ + { + operand: "PipelineName", + operator: "Equals", + values: ["examplePipeline"], + }, + ], + lastUpdatedAfter: new Date("2018-06-16T00:36:44.3345758Z"), + lastUpdatedBefore: new Date("2018-06-16T00:49:48.3686473Z"), + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.pipelineRuns.queryByFactory( + resourceGroupName, + factoryName, + filterParameters + ); + console.log(result); +} + +pipelineRunsQueryByFactory().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/pipelinesCreate.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/pipelinesCreate.js new file mode 100644 index 000000000000..f3a887a36eca --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/pipelinesCreate.js @@ -0,0 +1,87 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Creates or updates a pipeline. + * + * @summary Creates or updates a pipeline. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Pipelines_Create.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function pipelinesCreate() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const pipelineName = "examplePipeline"; + const pipeline = { + activities: [ + { + name: "ExampleForeachActivity", + type: "ForEach", + activities: [ + { + name: "ExampleCopyActivity", + type: "Copy", + dataIntegrationUnits: 32, + inputs: [ + { + type: "DatasetReference", + parameters: { + myFileName: "examplecontainer.csv", + myFolderPath: "examplecontainer", + }, + referenceName: "exampleDataset", + }, + ], + outputs: [ + { + type: "DatasetReference", + parameters: { + myFileName: { type: "Expression", value: "@item()" }, + myFolderPath: "examplecontainer", + }, + referenceName: "exampleDataset", + }, + ], + sink: { type: "BlobSink" }, + source: { type: "BlobSource" }, + }, + ], + isSequential: true, + items: { + type: "Expression", + value: "@pipeline().parameters.OutputBlobNameList", + }, + }, + ], + parameters: { + jobId: { type: "String" }, + outputBlobNameList: { type: "Array" }, + }, + policy: { elapsedTimeMetric: { duration: "0.00:10:00" } }, + runDimensions: { + jobId: { type: "Expression", value: "@pipeline().parameters.JobId" }, + }, + variables: { testVariableArray: { type: "Array" } }, + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.pipelines.createOrUpdate( + resourceGroupName, + factoryName, + pipelineName, + pipeline + ); + console.log(result); +} + +pipelinesCreate().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/pipelinesCreateRun.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/pipelinesCreateRun.js new file mode 100644 index 000000000000..2c24f7cba1ac --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/pipelinesCreateRun.js @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Creates a run of a pipeline. + * + * @summary Creates a run of a pipeline. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Pipelines_CreateRun.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function pipelinesCreateRun() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const pipelineName = "examplePipeline"; + const referencePipelineRunId = undefined; + const parameters = { + outputBlobNameList: ["exampleoutput.csv"], + }; + const options = { + referencePipelineRunId: referencePipelineRunId, + parameters: parameters, + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.pipelines.createRun( + resourceGroupName, + factoryName, + pipelineName, + options + ); + console.log(result); +} + +pipelinesCreateRun().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/pipelinesDelete.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/pipelinesDelete.js new file mode 100644 index 000000000000..cbd781c514a7 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/pipelinesDelete.js @@ -0,0 +1,31 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Deletes a pipeline. + * + * @summary Deletes a pipeline. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Pipelines_Delete.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function pipelinesDelete() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const pipelineName = "examplePipeline"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.pipelines.delete(resourceGroupName, factoryName, pipelineName); + console.log(result); +} + +pipelinesDelete().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/pipelinesGet.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/pipelinesGet.js new file mode 100644 index 000000000000..06337f83192e --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/pipelinesGet.js @@ -0,0 +1,31 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Gets a pipeline. + * + * @summary Gets a pipeline. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Pipelines_Get.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function pipelinesGet() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const pipelineName = "examplePipeline"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.pipelines.get(resourceGroupName, factoryName, pipelineName); + console.log(result); +} + +pipelinesGet().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/pipelinesListByFactory.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/pipelinesListByFactory.js new file mode 100644 index 000000000000..9fe427689f6c --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/pipelinesListByFactory.js @@ -0,0 +1,33 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Lists pipelines. + * + * @summary Lists pipelines. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Pipelines_ListByFactory.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function pipelinesListByFactory() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.pipelines.listByFactory(resourceGroupName, factoryName)) { + resArray.push(item); + } + console.log(resArray); +} + +pipelinesListByFactory().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/pipelinesUpdate.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/pipelinesUpdate.js new file mode 100644 index 000000000000..9246933c9f5a --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/pipelinesUpdate.js @@ -0,0 +1,81 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Creates or updates a pipeline. + * + * @summary Creates or updates a pipeline. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Pipelines_Update.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function pipelinesUpdate() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const pipelineName = "examplePipeline"; + const pipeline = { + description: "Example description", + activities: [ + { + name: "ExampleForeachActivity", + type: "ForEach", + activities: [ + { + name: "ExampleCopyActivity", + type: "Copy", + dataIntegrationUnits: 32, + inputs: [ + { + type: "DatasetReference", + parameters: { + myFileName: "examplecontainer.csv", + myFolderPath: "examplecontainer", + }, + referenceName: "exampleDataset", + }, + ], + outputs: [ + { + type: "DatasetReference", + parameters: { + myFileName: { type: "Expression", value: "@item()" }, + myFolderPath: "examplecontainer", + }, + referenceName: "exampleDataset", + }, + ], + sink: { type: "BlobSink" }, + source: { type: "BlobSource" }, + }, + ], + isSequential: true, + items: { + type: "Expression", + value: "@pipeline().parameters.OutputBlobNameList", + }, + }, + ], + parameters: { outputBlobNameList: { type: "Array" } }, + policy: { elapsedTimeMetric: { duration: "0.00:10:00" } }, + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.pipelines.createOrUpdate( + resourceGroupName, + factoryName, + pipelineName, + pipeline + ); + console.log(result); +} + +pipelinesUpdate().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/privateEndPointConnectionsListByFactory.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/privateEndPointConnectionsListByFactory.js new file mode 100644 index 000000000000..d669f4c27410 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/privateEndPointConnectionsListByFactory.js @@ -0,0 +1,36 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Lists Private endpoint connections + * + * @summary Lists Private endpoint connections + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/PrivateEndPointConnections_ListByFactory.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function privateEndPointConnectionsListByFactory() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.privateEndPointConnections.listByFactory( + resourceGroupName, + factoryName + )) { + resArray.push(item); + } + console.log(resArray); +} + +privateEndPointConnectionsListByFactory().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/sample.env b/sdk/datafactory/arm-datafactory/samples/v10/javascript/sample.env new file mode 100644 index 000000000000..672847a3fea0 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/sample.env @@ -0,0 +1,4 @@ +# App registration secret for AAD authentication +AZURE_CLIENT_SECRET= +AZURE_CLIENT_ID= +AZURE_TENANT_ID= \ No newline at end of file diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/triggerRunsQueryByFactory.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/triggerRunsQueryByFactory.js new file mode 100644 index 000000000000..ee2133e3d4a1 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/triggerRunsQueryByFactory.js @@ -0,0 +1,39 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Query trigger runs. + * + * @summary Query trigger runs. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/TriggerRuns_QueryByFactory.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function triggerRunsQueryByFactory() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const filterParameters = { + filters: [{ operand: "TriggerName", operator: "Equals", values: ["exampleTrigger"] }], + lastUpdatedAfter: new Date("2018-06-16T00:36:44.3345758Z"), + lastUpdatedBefore: new Date("2018-06-16T00:49:48.3686473Z"), + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.triggerRuns.queryByFactory( + resourceGroupName, + factoryName, + filterParameters + ); + console.log(result); +} + +triggerRunsQueryByFactory().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/triggersCancel.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/triggersCancel.js new file mode 100644 index 000000000000..ffb99b6d6ad9 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/triggersCancel.js @@ -0,0 +1,37 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Cancel a single trigger instance by runId. + * + * @summary Cancel a single trigger instance by runId. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/TriggerRuns_Cancel.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function triggersCancel() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const triggerName = "exampleTrigger"; + const runId = "2f7fdb90-5df1-4b8e-ac2f-064cfa58202b"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.triggerRuns.cancel( + resourceGroupName, + factoryName, + triggerName, + runId + ); + console.log(result); +} + +triggersCancel().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/triggersCreate.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/triggersCreate.js new file mode 100644 index 000000000000..75ca3eb4b427 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/triggersCreate.js @@ -0,0 +1,57 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Creates or updates a trigger. + * + * @summary Creates or updates a trigger. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_Create.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function triggersCreate() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const triggerName = "exampleTrigger"; + const trigger = { + properties: { + type: "ScheduleTrigger", + pipelines: [ + { + parameters: { outputBlobNameList: ["exampleoutput.csv"] }, + pipelineReference: { + type: "PipelineReference", + referenceName: "examplePipeline", + }, + }, + ], + recurrence: { + endTime: new Date("2018-06-16T00:55:13.8441801Z"), + frequency: "Minute", + interval: 4, + startTime: new Date("2018-06-16T00:39:13.8441801Z"), + timeZone: "UTC", + }, + }, + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.triggers.createOrUpdate( + resourceGroupName, + factoryName, + triggerName, + trigger + ); + console.log(result); +} + +triggersCreate().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/triggersDelete.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/triggersDelete.js new file mode 100644 index 000000000000..f0efd01640a1 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/triggersDelete.js @@ -0,0 +1,31 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Deletes a trigger. + * + * @summary Deletes a trigger. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_Delete.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function triggersDelete() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const triggerName = "exampleTrigger"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.triggers.delete(resourceGroupName, factoryName, triggerName); + console.log(result); +} + +triggersDelete().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/triggersGet.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/triggersGet.js new file mode 100644 index 000000000000..f1855f8d2c6e --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/triggersGet.js @@ -0,0 +1,31 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Gets a trigger. + * + * @summary Gets a trigger. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_Get.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function triggersGet() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const triggerName = "exampleTrigger"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.triggers.get(resourceGroupName, factoryName, triggerName); + console.log(result); +} + +triggersGet().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/triggersGetEventSubscriptionStatus.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/triggersGetEventSubscriptionStatus.js new file mode 100644 index 000000000000..5cc472b2ee0e --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/triggersGetEventSubscriptionStatus.js @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Get a trigger's event subscription status. + * + * @summary Get a trigger's event subscription status. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_GetEventSubscriptionStatus.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function triggersGetEventSubscriptionStatus() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const triggerName = "exampleTrigger"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.triggers.getEventSubscriptionStatus( + resourceGroupName, + factoryName, + triggerName + ); + console.log(result); +} + +triggersGetEventSubscriptionStatus().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/triggersListByFactory.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/triggersListByFactory.js new file mode 100644 index 000000000000..0861e82c733d --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/triggersListByFactory.js @@ -0,0 +1,33 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Lists triggers. + * + * @summary Lists triggers. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_ListByFactory.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function triggersListByFactory() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.triggers.listByFactory(resourceGroupName, factoryName)) { + resArray.push(item); + } + console.log(resArray); +} + +triggersListByFactory().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/triggersQueryByFactory.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/triggersQueryByFactory.js new file mode 100644 index 000000000000..6a739df900ec --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/triggersQueryByFactory.js @@ -0,0 +1,37 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Query triggers. + * + * @summary Query triggers. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_QueryByFactory.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function triggersQueryByFactory() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const filterParameters = { + parentTriggerName: "exampleTrigger", + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.triggers.queryByFactory( + resourceGroupName, + factoryName, + filterParameters + ); + console.log(result); +} + +triggersQueryByFactory().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/triggersRerun.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/triggersRerun.js new file mode 100644 index 000000000000..1fe147b28e47 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/triggersRerun.js @@ -0,0 +1,32 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Rerun single trigger instance by runId. + * + * @summary Rerun single trigger instance by runId. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/TriggerRuns_Rerun.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function triggersRerun() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const triggerName = "exampleTrigger"; + const runId = "2f7fdb90-5df1-4b8e-ac2f-064cfa58202b"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.triggerRuns.rerun(resourceGroupName, factoryName, triggerName, runId); + console.log(result); +} + +triggersRerun().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/triggersStart.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/triggersStart.js new file mode 100644 index 000000000000..5b61fba7a9ec --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/triggersStart.js @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Starts a trigger. + * + * @summary Starts a trigger. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_Start.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function triggersStart() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const triggerName = "exampleTrigger"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.triggers.beginStartAndWait( + resourceGroupName, + factoryName, + triggerName + ); + console.log(result); +} + +triggersStart().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/triggersStop.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/triggersStop.js new file mode 100644 index 000000000000..fb1b7ac0ddc7 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/triggersStop.js @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Stops a trigger. + * + * @summary Stops a trigger. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_Stop.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function triggersStop() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const triggerName = "exampleTrigger"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.triggers.beginStopAndWait( + resourceGroupName, + factoryName, + triggerName + ); + console.log(result); +} + +triggersStop().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/triggersSubscribeToEvents.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/triggersSubscribeToEvents.js new file mode 100644 index 000000000000..bed8a89aabbc --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/triggersSubscribeToEvents.js @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Subscribe event trigger to events. + * + * @summary Subscribe event trigger to events. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_SubscribeToEvents.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function triggersSubscribeToEvents() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const triggerName = "exampleTrigger"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.triggers.beginSubscribeToEventsAndWait( + resourceGroupName, + factoryName, + triggerName + ); + console.log(result); +} + +triggersSubscribeToEvents().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/triggersUnsubscribeFromEvents.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/triggersUnsubscribeFromEvents.js new file mode 100644 index 000000000000..6599d9be0559 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/triggersUnsubscribeFromEvents.js @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Unsubscribe event trigger from events. + * + * @summary Unsubscribe event trigger from events. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_UnsubscribeFromEvents.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function triggersUnsubscribeFromEvents() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const triggerName = "exampleTrigger"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.triggers.beginUnsubscribeFromEventsAndWait( + resourceGroupName, + factoryName, + triggerName + ); + console.log(result); +} + +triggersUnsubscribeFromEvents().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/javascript/triggersUpdate.js b/sdk/datafactory/arm-datafactory/samples/v10/javascript/triggersUpdate.js new file mode 100644 index 000000000000..33fe1579d13f --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/javascript/triggersUpdate.js @@ -0,0 +1,58 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Creates or updates a trigger. + * + * @summary Creates or updates a trigger. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_Update.json + */ +const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); +const { DefaultAzureCredential } = require("@azure/identity"); + +async function triggersUpdate() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const triggerName = "exampleTrigger"; + const trigger = { + properties: { + type: "ScheduleTrigger", + description: "Example description", + pipelines: [ + { + parameters: { outputBlobNameList: ["exampleoutput.csv"] }, + pipelineReference: { + type: "PipelineReference", + referenceName: "examplePipeline", + }, + }, + ], + recurrence: { + endTime: new Date("2018-06-16T00:55:14.905167Z"), + frequency: "Minute", + interval: 4, + startTime: new Date("2018-06-16T00:39:14.905167Z"), + timeZone: "UTC", + }, + }, + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.triggers.createOrUpdate( + resourceGroupName, + factoryName, + triggerName, + trigger + ); + console.log(result); +} + +triggersUpdate().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/README.md b/sdk/datafactory/arm-datafactory/samples/v10/typescript/README.md new file mode 100644 index 000000000000..0a7193aa2c23 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/README.md @@ -0,0 +1,241 @@ +# client library samples for TypeScript + +These sample programs show how to use the TypeScript client libraries for in some common scenarios. + +| **File Name** | **Description** | +| --------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| [activityRunsQueryByPipelineRun.ts][activityrunsquerybypipelinerun] | Query activity runs based on input filter conditions. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ActivityRuns_QueryByPipelineRun.json | +| [approvesOrRejectsAPrivateEndpointConnectionForAFactory.ts][approvesorrejectsaprivateendpointconnectionforafactory] | Approves or rejects a private endpoint connection x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ApproveRejectPrivateEndpointConnection.json | +| [dataFlowDebugSessionAddDataFlow.ts][dataflowdebugsessionadddataflow] | Add a data flow into debug session. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/DataFlowDebugSession_AddDataFlow.json | +| [dataFlowDebugSessionCreate.ts][dataflowdebugsessioncreate] | Creates a data flow debug session. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/DataFlowDebugSession_Create.json | +| [dataFlowDebugSessionDelete.ts][dataflowdebugsessiondelete] | Deletes a data flow debug session. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/DataFlowDebugSession_Delete.json | +| [dataFlowDebugSessionExecuteCommand.ts][dataflowdebugsessionexecutecommand] | Execute a data flow debug command. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/DataFlowDebugSession_ExecuteCommand.json | +| [dataFlowDebugSessionQueryByFactory.ts][dataflowdebugsessionquerybyfactory] | Query all active data flow debug sessions. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/DataFlowDebugSession_QueryByFactory.json | +| [dataFlowsCreate.ts][dataflowscreate] | Creates or updates a data flow. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/DataFlows_Create.json | +| [dataFlowsDelete.ts][dataflowsdelete] | Deletes a data flow. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/DataFlows_Delete.json | +| [dataFlowsGet.ts][dataflowsget] | Gets a data flow. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/DataFlows_Get.json | +| [dataFlowsListByFactory.ts][dataflowslistbyfactory] | Lists data flows. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/DataFlows_ListByFactory.json | +| [dataFlowsUpdate.ts][dataflowsupdate] | Creates or updates a data flow. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/DataFlows_Update.json | +| [datasetsCreate.ts][datasetscreate] | Creates or updates a dataset. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Datasets_Create.json | +| [datasetsDelete.ts][datasetsdelete] | Deletes a dataset. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Datasets_Delete.json | +| [datasetsGet.ts][datasetsget] | Gets a dataset. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Datasets_Get.json | +| [datasetsListByFactory.ts][datasetslistbyfactory] | Lists datasets. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Datasets_ListByFactory.json | +| [datasetsUpdate.ts][datasetsupdate] | Creates or updates a dataset. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Datasets_Update.json | +| [deleteAPrivateEndpointConnectionForADatafactory.ts][deleteaprivateendpointconnectionforadatafactory] | Deletes a private endpoint connection x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/DeletePrivateEndpointConnection.json | +| [exposureControlGetFeatureValue.ts][exposurecontrolgetfeaturevalue] | Get exposure control feature for specific location. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ExposureControl_GetFeatureValue.json | +| [exposureControlGetFeatureValueByFactory.ts][exposurecontrolgetfeaturevaluebyfactory] | Get exposure control feature for specific factory. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ExposureControl_GetFeatureValueByFactory.json | +| [exposureControlQueryFeatureValuesByFactory.ts][exposurecontrolqueryfeaturevaluesbyfactory] | Get list of exposure control features for specific factory. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ExposureControl_QueryFeatureValuesByFactory.json | +| [factoriesConfigureFactoryRepo.ts][factoriesconfigurefactoryrepo] | Updates a factory's repo information. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Factories_ConfigureFactoryRepo.json | +| [factoriesCreateOrUpdate.ts][factoriescreateorupdate] | Creates or updates a factory. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Factories_CreateOrUpdate.json | +| [factoriesDelete.ts][factoriesdelete] | Deletes a factory. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Factories_Delete.json | +| [factoriesGet.ts][factoriesget] | Gets a factory. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Factories_Get.json | +| [factoriesGetDataPlaneAccess.ts][factoriesgetdataplaneaccess] | Get Data Plane access. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Factories_GetDataPlaneAccess.json | +| [factoriesGetGitHubAccessToken.ts][factoriesgetgithubaccesstoken] | Get GitHub Access Token. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Factories_GetGitHubAccessToken.json | +| [factoriesList.ts][factorieslist] | Lists factories under the specified subscription. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Factories_List.json | +| [factoriesListByResourceGroup.ts][factorieslistbyresourcegroup] | Lists factories. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Factories_ListByResourceGroup.json | +| [factoriesUpdate.ts][factoriesupdate] | Updates a factory. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Factories_Update.json | +| [getAPrivateEndpointConnectionForADatafactory.ts][getaprivateendpointconnectionforadatafactory] | Gets a private endpoint connection x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/GetPrivateEndpointConnection.json | +| [getPrivateLinkResourcesOfASite.ts][getprivatelinkresourcesofasite] | Gets the private link resources x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/GetPrivateLinkResources.json | +| [integrationRuntimeNodesGet.ts][integrationruntimenodesget] | Gets a self-hosted integration runtime node. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimeNodes_Get.json | +| [integrationRuntimeNodesGetIPAddress.ts][integrationruntimenodesgetipaddress] | Get the IP address of self-hosted integration runtime node. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimeNodes_GetIpAddress.json | +| [integrationRuntimeNodesUpdate.ts][integrationruntimenodesupdate] | Updates a self-hosted integration runtime node. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimeNodes_Update.json | +| [integrationRuntimeObjectMetadataGet.ts][integrationruntimeobjectmetadataget] | Get a SSIS integration runtime object metadata by specified path. The return is pageable metadata list. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimeObjectMetadata_Get.json | +| [integrationRuntimeObjectMetadataRefresh.ts][integrationruntimeobjectmetadatarefresh] | Refresh a SSIS integration runtime object metadata. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimeObjectMetadata_Refresh.json | +| [integrationRuntimesCreate.ts][integrationruntimescreate] | Creates or updates an integration runtime. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_Create.json | +| [integrationRuntimesCreateLinkedIntegrationRuntime.ts][integrationruntimescreatelinkedintegrationruntime] | Create a linked integration runtime entry in a shared integration runtime. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_CreateLinkedIntegrationRuntime.json | +| [integrationRuntimesDelete.ts][integrationruntimesdelete] | Deletes an integration runtime. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_Delete.json | +| [integrationRuntimesGet.ts][integrationruntimesget] | Gets an integration runtime. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_Get.json | +| [integrationRuntimesGetConnectionInfo.ts][integrationruntimesgetconnectioninfo] | Gets the on-premises integration runtime connection information for encrypting the on-premises data source credentials. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_GetConnectionInfo.json | +| [integrationRuntimesGetMonitoringData.ts][integrationruntimesgetmonitoringdata] | Get the integration runtime monitoring data, which includes the monitor data for all the nodes under this integration runtime. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_GetMonitoringData.json | +| [integrationRuntimesGetStatus.ts][integrationruntimesgetstatus] | Gets detailed status information for an integration runtime. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_GetStatus.json | +| [integrationRuntimesListAuthKeys.ts][integrationruntimeslistauthkeys] | Retrieves the authentication keys for an integration runtime. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_ListAuthKeys.json | +| [integrationRuntimesListByFactory.ts][integrationruntimeslistbyfactory] | Lists integration runtimes. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_ListByFactory.json | +| [integrationRuntimesNodesDelete.ts][integrationruntimesnodesdelete] | Deletes a self-hosted integration runtime node. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimeNodes_Delete.json | +| [integrationRuntimesOutboundNetworkDependenciesEndpoints.ts][integrationruntimesoutboundnetworkdependenciesendpoints] | Gets the list of outbound network dependencies for a given Azure-SSIS integration runtime. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_ListOutboundNetworkDependenciesEndpoints.json | +| [integrationRuntimesRegenerateAuthKey.ts][integrationruntimesregenerateauthkey] | Regenerates the authentication key for an integration runtime. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_RegenerateAuthKey.json | +| [integrationRuntimesStart.ts][integrationruntimesstart] | Starts a ManagedReserved type integration runtime. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_Start.json | +| [integrationRuntimesStop.ts][integrationruntimesstop] | Stops a ManagedReserved type integration runtime. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_Stop.json | +| [integrationRuntimesSyncCredentials.ts][integrationruntimessynccredentials] | Force the integration runtime to synchronize credentials across integration runtime nodes, and this will override the credentials across all worker nodes with those available on the dispatcher node. If you already have the latest credential backup file, you should manually import it (preferred) on any self-hosted integration runtime node than using this API directly. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_SyncCredentials.json | +| [integrationRuntimesUpdate.ts][integrationruntimesupdate] | Updates an integration runtime. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_Update.json | +| [integrationRuntimesUpgrade.ts][integrationruntimesupgrade] | Remove all linked integration runtimes under specific data factory in a self-hosted integration runtime. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_RemoveLinks.json | +| [linkedServicesCreate.ts][linkedservicescreate] | Creates or updates a linked service. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/LinkedServices_Create.json | +| [linkedServicesDelete.ts][linkedservicesdelete] | Deletes a linked service. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/LinkedServices_Delete.json | +| [linkedServicesGet.ts][linkedservicesget] | Gets a linked service. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/LinkedServices_Get.json | +| [linkedServicesListByFactory.ts][linkedserviceslistbyfactory] | Lists linked services. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/LinkedServices_ListByFactory.json | +| [linkedServicesUpdate.ts][linkedservicesupdate] | Creates or updates a linked service. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/LinkedServices_Update.json | +| [managedPrivateEndpointsGet.ts][managedprivateendpointsget] | Gets a managed private endpoint. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ManagedPrivateEndpoints_Get.json | +| [managedPrivateEndpointsListByFactory.ts][managedprivateendpointslistbyfactory] | Lists managed private endpoints. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ManagedPrivateEndpoints_ListByFactory.json | +| [managedVirtualNetworksCreate.ts][managedvirtualnetworkscreate] | Creates or updates a managed private endpoint. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ManagedPrivateEndpoints_Create.json | +| [managedVirtualNetworksDelete.ts][managedvirtualnetworksdelete] | Deletes a managed private endpoint. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ManagedPrivateEndpoints_Delete.json | +| [managedVirtualNetworksGet.ts][managedvirtualnetworksget] | Gets a managed Virtual Network. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ManagedVirtualNetworks_Get.json | +| [managedVirtualNetworksListByFactory.ts][managedvirtualnetworkslistbyfactory] | Lists managed Virtual Networks. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ManagedVirtualNetworks_ListByFactory.json | +| [operationsList.ts][operationslist] | Lists the available Azure Data Factory API operations. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Operations_List.json | +| [pipelineRunsCancel.ts][pipelinerunscancel] | Cancel a pipeline run by its run ID. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/PipelineRuns_Cancel.json | +| [pipelineRunsGet.ts][pipelinerunsget] | Get a pipeline run by its run ID. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/PipelineRuns_Get.json | +| [pipelineRunsQueryByFactory.ts][pipelinerunsquerybyfactory] | Query pipeline runs in the factory based on input filter conditions. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/PipelineRuns_QueryByFactory.json | +| [pipelinesCreate.ts][pipelinescreate] | Creates or updates a pipeline. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Pipelines_Create.json | +| [pipelinesCreateRun.ts][pipelinescreaterun] | Creates a run of a pipeline. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Pipelines_CreateRun.json | +| [pipelinesDelete.ts][pipelinesdelete] | Deletes a pipeline. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Pipelines_Delete.json | +| [pipelinesGet.ts][pipelinesget] | Gets a pipeline. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Pipelines_Get.json | +| [pipelinesListByFactory.ts][pipelineslistbyfactory] | Lists pipelines. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Pipelines_ListByFactory.json | +| [pipelinesUpdate.ts][pipelinesupdate] | Creates or updates a pipeline. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Pipelines_Update.json | +| [privateEndPointConnectionsListByFactory.ts][privateendpointconnectionslistbyfactory] | Lists Private endpoint connections x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/PrivateEndPointConnections_ListByFactory.json | +| [triggerRunsQueryByFactory.ts][triggerrunsquerybyfactory] | Query trigger runs. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/TriggerRuns_QueryByFactory.json | +| [triggersCancel.ts][triggerscancel] | Cancel a single trigger instance by runId. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/TriggerRuns_Cancel.json | +| [triggersCreate.ts][triggerscreate] | Creates or updates a trigger. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_Create.json | +| [triggersDelete.ts][triggersdelete] | Deletes a trigger. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_Delete.json | +| [triggersGet.ts][triggersget] | Gets a trigger. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_Get.json | +| [triggersGetEventSubscriptionStatus.ts][triggersgeteventsubscriptionstatus] | Get a trigger's event subscription status. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_GetEventSubscriptionStatus.json | +| [triggersListByFactory.ts][triggerslistbyfactory] | Lists triggers. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_ListByFactory.json | +| [triggersQueryByFactory.ts][triggersquerybyfactory] | Query triggers. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_QueryByFactory.json | +| [triggersRerun.ts][triggersrerun] | Rerun single trigger instance by runId. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/TriggerRuns_Rerun.json | +| [triggersStart.ts][triggersstart] | Starts a trigger. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_Start.json | +| [triggersStop.ts][triggersstop] | Stops a trigger. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_Stop.json | +| [triggersSubscribeToEvents.ts][triggerssubscribetoevents] | Subscribe event trigger to events. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_SubscribeToEvents.json | +| [triggersUnsubscribeFromEvents.ts][triggersunsubscribefromevents] | Unsubscribe event trigger from events. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_UnsubscribeFromEvents.json | +| [triggersUpdate.ts][triggersupdate] | Creates or updates a trigger. x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_Update.json | + +## Prerequisites + +The sample programs are compatible with [LTS versions of Node.js](https://nodejs.org/about/releases/). + +Before running the samples in Node, they must be compiled to JavaScript using the TypeScript compiler. For more information on TypeScript, see the [TypeScript documentation][typescript]. Install the TypeScript compiler using: + +```bash +npm install -g typescript +``` + +You need [an Azure subscription][freesub] to run these sample programs. + +Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. + +Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. + +## Setup + +To run the samples using the published version of the package: + +1. Install the dependencies using `npm`: + +```bash +npm install +``` + +2. Compile the samples: + +```bash +npm run build +``` + +3. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. + +4. Run whichever samples you like (note that some samples may require additional setup, see the table above): + +```bash +node dist/activityRunsQueryByPipelineRun.js +``` + +Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): + +```bash +npx cross-env node dist/activityRunsQueryByPipelineRun.js +``` + +## Next Steps + +Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. + +[activityrunsquerybypipelinerun]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/activityRunsQueryByPipelineRun.ts +[approvesorrejectsaprivateendpointconnectionforafactory]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/approvesOrRejectsAPrivateEndpointConnectionForAFactory.ts +[dataflowdebugsessionadddataflow]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/dataFlowDebugSessionAddDataFlow.ts +[dataflowdebugsessioncreate]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/dataFlowDebugSessionCreate.ts +[dataflowdebugsessiondelete]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/dataFlowDebugSessionDelete.ts +[dataflowdebugsessionexecutecommand]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/dataFlowDebugSessionExecuteCommand.ts +[dataflowdebugsessionquerybyfactory]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/dataFlowDebugSessionQueryByFactory.ts +[dataflowscreate]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/dataFlowsCreate.ts +[dataflowsdelete]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/dataFlowsDelete.ts +[dataflowsget]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/dataFlowsGet.ts +[dataflowslistbyfactory]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/dataFlowsListByFactory.ts +[dataflowsupdate]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/dataFlowsUpdate.ts +[datasetscreate]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/datasetsCreate.ts +[datasetsdelete]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/datasetsDelete.ts +[datasetsget]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/datasetsGet.ts +[datasetslistbyfactory]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/datasetsListByFactory.ts +[datasetsupdate]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/datasetsUpdate.ts +[deleteaprivateendpointconnectionforadatafactory]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/deleteAPrivateEndpointConnectionForADatafactory.ts +[exposurecontrolgetfeaturevalue]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/exposureControlGetFeatureValue.ts +[exposurecontrolgetfeaturevaluebyfactory]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/exposureControlGetFeatureValueByFactory.ts +[exposurecontrolqueryfeaturevaluesbyfactory]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/exposureControlQueryFeatureValuesByFactory.ts +[factoriesconfigurefactoryrepo]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/factoriesConfigureFactoryRepo.ts +[factoriescreateorupdate]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/factoriesCreateOrUpdate.ts +[factoriesdelete]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/factoriesDelete.ts +[factoriesget]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/factoriesGet.ts +[factoriesgetdataplaneaccess]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/factoriesGetDataPlaneAccess.ts +[factoriesgetgithubaccesstoken]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/factoriesGetGitHubAccessToken.ts +[factorieslist]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/factoriesList.ts +[factorieslistbyresourcegroup]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/factoriesListByResourceGroup.ts +[factoriesupdate]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/factoriesUpdate.ts +[getaprivateendpointconnectionforadatafactory]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/getAPrivateEndpointConnectionForADatafactory.ts +[getprivatelinkresourcesofasite]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/getPrivateLinkResourcesOfASite.ts +[integrationruntimenodesget]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimeNodesGet.ts +[integrationruntimenodesgetipaddress]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimeNodesGetIPAddress.ts +[integrationruntimenodesupdate]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimeNodesUpdate.ts +[integrationruntimeobjectmetadataget]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimeObjectMetadataGet.ts +[integrationruntimeobjectmetadatarefresh]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimeObjectMetadataRefresh.ts +[integrationruntimescreate]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesCreate.ts +[integrationruntimescreatelinkedintegrationruntime]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesCreateLinkedIntegrationRuntime.ts +[integrationruntimesdelete]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesDelete.ts +[integrationruntimesget]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesGet.ts +[integrationruntimesgetconnectioninfo]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesGetConnectionInfo.ts +[integrationruntimesgetmonitoringdata]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesGetMonitoringData.ts +[integrationruntimesgetstatus]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesGetStatus.ts +[integrationruntimeslistauthkeys]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesListAuthKeys.ts +[integrationruntimeslistbyfactory]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesListByFactory.ts +[integrationruntimesnodesdelete]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesNodesDelete.ts +[integrationruntimesoutboundnetworkdependenciesendpoints]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesOutboundNetworkDependenciesEndpoints.ts +[integrationruntimesregenerateauthkey]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesRegenerateAuthKey.ts +[integrationruntimesstart]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesStart.ts +[integrationruntimesstop]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesStop.ts +[integrationruntimessynccredentials]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesSyncCredentials.ts +[integrationruntimesupdate]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesUpdate.ts +[integrationruntimesupgrade]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesUpgrade.ts +[linkedservicescreate]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/linkedServicesCreate.ts +[linkedservicesdelete]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/linkedServicesDelete.ts +[linkedservicesget]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/linkedServicesGet.ts +[linkedserviceslistbyfactory]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/linkedServicesListByFactory.ts +[linkedservicesupdate]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/linkedServicesUpdate.ts +[managedprivateendpointsget]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/managedPrivateEndpointsGet.ts +[managedprivateendpointslistbyfactory]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/managedPrivateEndpointsListByFactory.ts +[managedvirtualnetworkscreate]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/managedVirtualNetworksCreate.ts +[managedvirtualnetworksdelete]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/managedVirtualNetworksDelete.ts +[managedvirtualnetworksget]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/managedVirtualNetworksGet.ts +[managedvirtualnetworkslistbyfactory]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/managedVirtualNetworksListByFactory.ts +[operationslist]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/operationsList.ts +[pipelinerunscancel]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/pipelineRunsCancel.ts +[pipelinerunsget]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/pipelineRunsGet.ts +[pipelinerunsquerybyfactory]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/pipelineRunsQueryByFactory.ts +[pipelinescreate]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/pipelinesCreate.ts +[pipelinescreaterun]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/pipelinesCreateRun.ts +[pipelinesdelete]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/pipelinesDelete.ts +[pipelinesget]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/pipelinesGet.ts +[pipelineslistbyfactory]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/pipelinesListByFactory.ts +[pipelinesupdate]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/pipelinesUpdate.ts +[privateendpointconnectionslistbyfactory]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/privateEndPointConnectionsListByFactory.ts +[triggerrunsquerybyfactory]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/triggerRunsQueryByFactory.ts +[triggerscancel]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/triggersCancel.ts +[triggerscreate]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/triggersCreate.ts +[triggersdelete]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/triggersDelete.ts +[triggersget]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/triggersGet.ts +[triggersgeteventsubscriptionstatus]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/triggersGetEventSubscriptionStatus.ts +[triggerslistbyfactory]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/triggersListByFactory.ts +[triggersquerybyfactory]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/triggersQueryByFactory.ts +[triggersrerun]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/triggersRerun.ts +[triggersstart]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/triggersStart.ts +[triggersstop]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/triggersStop.ts +[triggerssubscribetoevents]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/triggersSubscribeToEvents.ts +[triggersunsubscribefromevents]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/triggersUnsubscribeFromEvents.ts +[triggersupdate]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/triggersUpdate.ts +[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-datafactory?view=azure-node-preview +[freesub]: https://azure.microsoft.com/free/ +[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/datafactory/arm-datafactory/README.md +[typescript]: https://www.typescriptlang.org/docs/home.html diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/package.json b/sdk/datafactory/arm-datafactory/samples/v10/typescript/package.json new file mode 100644 index 000000000000..4663ed9f54bd --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/package.json @@ -0,0 +1,41 @@ +{ + "name": "azure-arm-datafactory-samples-ts", + "private": true, + "version": "1.0.0", + "description": " client library samples for TypeScript", + "engines": { + "node": ">=12.0.0" + }, + "scripts": { + "build": "tsc", + "prebuild": "rimraf dist/" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/Azure/azure-sdk-for-js.git", + "directory": "sdk/datafactory/arm-datafactory" + }, + "keywords": [ + "node", + "azure", + "typescript", + "browser", + "isomorphic" + ], + "author": "Microsoft Corporation", + "license": "MIT", + "bugs": { + "url": "https://github.com/Azure/azure-sdk-for-js/issues" + }, + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/datafactory/arm-datafactory", + "dependencies": { + "@azure/arm-datafactory": "latest", + "dotenv": "latest", + "@azure/identity": "^2.0.1" + }, + "devDependencies": { + "@types/node": "^12.0.0", + "typescript": "~4.4.0", + "rimraf": "latest" + } +} diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/sample.env b/sdk/datafactory/arm-datafactory/samples/v10/typescript/sample.env new file mode 100644 index 000000000000..672847a3fea0 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/sample.env @@ -0,0 +1,4 @@ +# App registration secret for AAD authentication +AZURE_CLIENT_SECRET= +AZURE_CLIENT_ID= +AZURE_TENANT_ID= \ No newline at end of file diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/activityRunsQueryByPipelineRun.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/activityRunsQueryByPipelineRun.ts new file mode 100644 index 000000000000..ce2b1e48a10f --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/activityRunsQueryByPipelineRun.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Query activity runs based on input filter conditions. + * + * @summary Query activity runs based on input filter conditions. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ActivityRuns_QueryByPipelineRun.json + */ +import { + RunFilterParameters, + DataFactoryManagementClient +} from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function activityRunsQueryByPipelineRun() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const runId = "2f7fdb90-5df1-4b8e-ac2f-064cfa58202b"; + const filterParameters: RunFilterParameters = { + lastUpdatedAfter: new Date("2018-06-16T00:36:44.3345758Z"), + lastUpdatedBefore: new Date("2018-06-16T00:49:48.3686473Z") + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.activityRuns.queryByPipelineRun( + resourceGroupName, + factoryName, + runId, + filterParameters + ); + console.log(result); +} + +activityRunsQueryByPipelineRun().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/approvesOrRejectsAPrivateEndpointConnectionForAFactory.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/approvesOrRejectsAPrivateEndpointConnectionForAFactory.ts new file mode 100644 index 000000000000..c92b58b8e589 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/approvesOrRejectsAPrivateEndpointConnectionForAFactory.ts @@ -0,0 +1,48 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Approves or rejects a private endpoint connection + * + * @summary Approves or rejects a private endpoint connection + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ApproveRejectPrivateEndpointConnection.json + */ +import { + PrivateLinkConnectionApprovalRequestResource, + DataFactoryManagementClient +} from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function approvesOrRejectsAPrivateEndpointConnectionForAFactory() { + const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const privateEndpointConnectionName = "connection"; + const privateEndpointWrapper: PrivateLinkConnectionApprovalRequestResource = { + properties: { + privateLinkServiceConnectionState: { + description: "Approved by admin.", + actionsRequired: "", + status: "Approved" + } + } + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.privateEndpointConnection.createOrUpdate( + resourceGroupName, + factoryName, + privateEndpointConnectionName, + privateEndpointWrapper + ); + console.log(result); +} + +approvesOrRejectsAPrivateEndpointConnectionForAFactory().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/dataFlowDebugSessionAddDataFlow.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/dataFlowDebugSessionAddDataFlow.ts new file mode 100644 index 000000000000..8edfae61c641 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/dataFlowDebugSessionAddDataFlow.ts @@ -0,0 +1,102 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Add a data flow into debug session. + * + * @summary Add a data flow into debug session. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/DataFlowDebugSession_AddDataFlow.json + */ +import { + DataFlowDebugPackage, + DataFactoryManagementClient +} from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function dataFlowDebugSessionAddDataFlow() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const request: DataFlowDebugPackage = { + dataFlow: { + name: "dataflow1", + properties: { + type: "MappingDataFlow", + script: + "\n\nsource(output(\n Column_1 as string\n ),\n allowSchemaDrift: true,\n validateSchema: false) ~> source1", + sinks: [], + sources: [ + { + name: "source1", + dataset: { + type: "DatasetReference", + referenceName: "DelimitedText2" + } + } + ], + transformations: [] + } + }, + datasets: [ + { + name: "dataset1", + properties: { + type: "DelimitedText", + schema: [{ type: "String" }], + annotations: [], + columnDelimiter: ",", + escapeChar: "\\", + firstRowAsHeader: true, + linkedServiceName: { + type: "LinkedServiceReference", + referenceName: "linkedService5" + }, + location: { + type: "AzureBlobStorageLocation", + container: "dataflow-sample-data", + fileName: "Ansiencoding.csv" + }, + quoteChar: '"' + } + } + ], + debugSettings: { + datasetParameters: { Movies: { path: "abc" }, Output: { time: "def" } }, + parameters: { sourcePath: "Toy" }, + sourceSettings: [ + { rowLimit: 1000, sourceName: "source1" }, + { rowLimit: 222, sourceName: "source2" } + ] + }, + linkedServices: [ + { + name: "linkedService1", + properties: { + type: "AzureBlobStorage", + annotations: [], + connectionString: + "DefaultEndpointsProtocol=https;AccountName=;EndpointSuffix=core.windows.net;", + encryptedCredential: "" + } + } + ], + sessionId: "f06ed247-9d07-49b2-b05e-2cb4a2fc871e" + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.dataFlowDebugSession.addDataFlow( + resourceGroupName, + factoryName, + request + ); + console.log(result); +} + +dataFlowDebugSessionAddDataFlow().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/dataFlowDebugSessionCreate.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/dataFlowDebugSessionCreate.ts new file mode 100644 index 000000000000..7bef68207ff3 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/dataFlowDebugSessionCreate.ts @@ -0,0 +1,54 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Creates a data flow debug session. + * + * @summary Creates a data flow debug session. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/DataFlowDebugSession_Create.json + */ +import { + CreateDataFlowDebugSessionRequest, + DataFactoryManagementClient +} from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function dataFlowDebugSessionCreate() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const request: CreateDataFlowDebugSessionRequest = { + integrationRuntime: { + name: "ir1", + properties: { + type: "Managed", + computeProperties: { + dataFlowProperties: { + computeType: "General", + coreCount: 48, + timeToLive: 10 + }, + location: "AutoResolve" + } + } + }, + timeToLive: 60 + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.dataFlowDebugSession.beginCreateAndWait( + resourceGroupName, + factoryName, + request + ); + console.log(result); +} + +dataFlowDebugSessionCreate().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/dataFlowDebugSessionDelete.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/dataFlowDebugSessionDelete.ts new file mode 100644 index 000000000000..5ff5e84c98f2 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/dataFlowDebugSessionDelete.ts @@ -0,0 +1,40 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Deletes a data flow debug session. + * + * @summary Deletes a data flow debug session. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/DataFlowDebugSession_Delete.json + */ +import { + DeleteDataFlowDebugSessionRequest, + DataFactoryManagementClient +} from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function dataFlowDebugSessionDelete() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const request: DeleteDataFlowDebugSessionRequest = { + sessionId: "91fb57e0-8292-47be-89ff-c8f2d2bb2a7e" + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.dataFlowDebugSession.delete( + resourceGroupName, + factoryName, + request + ); + console.log(result); +} + +dataFlowDebugSessionDelete().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/dataFlowDebugSessionExecuteCommand.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/dataFlowDebugSessionExecuteCommand.ts new file mode 100644 index 000000000000..438ef2df4f0a --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/dataFlowDebugSessionExecuteCommand.ts @@ -0,0 +1,42 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Execute a data flow debug command. + * + * @summary Execute a data flow debug command. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/DataFlowDebugSession_ExecuteCommand.json + */ +import { + DataFlowDebugCommandRequest, + DataFactoryManagementClient +} from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function dataFlowDebugSessionExecuteCommand() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const request: DataFlowDebugCommandRequest = { + command: "executePreviewQuery", + commandPayload: { rowLimits: 100, streamName: "source1" }, + sessionId: "f06ed247-9d07-49b2-b05e-2cb4a2fc871e" + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.dataFlowDebugSession.beginExecuteCommandAndWait( + resourceGroupName, + factoryName, + request + ); + console.log(result); +} + +dataFlowDebugSessionExecuteCommand().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/dataFlowDebugSessionQueryByFactory.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/dataFlowDebugSessionQueryByFactory.ts new file mode 100644 index 000000000000..b0e32867730f --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/dataFlowDebugSessionQueryByFactory.ts @@ -0,0 +1,36 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Query all active data flow debug sessions. + * + * @summary Query all active data flow debug sessions. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/DataFlowDebugSession_QueryByFactory.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function dataFlowDebugSessionQueryByFactory() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.dataFlowDebugSession.listQueryByFactory( + resourceGroupName, + factoryName + )) { + resArray.push(item); + } + console.log(resArray); +} + +dataFlowDebugSessionQueryByFactory().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/dataFlowsCreate.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/dataFlowsCreate.ts new file mode 100644 index 000000000000..4340671df1e1 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/dataFlowsCreate.ts @@ -0,0 +1,74 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Creates or updates a data flow. + * + * @summary Creates or updates a data flow. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/DataFlows_Create.json + */ +import { + DataFlowResource, + DataFactoryManagementClient +} from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function dataFlowsCreate() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const dataFlowName = "exampleDataFlow"; + const dataFlow: DataFlowResource = { + properties: { + type: "MappingDataFlow", + description: + "Sample demo data flow to convert currencies showing usage of union, derive and conditional split transformation.", + script: + "source(output(PreviousConversionRate as double,Country as string,DateTime1 as string,CurrentConversionRate as double),allowSchemaDrift: false,validateSchema: false) ~> USDCurrency\nsource(output(PreviousConversionRate as double,Country as string,DateTime1 as string,CurrentConversionRate as double),allowSchemaDrift: true,validateSchema: false) ~> CADSource\nUSDCurrency, CADSource union(byName: true)~> Union\nUnion derive(NewCurrencyRate = round(CurrentConversionRate*1.25)) ~> NewCurrencyColumn\nNewCurrencyColumn split(Country == 'USD',Country == 'CAD',disjoint: false) ~> ConditionalSplit1@(USD, CAD)\nConditionalSplit1@USD sink(saveMode:'overwrite' ) ~> USDSink\nConditionalSplit1@CAD sink(saveMode:'overwrite' ) ~> CADSink", + sinks: [ + { + name: "USDSink", + dataset: { type: "DatasetReference", referenceName: "USDOutput" } + }, + { + name: "CADSink", + dataset: { type: "DatasetReference", referenceName: "CADOutput" } + } + ], + sources: [ + { + name: "USDCurrency", + dataset: { + type: "DatasetReference", + referenceName: "CurrencyDatasetUSD" + } + }, + { + name: "CADSource", + dataset: { + type: "DatasetReference", + referenceName: "CurrencyDatasetCAD" + } + } + ] + } + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.dataFlows.createOrUpdate( + resourceGroupName, + factoryName, + dataFlowName, + dataFlow + ); + console.log(result); +} + +dataFlowsCreate().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/dataFlowsDelete.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/dataFlowsDelete.ts new file mode 100644 index 000000000000..07053f38ba04 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/dataFlowsDelete.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Deletes a data flow. + * + * @summary Deletes a data flow. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/DataFlows_Delete.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function dataFlowsDelete() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const dataFlowName = "exampleDataFlow"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.dataFlows.delete( + resourceGroupName, + factoryName, + dataFlowName + ); + console.log(result); +} + +dataFlowsDelete().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/dataFlowsGet.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/dataFlowsGet.ts new file mode 100644 index 000000000000..fdc035baf21d --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/dataFlowsGet.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Gets a data flow. + * + * @summary Gets a data flow. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/DataFlows_Get.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function dataFlowsGet() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const dataFlowName = "exampleDataFlow"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.dataFlows.get( + resourceGroupName, + factoryName, + dataFlowName + ); + console.log(result); +} + +dataFlowsGet().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/dataFlowsListByFactory.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/dataFlowsListByFactory.ts new file mode 100644 index 000000000000..3907ccac48a4 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/dataFlowsListByFactory.ts @@ -0,0 +1,36 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Lists data flows. + * + * @summary Lists data flows. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/DataFlows_ListByFactory.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function dataFlowsListByFactory() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.dataFlows.listByFactory( + resourceGroupName, + factoryName + )) { + resArray.push(item); + } + console.log(resArray); +} + +dataFlowsListByFactory().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/dataFlowsUpdate.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/dataFlowsUpdate.ts new file mode 100644 index 000000000000..e7f2dcb6eb26 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/dataFlowsUpdate.ts @@ -0,0 +1,74 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Creates or updates a data flow. + * + * @summary Creates or updates a data flow. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/DataFlows_Update.json + */ +import { + DataFlowResource, + DataFactoryManagementClient +} from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function dataFlowsUpdate() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const dataFlowName = "exampleDataFlow"; + const dataFlow: DataFlowResource = { + properties: { + type: "MappingDataFlow", + description: + "Sample demo data flow to convert currencies showing usage of union, derive and conditional split transformation.", + script: + "source(output(PreviousConversionRate as double,Country as string,DateTime1 as string,CurrentConversionRate as double),allowSchemaDrift: false,validateSchema: false) ~> USDCurrency\nsource(output(PreviousConversionRate as double,Country as string,DateTime1 as string,CurrentConversionRate as double),allowSchemaDrift: true,validateSchema: false) ~> CADSource\nUSDCurrency, CADSource union(byName: true)~> Union\nUnion derive(NewCurrencyRate = round(CurrentConversionRate*1.25)) ~> NewCurrencyColumn\nNewCurrencyColumn split(Country == 'USD',Country == 'CAD',disjoint: false) ~> ConditionalSplit1@(USD, CAD)\nConditionalSplit1@USD sink(saveMode:'overwrite' ) ~> USDSink\nConditionalSplit1@CAD sink(saveMode:'overwrite' ) ~> CADSink", + sinks: [ + { + name: "USDSink", + dataset: { type: "DatasetReference", referenceName: "USDOutput" } + }, + { + name: "CADSink", + dataset: { type: "DatasetReference", referenceName: "CADOutput" } + } + ], + sources: [ + { + name: "USDCurrency", + dataset: { + type: "DatasetReference", + referenceName: "CurrencyDatasetUSD" + } + }, + { + name: "CADSource", + dataset: { + type: "DatasetReference", + referenceName: "CurrencyDatasetCAD" + } + } + ] + } + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.dataFlows.createOrUpdate( + resourceGroupName, + factoryName, + dataFlowName, + dataFlow + ); + console.log(result); +} + +dataFlowsUpdate().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/datasetsCreate.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/datasetsCreate.ts new file mode 100644 index 000000000000..91c17f5983e1 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/datasetsCreate.ts @@ -0,0 +1,55 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Creates or updates a dataset. + * + * @summary Creates or updates a dataset. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Datasets_Create.json + */ +import { + DatasetResource, + DataFactoryManagementClient +} from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function datasetsCreate() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const datasetName = "exampleDataset"; + const dataset: DatasetResource = { + properties: { + type: "AzureBlob", + format: { type: "TextFormat" }, + fileName: { type: "Expression", value: "@dataset().MyFileName" }, + folderPath: { type: "Expression", value: "@dataset().MyFolderPath" }, + linkedServiceName: { + type: "LinkedServiceReference", + referenceName: "exampleLinkedService" + }, + parameters: { + myFileName: { type: "String" }, + myFolderPath: { type: "String" } + } + } + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.datasets.createOrUpdate( + resourceGroupName, + factoryName, + datasetName, + dataset + ); + console.log(result); +} + +datasetsCreate().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/datasetsDelete.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/datasetsDelete.ts new file mode 100644 index 000000000000..20f5aa9fd770 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/datasetsDelete.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Deletes a dataset. + * + * @summary Deletes a dataset. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Datasets_Delete.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function datasetsDelete() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const datasetName = "exampleDataset"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.datasets.delete( + resourceGroupName, + factoryName, + datasetName + ); + console.log(result); +} + +datasetsDelete().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/datasetsGet.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/datasetsGet.ts new file mode 100644 index 000000000000..12bcb052cb14 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/datasetsGet.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Gets a dataset. + * + * @summary Gets a dataset. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Datasets_Get.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function datasetsGet() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const datasetName = "exampleDataset"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.datasets.get( + resourceGroupName, + factoryName, + datasetName + ); + console.log(result); +} + +datasetsGet().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/datasetsListByFactory.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/datasetsListByFactory.ts new file mode 100644 index 000000000000..4dbb8f0da866 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/datasetsListByFactory.ts @@ -0,0 +1,36 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Lists datasets. + * + * @summary Lists datasets. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Datasets_ListByFactory.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function datasetsListByFactory() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.datasets.listByFactory( + resourceGroupName, + factoryName + )) { + resArray.push(item); + } + console.log(resArray); +} + +datasetsListByFactory().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/datasetsUpdate.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/datasetsUpdate.ts new file mode 100644 index 000000000000..51403c6bc715 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/datasetsUpdate.ts @@ -0,0 +1,56 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Creates or updates a dataset. + * + * @summary Creates or updates a dataset. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Datasets_Update.json + */ +import { + DatasetResource, + DataFactoryManagementClient +} from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function datasetsUpdate() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const datasetName = "exampleDataset"; + const dataset: DatasetResource = { + properties: { + type: "AzureBlob", + format: { type: "TextFormat" }, + description: "Example description", + fileName: { type: "Expression", value: "@dataset().MyFileName" }, + folderPath: { type: "Expression", value: "@dataset().MyFolderPath" }, + linkedServiceName: { + type: "LinkedServiceReference", + referenceName: "exampleLinkedService" + }, + parameters: { + myFileName: { type: "String" }, + myFolderPath: { type: "String" } + } + } + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.datasets.createOrUpdate( + resourceGroupName, + factoryName, + datasetName, + dataset + ); + console.log(result); +} + +datasetsUpdate().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/deleteAPrivateEndpointConnectionForADatafactory.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/deleteAPrivateEndpointConnectionForADatafactory.ts new file mode 100644 index 000000000000..0bacd3de9a83 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/deleteAPrivateEndpointConnectionForADatafactory.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Deletes a private endpoint connection + * + * @summary Deletes a private endpoint connection + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/DeletePrivateEndpointConnection.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function deleteAPrivateEndpointConnectionForADatafactory() { + const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const privateEndpointConnectionName = "connection"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.privateEndpointConnection.delete( + resourceGroupName, + factoryName, + privateEndpointConnectionName + ); + console.log(result); +} + +deleteAPrivateEndpointConnectionForADatafactory().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/exposureControlGetFeatureValue.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/exposureControlGetFeatureValue.ts new file mode 100644 index 000000000000..16de0ddfc49e --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/exposureControlGetFeatureValue.ts @@ -0,0 +1,39 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Get exposure control feature for specific location. + * + * @summary Get exposure control feature for specific location. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ExposureControl_GetFeatureValue.json + */ +import { + ExposureControlRequest, + DataFactoryManagementClient +} from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function exposureControlGetFeatureValue() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const locationId = "WestEurope"; + const exposureControlRequest: ExposureControlRequest = { + featureName: "ADFIntegrationRuntimeSharingRbac", + featureType: "Feature" + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.exposureControl.getFeatureValue( + locationId, + exposureControlRequest + ); + console.log(result); +} + +exposureControlGetFeatureValue().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/exposureControlGetFeatureValueByFactory.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/exposureControlGetFeatureValueByFactory.ts new file mode 100644 index 000000000000..3965f2e296d1 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/exposureControlGetFeatureValueByFactory.ts @@ -0,0 +1,41 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Get exposure control feature for specific factory. + * + * @summary Get exposure control feature for specific factory. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ExposureControl_GetFeatureValueByFactory.json + */ +import { + ExposureControlRequest, + DataFactoryManagementClient +} from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function exposureControlGetFeatureValueByFactory() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const exposureControlRequest: ExposureControlRequest = { + featureName: "ADFIntegrationRuntimeSharingRbac", + featureType: "Feature" + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.exposureControl.getFeatureValueByFactory( + resourceGroupName, + factoryName, + exposureControlRequest + ); + console.log(result); +} + +exposureControlGetFeatureValueByFactory().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/exposureControlQueryFeatureValuesByFactory.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/exposureControlQueryFeatureValuesByFactory.ts new file mode 100644 index 000000000000..6fd9aad4836e --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/exposureControlQueryFeatureValuesByFactory.ts @@ -0,0 +1,46 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Get list of exposure control features for specific factory. + * + * @summary Get list of exposure control features for specific factory. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ExposureControl_QueryFeatureValuesByFactory.json + */ +import { + ExposureControlBatchRequest, + DataFactoryManagementClient +} from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function exposureControlQueryFeatureValuesByFactory() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const exposureControlBatchRequest: ExposureControlBatchRequest = { + exposureControlRequests: [ + { + featureName: "ADFIntegrationRuntimeSharingRbac", + featureType: "Feature" + }, + { featureName: "ADFSampleFeature", featureType: "Feature" } + ] + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.exposureControl.queryFeatureValuesByFactory( + resourceGroupName, + factoryName, + exposureControlBatchRequest + ); + console.log(result); +} + +exposureControlQueryFeatureValuesByFactory().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/factoriesConfigureFactoryRepo.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/factoriesConfigureFactoryRepo.ts new file mode 100644 index 000000000000..3c384a10819a --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/factoriesConfigureFactoryRepo.ts @@ -0,0 +1,49 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Updates a factory's repo information. + * + * @summary Updates a factory's repo information. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Factories_ConfigureFactoryRepo.json + */ +import { + FactoryRepoUpdate, + DataFactoryManagementClient +} from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function factoriesConfigureFactoryRepo() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const locationId = "East US"; + const factoryRepoUpdate: FactoryRepoUpdate = { + factoryResourceId: + "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName", + repoConfiguration: { + type: "FactoryVSTSConfiguration", + accountName: "ADF", + collaborationBranch: "master", + lastCommitId: "", + projectName: "project", + repositoryName: "repo", + rootFolder: "/", + tenantId: "" + } + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.factories.configureFactoryRepo( + locationId, + factoryRepoUpdate + ); + console.log(result); +} + +factoriesConfigureFactoryRepo().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/factoriesCreateOrUpdate.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/factoriesCreateOrUpdate.ts new file mode 100644 index 000000000000..deaa26bbf77d --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/factoriesCreateOrUpdate.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Creates or updates a factory. + * + * @summary Creates or updates a factory. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Factories_CreateOrUpdate.json + */ +import { Factory, DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function factoriesCreateOrUpdate() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const factory: Factory = { location: "East US" }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.factories.createOrUpdate( + resourceGroupName, + factoryName, + factory + ); + console.log(result); +} + +factoriesCreateOrUpdate().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/factoriesDelete.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/factoriesDelete.ts new file mode 100644 index 000000000000..9db486ce0dea --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/factoriesDelete.ts @@ -0,0 +1,30 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Deletes a factory. + * + * @summary Deletes a factory. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Factories_Delete.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function factoriesDelete() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.factories.delete(resourceGroupName, factoryName); + console.log(result); +} + +factoriesDelete().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/factoriesGet.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/factoriesGet.ts new file mode 100644 index 000000000000..9c12511a8d03 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/factoriesGet.ts @@ -0,0 +1,30 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Gets a factory. + * + * @summary Gets a factory. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Factories_Get.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function factoriesGet() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.factories.get(resourceGroupName, factoryName); + console.log(result); +} + +factoriesGet().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/factoriesGetDataPlaneAccess.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/factoriesGetDataPlaneAccess.ts new file mode 100644 index 000000000000..dddacf10a2be --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/factoriesGetDataPlaneAccess.ts @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Get Data Plane access. + * + * @summary Get Data Plane access. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Factories_GetDataPlaneAccess.json + */ +import { + UserAccessPolicy, + DataFactoryManagementClient +} from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function factoriesGetDataPlaneAccess() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const policy: UserAccessPolicy = { + accessResourcePath: "", + expireTime: "2018-11-10T09:46:20.2659347Z", + permissions: "r", + profileName: "DefaultProfile", + startTime: "2018-11-10T02:46:20.2659347Z" + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.factories.getDataPlaneAccess( + resourceGroupName, + factoryName, + policy + ); + console.log(result); +} + +factoriesGetDataPlaneAccess().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/factoriesGetGitHubAccessToken.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/factoriesGetGitHubAccessToken.ts new file mode 100644 index 000000000000..5f24ddddcfa9 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/factoriesGetGitHubAccessToken.ts @@ -0,0 +1,42 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Get GitHub Access Token. + * + * @summary Get GitHub Access Token. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Factories_GetGitHubAccessToken.json + */ +import { + GitHubAccessTokenRequest, + DataFactoryManagementClient +} from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function factoriesGetGitHubAccessToken() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const gitHubAccessTokenRequest: GitHubAccessTokenRequest = { + gitHubAccessCode: "some", + gitHubAccessTokenBaseUrl: "some", + gitHubClientId: "some" + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.factories.getGitHubAccessToken( + resourceGroupName, + factoryName, + gitHubAccessTokenRequest + ); + console.log(result); +} + +factoriesGetGitHubAccessToken().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/factoriesList.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/factoriesList.ts new file mode 100644 index 000000000000..884cb07e076b --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/factoriesList.ts @@ -0,0 +1,31 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Lists factories under the specified subscription. + * + * @summary Lists factories under the specified subscription. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Factories_List.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function factoriesList() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.factories.list()) { + resArray.push(item); + } + console.log(resArray); +} + +factoriesList().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/factoriesListByResourceGroup.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/factoriesListByResourceGroup.ts new file mode 100644 index 000000000000..1acef1bba5cd --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/factoriesListByResourceGroup.ts @@ -0,0 +1,34 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Lists factories. + * + * @summary Lists factories. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Factories_ListByResourceGroup.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function factoriesListByResourceGroup() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.factories.listByResourceGroup( + resourceGroupName + )) { + resArray.push(item); + } + console.log(resArray); +} + +factoriesListByResourceGroup().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/factoriesUpdate.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/factoriesUpdate.ts new file mode 100644 index 000000000000..9ce5993ac416 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/factoriesUpdate.ts @@ -0,0 +1,40 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Updates a factory. + * + * @summary Updates a factory. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Factories_Update.json + */ +import { + FactoryUpdateParameters, + DataFactoryManagementClient +} from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function factoriesUpdate() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const factoryUpdateParameters: FactoryUpdateParameters = { + tags: { exampleTag: "exampleValue" } + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.factories.update( + resourceGroupName, + factoryName, + factoryUpdateParameters + ); + console.log(result); +} + +factoriesUpdate().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/getAPrivateEndpointConnectionForADatafactory.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/getAPrivateEndpointConnectionForADatafactory.ts new file mode 100644 index 000000000000..3ef0f5b1a82c --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/getAPrivateEndpointConnectionForADatafactory.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Gets a private endpoint connection + * + * @summary Gets a private endpoint connection + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/GetPrivateEndpointConnection.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function getAPrivateEndpointConnectionForADatafactory() { + const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const privateEndpointConnectionName = "connection"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.privateEndpointConnection.get( + resourceGroupName, + factoryName, + privateEndpointConnectionName + ); + console.log(result); +} + +getAPrivateEndpointConnectionForADatafactory().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/getPrivateLinkResourcesOfASite.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/getPrivateLinkResourcesOfASite.ts new file mode 100644 index 000000000000..b2ed45469574 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/getPrivateLinkResourcesOfASite.ts @@ -0,0 +1,33 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Gets the private link resources + * + * @summary Gets the private link resources + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/GetPrivateLinkResources.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function getPrivateLinkResourcesOfASite() { + const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.privateLinkResources.get( + resourceGroupName, + factoryName + ); + console.log(result); +} + +getPrivateLinkResourcesOfASite().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimeNodesGet.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimeNodesGet.ts new file mode 100644 index 000000000000..6976cd890e55 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimeNodesGet.ts @@ -0,0 +1,37 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Gets a self-hosted integration runtime node. + * + * @summary Gets a self-hosted integration runtime node. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimeNodes_Get.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function integrationRuntimeNodesGet() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const integrationRuntimeName = "exampleIntegrationRuntime"; + const nodeName = "Node_1"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.integrationRuntimeNodes.get( + resourceGroupName, + factoryName, + integrationRuntimeName, + nodeName + ); + console.log(result); +} + +integrationRuntimeNodesGet().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimeNodesGetIPAddress.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimeNodesGetIPAddress.ts new file mode 100644 index 000000000000..6efd6178154b --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimeNodesGetIPAddress.ts @@ -0,0 +1,37 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Get the IP address of self-hosted integration runtime node. + * + * @summary Get the IP address of self-hosted integration runtime node. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimeNodes_GetIpAddress.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function integrationRuntimeNodesGetIPAddress() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const integrationRuntimeName = "exampleIntegrationRuntime"; + const nodeName = "Node_1"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.integrationRuntimeNodes.getIpAddress( + resourceGroupName, + factoryName, + integrationRuntimeName, + nodeName + ); + console.log(result); +} + +integrationRuntimeNodesGetIPAddress().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimeNodesUpdate.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimeNodesUpdate.ts new file mode 100644 index 000000000000..3a72624cd522 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimeNodesUpdate.ts @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Updates a self-hosted integration runtime node. + * + * @summary Updates a self-hosted integration runtime node. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimeNodes_Update.json + */ +import { + UpdateIntegrationRuntimeNodeRequest, + DataFactoryManagementClient +} from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function integrationRuntimeNodesUpdate() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const integrationRuntimeName = "exampleIntegrationRuntime"; + const nodeName = "Node_1"; + const updateIntegrationRuntimeNodeRequest: UpdateIntegrationRuntimeNodeRequest = { + concurrentJobsLimit: 2 + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.integrationRuntimeNodes.update( + resourceGroupName, + factoryName, + integrationRuntimeName, + nodeName, + updateIntegrationRuntimeNodeRequest + ); + console.log(result); +} + +integrationRuntimeNodesUpdate().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimeObjectMetadataGet.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimeObjectMetadataGet.ts new file mode 100644 index 000000000000..530e3c030aca --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimeObjectMetadataGet.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Get a SSIS integration runtime object metadata by specified path. The return is pageable metadata list. + * + * @summary Get a SSIS integration runtime object metadata by specified path. The return is pageable metadata list. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimeObjectMetadata_Get.json + */ +import { + GetSsisObjectMetadataRequest, + DataFactoryManagementClient +} from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function integrationRuntimeObjectMetadataGet() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const integrationRuntimeName = "testactivityv2"; + const getMetadataRequest: GetSsisObjectMetadataRequest = { + metadataPath: "ssisFolders" + }; + const options = { getMetadataRequest: getMetadataRequest }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.integrationRuntimeObjectMetadata.get( + resourceGroupName, + factoryName, + integrationRuntimeName, + options + ); + console.log(result); +} + +integrationRuntimeObjectMetadataGet().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimeObjectMetadataRefresh.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimeObjectMetadataRefresh.ts new file mode 100644 index 000000000000..928e241c6ff4 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimeObjectMetadataRefresh.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Refresh a SSIS integration runtime object metadata. + * + * @summary Refresh a SSIS integration runtime object metadata. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimeObjectMetadata_Refresh.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function integrationRuntimeObjectMetadataRefresh() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const integrationRuntimeName = "testactivityv2"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.integrationRuntimeObjectMetadata.beginRefreshAndWait( + resourceGroupName, + factoryName, + integrationRuntimeName + ); + console.log(result); +} + +integrationRuntimeObjectMetadataRefresh().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesCreate.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesCreate.ts new file mode 100644 index 000000000000..3304cae29725 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesCreate.ts @@ -0,0 +1,45 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Creates or updates an integration runtime. + * + * @summary Creates or updates an integration runtime. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_Create.json + */ +import { + IntegrationRuntimeResource, + DataFactoryManagementClient +} from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function integrationRuntimesCreate() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const integrationRuntimeName = "exampleIntegrationRuntime"; + const integrationRuntime: IntegrationRuntimeResource = { + properties: { + type: "SelfHosted", + description: "A selfhosted integration runtime" + } + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.integrationRuntimes.createOrUpdate( + resourceGroupName, + factoryName, + integrationRuntimeName, + integrationRuntime + ); + console.log(result); +} + +integrationRuntimesCreate().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesCreateLinkedIntegrationRuntime.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesCreateLinkedIntegrationRuntime.ts new file mode 100644 index 000000000000..14e8a8ed4306 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesCreateLinkedIntegrationRuntime.ts @@ -0,0 +1,45 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Create a linked integration runtime entry in a shared integration runtime. + * + * @summary Create a linked integration runtime entry in a shared integration runtime. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_CreateLinkedIntegrationRuntime.json + */ +import { + CreateLinkedIntegrationRuntimeRequest, + DataFactoryManagementClient +} from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function integrationRuntimesCreateLinkedIntegrationRuntime() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const integrationRuntimeName = "exampleIntegrationRuntime"; + const createLinkedIntegrationRuntimeRequest: CreateLinkedIntegrationRuntimeRequest = { + name: "bfa92911-9fb6-4fbe-8f23-beae87bc1c83", + dataFactoryLocation: "West US", + dataFactoryName: "e9955d6d-56ea-4be3-841c-52a12c1a9981", + subscriptionId: "061774c7-4b5a-4159-a55b-365581830283" + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.integrationRuntimes.createLinkedIntegrationRuntime( + resourceGroupName, + factoryName, + integrationRuntimeName, + createLinkedIntegrationRuntimeRequest + ); + console.log(result); +} + +integrationRuntimesCreateLinkedIntegrationRuntime().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesDelete.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesDelete.ts new file mode 100644 index 000000000000..abcd62f9ef84 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesDelete.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Deletes an integration runtime. + * + * @summary Deletes an integration runtime. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_Delete.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function integrationRuntimesDelete() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const integrationRuntimeName = "exampleIntegrationRuntime"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.integrationRuntimes.delete( + resourceGroupName, + factoryName, + integrationRuntimeName + ); + console.log(result); +} + +integrationRuntimesDelete().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesGet.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesGet.ts new file mode 100644 index 000000000000..ed92ad0d2e56 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesGet.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Gets an integration runtime. + * + * @summary Gets an integration runtime. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_Get.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function integrationRuntimesGet() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const integrationRuntimeName = "exampleIntegrationRuntime"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.integrationRuntimes.get( + resourceGroupName, + factoryName, + integrationRuntimeName + ); + console.log(result); +} + +integrationRuntimesGet().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesGetConnectionInfo.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesGetConnectionInfo.ts new file mode 100644 index 000000000000..934720d526e8 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesGetConnectionInfo.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Gets the on-premises integration runtime connection information for encrypting the on-premises data source credentials. + * + * @summary Gets the on-premises integration runtime connection information for encrypting the on-premises data source credentials. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_GetConnectionInfo.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function integrationRuntimesGetConnectionInfo() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const integrationRuntimeName = "exampleIntegrationRuntime"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.integrationRuntimes.getConnectionInfo( + resourceGroupName, + factoryName, + integrationRuntimeName + ); + console.log(result); +} + +integrationRuntimesGetConnectionInfo().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesGetMonitoringData.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesGetMonitoringData.ts new file mode 100644 index 000000000000..7136d1d11334 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesGetMonitoringData.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Get the integration runtime monitoring data, which includes the monitor data for all the nodes under this integration runtime. + * + * @summary Get the integration runtime monitoring data, which includes the monitor data for all the nodes under this integration runtime. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_GetMonitoringData.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function integrationRuntimesGetMonitoringData() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const integrationRuntimeName = "exampleIntegrationRuntime"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.integrationRuntimes.getMonitoringData( + resourceGroupName, + factoryName, + integrationRuntimeName + ); + console.log(result); +} + +integrationRuntimesGetMonitoringData().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesGetStatus.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesGetStatus.ts new file mode 100644 index 000000000000..177ca7074268 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesGetStatus.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Gets detailed status information for an integration runtime. + * + * @summary Gets detailed status information for an integration runtime. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_GetStatus.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function integrationRuntimesGetStatus() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const integrationRuntimeName = "exampleIntegrationRuntime"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.integrationRuntimes.getStatus( + resourceGroupName, + factoryName, + integrationRuntimeName + ); + console.log(result); +} + +integrationRuntimesGetStatus().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesListAuthKeys.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesListAuthKeys.ts new file mode 100644 index 000000000000..27882b60be46 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesListAuthKeys.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Retrieves the authentication keys for an integration runtime. + * + * @summary Retrieves the authentication keys for an integration runtime. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_ListAuthKeys.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function integrationRuntimesListAuthKeys() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const integrationRuntimeName = "exampleIntegrationRuntime"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.integrationRuntimes.listAuthKeys( + resourceGroupName, + factoryName, + integrationRuntimeName + ); + console.log(result); +} + +integrationRuntimesListAuthKeys().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesListByFactory.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesListByFactory.ts new file mode 100644 index 000000000000..02189b190064 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesListByFactory.ts @@ -0,0 +1,36 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Lists integration runtimes. + * + * @summary Lists integration runtimes. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_ListByFactory.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function integrationRuntimesListByFactory() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.integrationRuntimes.listByFactory( + resourceGroupName, + factoryName + )) { + resArray.push(item); + } + console.log(resArray); +} + +integrationRuntimesListByFactory().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesNodesDelete.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesNodesDelete.ts new file mode 100644 index 000000000000..bdb70425ed5b --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesNodesDelete.ts @@ -0,0 +1,37 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Deletes a self-hosted integration runtime node. + * + * @summary Deletes a self-hosted integration runtime node. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimeNodes_Delete.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function integrationRuntimesNodesDelete() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const integrationRuntimeName = "exampleIntegrationRuntime"; + const nodeName = "Node_1"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.integrationRuntimeNodes.delete( + resourceGroupName, + factoryName, + integrationRuntimeName, + nodeName + ); + console.log(result); +} + +integrationRuntimesNodesDelete().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesOutboundNetworkDependenciesEndpoints.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesOutboundNetworkDependenciesEndpoints.ts new file mode 100644 index 000000000000..23d407aaccb0 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesOutboundNetworkDependenciesEndpoints.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Gets the list of outbound network dependencies for a given Azure-SSIS integration runtime. + * + * @summary Gets the list of outbound network dependencies for a given Azure-SSIS integration runtime. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_ListOutboundNetworkDependenciesEndpoints.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function integrationRuntimesOutboundNetworkDependenciesEndpoints() { + const subscriptionId = "7ad7c73b-38b8-4df3-84ee-52ff91092f61"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const integrationRuntimeName = "exampleIntegrationRuntime"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.integrationRuntimes.listOutboundNetworkDependenciesEndpoints( + resourceGroupName, + factoryName, + integrationRuntimeName + ); + console.log(result); +} + +integrationRuntimesOutboundNetworkDependenciesEndpoints().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesRegenerateAuthKey.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesRegenerateAuthKey.ts new file mode 100644 index 000000000000..71b9a3997684 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesRegenerateAuthKey.ts @@ -0,0 +1,42 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Regenerates the authentication key for an integration runtime. + * + * @summary Regenerates the authentication key for an integration runtime. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_RegenerateAuthKey.json + */ +import { + IntegrationRuntimeRegenerateKeyParameters, + DataFactoryManagementClient +} from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function integrationRuntimesRegenerateAuthKey() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const integrationRuntimeName = "exampleIntegrationRuntime"; + const regenerateKeyParameters: IntegrationRuntimeRegenerateKeyParameters = { + keyName: "authKey2" + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.integrationRuntimes.regenerateAuthKey( + resourceGroupName, + factoryName, + integrationRuntimeName, + regenerateKeyParameters + ); + console.log(result); +} + +integrationRuntimesRegenerateAuthKey().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesStart.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesStart.ts new file mode 100644 index 000000000000..a295f9505706 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesStart.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Starts a ManagedReserved type integration runtime. + * + * @summary Starts a ManagedReserved type integration runtime. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_Start.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function integrationRuntimesStart() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const integrationRuntimeName = "exampleManagedIntegrationRuntime"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.integrationRuntimes.beginStartAndWait( + resourceGroupName, + factoryName, + integrationRuntimeName + ); + console.log(result); +} + +integrationRuntimesStart().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesStop.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesStop.ts new file mode 100644 index 000000000000..783fc05e8021 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesStop.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Stops a ManagedReserved type integration runtime. + * + * @summary Stops a ManagedReserved type integration runtime. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_Stop.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function integrationRuntimesStop() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const integrationRuntimeName = "exampleManagedIntegrationRuntime"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.integrationRuntimes.beginStopAndWait( + resourceGroupName, + factoryName, + integrationRuntimeName + ); + console.log(result); +} + +integrationRuntimesStop().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesSyncCredentials.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesSyncCredentials.ts new file mode 100644 index 000000000000..29dad8ce1dd8 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesSyncCredentials.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Force the integration runtime to synchronize credentials across integration runtime nodes, and this will override the credentials across all worker nodes with those available on the dispatcher node. If you already have the latest credential backup file, you should manually import it (preferred) on any self-hosted integration runtime node than using this API directly. + * + * @summary Force the integration runtime to synchronize credentials across integration runtime nodes, and this will override the credentials across all worker nodes with those available on the dispatcher node. If you already have the latest credential backup file, you should manually import it (preferred) on any self-hosted integration runtime node than using this API directly. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_SyncCredentials.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function integrationRuntimesSyncCredentials() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const integrationRuntimeName = "exampleIntegrationRuntime"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.integrationRuntimes.syncCredentials( + resourceGroupName, + factoryName, + integrationRuntimeName + ); + console.log(result); +} + +integrationRuntimesSyncCredentials().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesUpdate.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesUpdate.ts new file mode 100644 index 000000000000..ec6dac37aabf --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesUpdate.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Updates an integration runtime. + * + * @summary Updates an integration runtime. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_Update.json + */ +import { + UpdateIntegrationRuntimeRequest, + DataFactoryManagementClient +} from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function integrationRuntimesUpdate() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const integrationRuntimeName = "exampleIntegrationRuntime"; + const updateIntegrationRuntimeRequest: UpdateIntegrationRuntimeRequest = { + autoUpdate: "Off", + updateDelayOffset: '"PT3H"' + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.integrationRuntimes.update( + resourceGroupName, + factoryName, + integrationRuntimeName, + updateIntegrationRuntimeRequest + ); + console.log(result); +} + +integrationRuntimesUpdate().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesUpgrade.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesUpgrade.ts new file mode 100644 index 000000000000..b083284d4ccb --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/integrationRuntimesUpgrade.ts @@ -0,0 +1,42 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Remove all linked integration runtimes under specific data factory in a self-hosted integration runtime. + * + * @summary Remove all linked integration runtimes under specific data factory in a self-hosted integration runtime. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_RemoveLinks.json + */ +import { + LinkedIntegrationRuntimeRequest, + DataFactoryManagementClient +} from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function integrationRuntimesUpgrade() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const integrationRuntimeName = "exampleIntegrationRuntime"; + const linkedIntegrationRuntimeRequest: LinkedIntegrationRuntimeRequest = { + linkedFactoryName: "exampleFactoryName-linked" + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.integrationRuntimes.removeLinks( + resourceGroupName, + factoryName, + integrationRuntimeName, + linkedIntegrationRuntimeRequest + ); + console.log(result); +} + +integrationRuntimesUpgrade().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/linkedServicesCreate.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/linkedServicesCreate.ts new file mode 100644 index 000000000000..6efed15f2b45 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/linkedServicesCreate.ts @@ -0,0 +1,49 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Creates or updates a linked service. + * + * @summary Creates or updates a linked service. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/LinkedServices_Create.json + */ +import { + LinkedServiceResource, + DataFactoryManagementClient +} from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function linkedServicesCreate() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const linkedServiceName = "exampleLinkedService"; + const linkedService: LinkedServiceResource = { + properties: { + type: "AzureStorage", + connectionString: { + type: "SecureString", + value: + "DefaultEndpointsProtocol=https;AccountName=examplestorageaccount;AccountKey=" + } + } + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.linkedServices.createOrUpdate( + resourceGroupName, + factoryName, + linkedServiceName, + linkedService + ); + console.log(result); +} + +linkedServicesCreate().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/linkedServicesDelete.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/linkedServicesDelete.ts new file mode 100644 index 000000000000..72e31329b5bb --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/linkedServicesDelete.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Deletes a linked service. + * + * @summary Deletes a linked service. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/LinkedServices_Delete.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function linkedServicesDelete() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const linkedServiceName = "exampleLinkedService"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.linkedServices.delete( + resourceGroupName, + factoryName, + linkedServiceName + ); + console.log(result); +} + +linkedServicesDelete().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/linkedServicesGet.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/linkedServicesGet.ts new file mode 100644 index 000000000000..2fcec3406e69 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/linkedServicesGet.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Gets a linked service. + * + * @summary Gets a linked service. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/LinkedServices_Get.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function linkedServicesGet() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const linkedServiceName = "exampleLinkedService"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.linkedServices.get( + resourceGroupName, + factoryName, + linkedServiceName + ); + console.log(result); +} + +linkedServicesGet().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/linkedServicesListByFactory.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/linkedServicesListByFactory.ts new file mode 100644 index 000000000000..a772f2443756 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/linkedServicesListByFactory.ts @@ -0,0 +1,36 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Lists linked services. + * + * @summary Lists linked services. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/LinkedServices_ListByFactory.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function linkedServicesListByFactory() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.linkedServices.listByFactory( + resourceGroupName, + factoryName + )) { + resArray.push(item); + } + console.log(resArray); +} + +linkedServicesListByFactory().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/linkedServicesUpdate.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/linkedServicesUpdate.ts new file mode 100644 index 000000000000..2a6bedc4719b --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/linkedServicesUpdate.ts @@ -0,0 +1,50 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Creates or updates a linked service. + * + * @summary Creates or updates a linked service. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/LinkedServices_Update.json + */ +import { + LinkedServiceResource, + DataFactoryManagementClient +} from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function linkedServicesUpdate() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const linkedServiceName = "exampleLinkedService"; + const linkedService: LinkedServiceResource = { + properties: { + type: "AzureStorage", + description: "Example description", + connectionString: { + type: "SecureString", + value: + "DefaultEndpointsProtocol=https;AccountName=examplestorageaccount;AccountKey=" + } + } + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.linkedServices.createOrUpdate( + resourceGroupName, + factoryName, + linkedServiceName, + linkedService + ); + console.log(result); +} + +linkedServicesUpdate().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/managedPrivateEndpointsGet.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/managedPrivateEndpointsGet.ts new file mode 100644 index 000000000000..b13905f9a74c --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/managedPrivateEndpointsGet.ts @@ -0,0 +1,37 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Gets a managed private endpoint. + * + * @summary Gets a managed private endpoint. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ManagedPrivateEndpoints_Get.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function managedPrivateEndpointsGet() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const managedVirtualNetworkName = "exampleManagedVirtualNetworkName"; + const managedPrivateEndpointName = "exampleManagedPrivateEndpointName"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.managedPrivateEndpoints.get( + resourceGroupName, + factoryName, + managedVirtualNetworkName, + managedPrivateEndpointName + ); + console.log(result); +} + +managedPrivateEndpointsGet().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/managedPrivateEndpointsListByFactory.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/managedPrivateEndpointsListByFactory.ts new file mode 100644 index 000000000000..89a7ebcb1f5f --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/managedPrivateEndpointsListByFactory.ts @@ -0,0 +1,38 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Lists managed private endpoints. + * + * @summary Lists managed private endpoints. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ManagedPrivateEndpoints_ListByFactory.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function managedPrivateEndpointsListByFactory() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const managedVirtualNetworkName = "exampleManagedVirtualNetworkName"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.managedPrivateEndpoints.listByFactory( + resourceGroupName, + factoryName, + managedVirtualNetworkName + )) { + resArray.push(item); + } + console.log(resArray); +} + +managedPrivateEndpointsListByFactory().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/managedVirtualNetworksCreate.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/managedVirtualNetworksCreate.ts new file mode 100644 index 000000000000..5df96460ef61 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/managedVirtualNetworksCreate.ts @@ -0,0 +1,49 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Creates or updates a managed private endpoint. + * + * @summary Creates or updates a managed private endpoint. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ManagedPrivateEndpoints_Create.json + */ +import { + ManagedPrivateEndpointResource, + DataFactoryManagementClient +} from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function managedVirtualNetworksCreate() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const managedVirtualNetworkName = "exampleManagedVirtualNetworkName"; + const managedPrivateEndpointName = "exampleManagedPrivateEndpointName"; + const managedPrivateEndpoint: ManagedPrivateEndpointResource = { + properties: { + fqdns: [], + groupId: "blob", + privateLinkResourceId: + "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.Storage/storageAccounts/exampleBlobStorage" + } + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.managedPrivateEndpoints.createOrUpdate( + resourceGroupName, + factoryName, + managedVirtualNetworkName, + managedPrivateEndpointName, + managedPrivateEndpoint + ); + console.log(result); +} + +managedVirtualNetworksCreate().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/managedVirtualNetworksDelete.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/managedVirtualNetworksDelete.ts new file mode 100644 index 000000000000..77f635359ea8 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/managedVirtualNetworksDelete.ts @@ -0,0 +1,37 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Deletes a managed private endpoint. + * + * @summary Deletes a managed private endpoint. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ManagedPrivateEndpoints_Delete.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function managedVirtualNetworksDelete() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const managedVirtualNetworkName = "exampleManagedVirtualNetworkName"; + const managedPrivateEndpointName = "exampleManagedPrivateEndpointName"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.managedPrivateEndpoints.delete( + resourceGroupName, + factoryName, + managedVirtualNetworkName, + managedPrivateEndpointName + ); + console.log(result); +} + +managedVirtualNetworksDelete().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/managedVirtualNetworksGet.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/managedVirtualNetworksGet.ts new file mode 100644 index 000000000000..255e215b0991 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/managedVirtualNetworksGet.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Gets a managed Virtual Network. + * + * @summary Gets a managed Virtual Network. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ManagedVirtualNetworks_Get.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function managedVirtualNetworksGet() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const managedVirtualNetworkName = "exampleManagedVirtualNetworkName"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.managedVirtualNetworks.get( + resourceGroupName, + factoryName, + managedVirtualNetworkName + ); + console.log(result); +} + +managedVirtualNetworksGet().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/managedVirtualNetworksListByFactory.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/managedVirtualNetworksListByFactory.ts new file mode 100644 index 000000000000..4a550e8c6011 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/managedVirtualNetworksListByFactory.ts @@ -0,0 +1,36 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Lists managed Virtual Networks. + * + * @summary Lists managed Virtual Networks. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ManagedVirtualNetworks_ListByFactory.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function managedVirtualNetworksListByFactory() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.managedVirtualNetworks.listByFactory( + resourceGroupName, + factoryName + )) { + resArray.push(item); + } + console.log(resArray); +} + +managedVirtualNetworksListByFactory().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/operationsList.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/operationsList.ts new file mode 100644 index 000000000000..0d4259f2c520 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/operationsList.ts @@ -0,0 +1,31 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Lists the available Azure Data Factory API operations. + * + * @summary Lists the available Azure Data Factory API operations. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Operations_List.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function operationsList() { + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.operations.list()) { + resArray.push(item); + } + console.log(resArray); +} + +operationsList().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/pipelineRunsCancel.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/pipelineRunsCancel.ts new file mode 100644 index 000000000000..944058bd1904 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/pipelineRunsCancel.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Cancel a pipeline run by its run ID. + * + * @summary Cancel a pipeline run by its run ID. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/PipelineRuns_Cancel.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function pipelineRunsCancel() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const runId = "16ac5348-ff82-4f95-a80d-638c1d47b721"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.pipelineRuns.cancel( + resourceGroupName, + factoryName, + runId + ); + console.log(result); +} + +pipelineRunsCancel().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/pipelineRunsGet.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/pipelineRunsGet.ts new file mode 100644 index 000000000000..e6e2d80b8f3d --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/pipelineRunsGet.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Get a pipeline run by its run ID. + * + * @summary Get a pipeline run by its run ID. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/PipelineRuns_Get.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function pipelineRunsGet() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const runId = "2f7fdb90-5df1-4b8e-ac2f-064cfa58202b"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.pipelineRuns.get( + resourceGroupName, + factoryName, + runId + ); + console.log(result); +} + +pipelineRunsGet().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/pipelineRunsQueryByFactory.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/pipelineRunsQueryByFactory.ts new file mode 100644 index 000000000000..fe068725d8c0 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/pipelineRunsQueryByFactory.ts @@ -0,0 +1,48 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Query pipeline runs in the factory based on input filter conditions. + * + * @summary Query pipeline runs in the factory based on input filter conditions. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/PipelineRuns_QueryByFactory.json + */ +import { + RunFilterParameters, + DataFactoryManagementClient +} from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function pipelineRunsQueryByFactory() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const filterParameters: RunFilterParameters = { + filters: [ + { + operand: "PipelineName", + operator: "Equals", + values: ["examplePipeline"] + } + ], + lastUpdatedAfter: new Date("2018-06-16T00:36:44.3345758Z"), + lastUpdatedBefore: new Date("2018-06-16T00:49:48.3686473Z") + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.pipelineRuns.queryByFactory( + resourceGroupName, + factoryName, + filterParameters + ); + console.log(result); +} + +pipelineRunsQueryByFactory().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/pipelinesCreate.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/pipelinesCreate.ts new file mode 100644 index 000000000000..b3b34894f0fe --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/pipelinesCreate.ts @@ -0,0 +1,90 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Creates or updates a pipeline. + * + * @summary Creates or updates a pipeline. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Pipelines_Create.json + */ +import { + PipelineResource, + DataFactoryManagementClient +} from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function pipelinesCreate() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const pipelineName = "examplePipeline"; + const pipeline: PipelineResource = { + activities: [ + { + name: "ExampleForeachActivity", + type: "ForEach", + activities: [ + { + name: "ExampleCopyActivity", + type: "Copy", + dataIntegrationUnits: 32, + inputs: [ + { + type: "DatasetReference", + parameters: { + myFileName: "examplecontainer.csv", + myFolderPath: "examplecontainer" + }, + referenceName: "exampleDataset" + } + ], + outputs: [ + { + type: "DatasetReference", + parameters: { + myFileName: { type: "Expression", value: "@item()" }, + myFolderPath: "examplecontainer" + }, + referenceName: "exampleDataset" + } + ], + sink: { type: "BlobSink" }, + source: { type: "BlobSource" } + } + ], + isSequential: true, + items: { + type: "Expression", + value: "@pipeline().parameters.OutputBlobNameList" + } + } + ], + parameters: { + jobId: { type: "String" }, + outputBlobNameList: { type: "Array" } + }, + policy: { elapsedTimeMetric: { duration: "0.00:10:00" } }, + runDimensions: { + jobId: { type: "Expression", value: "@pipeline().parameters.JobId" } + }, + variables: { testVariableArray: { type: "Array" } } + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.pipelines.createOrUpdate( + resourceGroupName, + factoryName, + pipelineName, + pipeline + ); + console.log(result); +} + +pipelinesCreate().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/pipelinesCreateRun.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/pipelinesCreateRun.ts new file mode 100644 index 000000000000..0d58f0646fe5 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/pipelinesCreateRun.ts @@ -0,0 +1,47 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Creates a run of a pipeline. + * + * @summary Creates a run of a pipeline. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Pipelines_CreateRun.json + */ +import { + ParameterValueSpecification, + DataFactoryManagementClient +} from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function pipelinesCreateRun() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const pipelineName = "examplePipeline"; + const referencePipelineRunId = undefined; + const parameters: ParameterValueSpecification = { + outputBlobNameList: ["exampleoutput.csv"] + }; + const options = { + referencePipelineRunId: referencePipelineRunId, + parameters: parameters + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.pipelines.createRun( + resourceGroupName, + factoryName, + pipelineName, + options + ); + console.log(result); +} + +pipelinesCreateRun().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/pipelinesDelete.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/pipelinesDelete.ts new file mode 100644 index 000000000000..a2152296a29d --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/pipelinesDelete.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Deletes a pipeline. + * + * @summary Deletes a pipeline. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Pipelines_Delete.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function pipelinesDelete() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const pipelineName = "examplePipeline"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.pipelines.delete( + resourceGroupName, + factoryName, + pipelineName + ); + console.log(result); +} + +pipelinesDelete().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/pipelinesGet.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/pipelinesGet.ts new file mode 100644 index 000000000000..c023210f1e3b --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/pipelinesGet.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Gets a pipeline. + * + * @summary Gets a pipeline. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Pipelines_Get.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function pipelinesGet() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const pipelineName = "examplePipeline"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.pipelines.get( + resourceGroupName, + factoryName, + pipelineName + ); + console.log(result); +} + +pipelinesGet().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/pipelinesListByFactory.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/pipelinesListByFactory.ts new file mode 100644 index 000000000000..2a322acec4de --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/pipelinesListByFactory.ts @@ -0,0 +1,36 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Lists pipelines. + * + * @summary Lists pipelines. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Pipelines_ListByFactory.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function pipelinesListByFactory() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.pipelines.listByFactory( + resourceGroupName, + factoryName + )) { + resArray.push(item); + } + console.log(resArray); +} + +pipelinesListByFactory().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/pipelinesUpdate.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/pipelinesUpdate.ts new file mode 100644 index 000000000000..f941123f8e22 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/pipelinesUpdate.ts @@ -0,0 +1,84 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Creates or updates a pipeline. + * + * @summary Creates or updates a pipeline. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Pipelines_Update.json + */ +import { + PipelineResource, + DataFactoryManagementClient +} from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function pipelinesUpdate() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const pipelineName = "examplePipeline"; + const pipeline: PipelineResource = { + description: "Example description", + activities: [ + { + name: "ExampleForeachActivity", + type: "ForEach", + activities: [ + { + name: "ExampleCopyActivity", + type: "Copy", + dataIntegrationUnits: 32, + inputs: [ + { + type: "DatasetReference", + parameters: { + myFileName: "examplecontainer.csv", + myFolderPath: "examplecontainer" + }, + referenceName: "exampleDataset" + } + ], + outputs: [ + { + type: "DatasetReference", + parameters: { + myFileName: { type: "Expression", value: "@item()" }, + myFolderPath: "examplecontainer" + }, + referenceName: "exampleDataset" + } + ], + sink: { type: "BlobSink" }, + source: { type: "BlobSource" } + } + ], + isSequential: true, + items: { + type: "Expression", + value: "@pipeline().parameters.OutputBlobNameList" + } + } + ], + parameters: { outputBlobNameList: { type: "Array" } }, + policy: { elapsedTimeMetric: { duration: "0.00:10:00" } } + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.pipelines.createOrUpdate( + resourceGroupName, + factoryName, + pipelineName, + pipeline + ); + console.log(result); +} + +pipelinesUpdate().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/privateEndPointConnectionsListByFactory.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/privateEndPointConnectionsListByFactory.ts new file mode 100644 index 000000000000..bfae373cf910 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/privateEndPointConnectionsListByFactory.ts @@ -0,0 +1,36 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Lists Private endpoint connections + * + * @summary Lists Private endpoint connections + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/PrivateEndPointConnections_ListByFactory.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function privateEndPointConnectionsListByFactory() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.privateEndPointConnections.listByFactory( + resourceGroupName, + factoryName + )) { + resArray.push(item); + } + console.log(resArray); +} + +privateEndPointConnectionsListByFactory().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/triggerRunsQueryByFactory.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/triggerRunsQueryByFactory.ts new file mode 100644 index 000000000000..edd356661e89 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/triggerRunsQueryByFactory.ts @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Query trigger runs. + * + * @summary Query trigger runs. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/TriggerRuns_QueryByFactory.json + */ +import { + RunFilterParameters, + DataFactoryManagementClient +} from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function triggerRunsQueryByFactory() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const filterParameters: RunFilterParameters = { + filters: [ + { operand: "TriggerName", operator: "Equals", values: ["exampleTrigger"] } + ], + lastUpdatedAfter: new Date("2018-06-16T00:36:44.3345758Z"), + lastUpdatedBefore: new Date("2018-06-16T00:49:48.3686473Z") + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.triggerRuns.queryByFactory( + resourceGroupName, + factoryName, + filterParameters + ); + console.log(result); +} + +triggerRunsQueryByFactory().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/triggersCancel.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/triggersCancel.ts new file mode 100644 index 000000000000..3e86cdd2c132 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/triggersCancel.ts @@ -0,0 +1,37 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Cancel a single trigger instance by runId. + * + * @summary Cancel a single trigger instance by runId. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/TriggerRuns_Cancel.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function triggersCancel() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const triggerName = "exampleTrigger"; + const runId = "2f7fdb90-5df1-4b8e-ac2f-064cfa58202b"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.triggerRuns.cancel( + resourceGroupName, + factoryName, + triggerName, + runId + ); + console.log(result); +} + +triggersCancel().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/triggersCreate.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/triggersCreate.ts new file mode 100644 index 000000000000..7285d32ec201 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/triggersCreate.ts @@ -0,0 +1,60 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Creates or updates a trigger. + * + * @summary Creates or updates a trigger. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_Create.json + */ +import { + TriggerResource, + DataFactoryManagementClient +} from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function triggersCreate() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const triggerName = "exampleTrigger"; + const trigger: TriggerResource = { + properties: { + type: "ScheduleTrigger", + pipelines: [ + { + parameters: { outputBlobNameList: ["exampleoutput.csv"] }, + pipelineReference: { + type: "PipelineReference", + referenceName: "examplePipeline" + } + } + ], + recurrence: { + endTime: new Date("2018-06-16T00:55:13.8441801Z"), + frequency: "Minute", + interval: 4, + startTime: new Date("2018-06-16T00:39:13.8441801Z"), + timeZone: "UTC" + } + } + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.triggers.createOrUpdate( + resourceGroupName, + factoryName, + triggerName, + trigger + ); + console.log(result); +} + +triggersCreate().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/triggersDelete.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/triggersDelete.ts new file mode 100644 index 000000000000..b45d1a02f60c --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/triggersDelete.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Deletes a trigger. + * + * @summary Deletes a trigger. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_Delete.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function triggersDelete() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const triggerName = "exampleTrigger"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.triggers.delete( + resourceGroupName, + factoryName, + triggerName + ); + console.log(result); +} + +triggersDelete().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/triggersGet.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/triggersGet.ts new file mode 100644 index 000000000000..bd136ee515c1 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/triggersGet.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Gets a trigger. + * + * @summary Gets a trigger. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_Get.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function triggersGet() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const triggerName = "exampleTrigger"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.triggers.get( + resourceGroupName, + factoryName, + triggerName + ); + console.log(result); +} + +triggersGet().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/triggersGetEventSubscriptionStatus.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/triggersGetEventSubscriptionStatus.ts new file mode 100644 index 000000000000..377e1c94f9a3 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/triggersGetEventSubscriptionStatus.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Get a trigger's event subscription status. + * + * @summary Get a trigger's event subscription status. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_GetEventSubscriptionStatus.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function triggersGetEventSubscriptionStatus() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const triggerName = "exampleTrigger"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.triggers.getEventSubscriptionStatus( + resourceGroupName, + factoryName, + triggerName + ); + console.log(result); +} + +triggersGetEventSubscriptionStatus().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/triggersListByFactory.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/triggersListByFactory.ts new file mode 100644 index 000000000000..01bb10bf056e --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/triggersListByFactory.ts @@ -0,0 +1,36 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Lists triggers. + * + * @summary Lists triggers. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_ListByFactory.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function triggersListByFactory() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.triggers.listByFactory( + resourceGroupName, + factoryName + )) { + resArray.push(item); + } + console.log(resArray); +} + +triggersListByFactory().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/triggersQueryByFactory.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/triggersQueryByFactory.ts new file mode 100644 index 000000000000..c24ab77c5d57 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/triggersQueryByFactory.ts @@ -0,0 +1,40 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Query triggers. + * + * @summary Query triggers. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_QueryByFactory.json + */ +import { + TriggerFilterParameters, + DataFactoryManagementClient +} from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function triggersQueryByFactory() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const filterParameters: TriggerFilterParameters = { + parentTriggerName: "exampleTrigger" + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.triggers.queryByFactory( + resourceGroupName, + factoryName, + filterParameters + ); + console.log(result); +} + +triggersQueryByFactory().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/triggersRerun.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/triggersRerun.ts new file mode 100644 index 000000000000..2873de02b6be --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/triggersRerun.ts @@ -0,0 +1,37 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Rerun single trigger instance by runId. + * + * @summary Rerun single trigger instance by runId. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/TriggerRuns_Rerun.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function triggersRerun() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const triggerName = "exampleTrigger"; + const runId = "2f7fdb90-5df1-4b8e-ac2f-064cfa58202b"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.triggerRuns.rerun( + resourceGroupName, + factoryName, + triggerName, + runId + ); + console.log(result); +} + +triggersRerun().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/triggersStart.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/triggersStart.ts new file mode 100644 index 000000000000..4c09a67caf28 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/triggersStart.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Starts a trigger. + * + * @summary Starts a trigger. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_Start.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function triggersStart() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const triggerName = "exampleTrigger"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.triggers.beginStartAndWait( + resourceGroupName, + factoryName, + triggerName + ); + console.log(result); +} + +triggersStart().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/triggersStop.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/triggersStop.ts new file mode 100644 index 000000000000..01f43e2c9213 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/triggersStop.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Stops a trigger. + * + * @summary Stops a trigger. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_Stop.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function triggersStop() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const triggerName = "exampleTrigger"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.triggers.beginStopAndWait( + resourceGroupName, + factoryName, + triggerName + ); + console.log(result); +} + +triggersStop().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/triggersSubscribeToEvents.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/triggersSubscribeToEvents.ts new file mode 100644 index 000000000000..f0fb5ec2eb24 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/triggersSubscribeToEvents.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Subscribe event trigger to events. + * + * @summary Subscribe event trigger to events. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_SubscribeToEvents.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function triggersSubscribeToEvents() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const triggerName = "exampleTrigger"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.triggers.beginSubscribeToEventsAndWait( + resourceGroupName, + factoryName, + triggerName + ); + console.log(result); +} + +triggersSubscribeToEvents().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/triggersUnsubscribeFromEvents.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/triggersUnsubscribeFromEvents.ts new file mode 100644 index 000000000000..ee8887b78e93 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/triggersUnsubscribeFromEvents.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Unsubscribe event trigger from events. + * + * @summary Unsubscribe event trigger from events. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_UnsubscribeFromEvents.json + */ +import { DataFactoryManagementClient } from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function triggersUnsubscribeFromEvents() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const triggerName = "exampleTrigger"; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.triggers.beginUnsubscribeFromEventsAndWait( + resourceGroupName, + factoryName, + triggerName + ); + console.log(result); +} + +triggersUnsubscribeFromEvents().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/triggersUpdate.ts b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/triggersUpdate.ts new file mode 100644 index 000000000000..9ecb809db909 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/src/triggersUpdate.ts @@ -0,0 +1,61 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * This sample demonstrates how to Creates or updates a trigger. + * + * @summary Creates or updates a trigger. + * x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_Update.json + */ +import { + TriggerResource, + DataFactoryManagementClient +} from "@azure/arm-datafactory"; +import { DefaultAzureCredential } from "@azure/identity"; + +async function triggersUpdate() { + const subscriptionId = "12345678-1234-1234-1234-12345678abc"; + const resourceGroupName = "exampleResourceGroup"; + const factoryName = "exampleFactoryName"; + const triggerName = "exampleTrigger"; + const trigger: TriggerResource = { + properties: { + type: "ScheduleTrigger", + description: "Example description", + pipelines: [ + { + parameters: { outputBlobNameList: ["exampleoutput.csv"] }, + pipelineReference: { + type: "PipelineReference", + referenceName: "examplePipeline" + } + } + ], + recurrence: { + endTime: new Date("2018-06-16T00:55:14.905167Z"), + frequency: "Minute", + interval: 4, + startTime: new Date("2018-06-16T00:39:14.905167Z"), + timeZone: "UTC" + } + } + }; + const credential = new DefaultAzureCredential(); + const client = new DataFactoryManagementClient(credential, subscriptionId); + const result = await client.triggers.createOrUpdate( + resourceGroupName, + factoryName, + triggerName, + trigger + ); + console.log(result); +} + +triggersUpdate().catch(console.error); diff --git a/sdk/datafactory/arm-datafactory/samples/v10/typescript/tsconfig.json b/sdk/datafactory/arm-datafactory/samples/v10/typescript/tsconfig.json new file mode 100644 index 000000000000..416c2dd82e00 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/samples/v10/typescript/tsconfig.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "target": "ES2018", + "module": "commonjs", + "moduleResolution": "node", + "resolveJsonModule": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "strict": true, + "alwaysStrict": true, + "outDir": "dist", + "rootDir": "src" + }, + "include": [ + "src/**.ts" + ] +} diff --git a/sdk/datafactory/arm-datafactory/src/dataFactoryManagementClient.ts b/sdk/datafactory/arm-datafactory/src/dataFactoryManagementClient.ts index c21d0a1e2bee..227a24d5cf4c 100644 --- a/sdk/datafactory/arm-datafactory/src/dataFactoryManagementClient.ts +++ b/sdk/datafactory/arm-datafactory/src/dataFactoryManagementClient.ts @@ -86,7 +86,7 @@ export class DataFactoryManagementClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-datafactory/10.1.0`; + const packageDetails = `azsdk-js-arm-datafactory/10.2.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` diff --git a/sdk/datafactory/arm-datafactory/src/models/index.ts b/sdk/datafactory/arm-datafactory/src/models/index.ts index 5b0f0789a358..c6bab94ba2a5 100644 --- a/sdk/datafactory/arm-datafactory/src/models/index.ts +++ b/sdk/datafactory/arm-datafactory/src/models/index.ts @@ -460,7 +460,8 @@ export type ExecutionActivityUnion = | DatabricksSparkJarActivity | DatabricksSparkPythonActivity | AzureFunctionActivity - | ExecuteDataFlowActivity; + | ExecuteDataFlowActivity + | ScriptActivity; export type MultiplePipelineTriggerUnion = | MultiplePipelineTrigger | ScheduleTrigger @@ -1545,7 +1546,8 @@ export interface Activity { | "AzureFunctionActivity" | "WebHook" | "ExecuteDataFlow" - | "ExecuteWranglingDataflow"; + | "ExecuteWranglingDataflow" + | "Script"; /** Describes unknown properties. The value of an unknown property can be of "any" type. */ [property: string]: any; /** Activity name. */ @@ -3502,6 +3504,38 @@ export interface PowerQuerySinkMapping { dataflowSinks?: PowerQuerySink[]; } +/** Script block of scripts. */ +export interface ScriptActivityScriptBlock { + /** The query text. Type: string (or Expression with resultType string). */ + text: Record; + /** The type of the query. Type: string. */ + type: ScriptType; + /** Array of script parameters. Type: array. */ + parameters?: ScriptActivityParameter[]; +} + +/** Parameters of a script block. */ +export interface ScriptActivityParameter { + /** The name of the parameter. Type: string (or Expression with resultType string). */ + name?: Record; + /** The type of the parameter. */ + type?: ScriptActivityParameterType; + /** The value of the parameter. */ + value?: Record; + /** The direction of the parameter. */ + direction?: ScriptActivityParameterDirection; + /** The size of the output direction parameter. */ + size?: number; +} + +/** Log settings of script activity. */ +export interface ScriptActivityTypePropertiesLogSettings { + /** The destination of logs. Type: string. */ + logDestination: ScriptActivityLogDestination; + /** Log location settings customer needs to provide when enabling log. */ + logLocationSettings?: LogLocationSettings; +} + /** The workflow trigger recurrence. */ export interface ScheduleTriggerRecurrence { /** Describes unknown properties. The value of an unknown property can be of "any" type. */ @@ -7045,7 +7079,8 @@ export type ExecutionActivity = Activity & { | "DatabricksSparkJar" | "DatabricksSparkPython" | "AzureFunctionActivity" - | "ExecuteDataFlow"; + | "ExecuteDataFlow" + | "Script"; /** Linked service reference. */ linkedServiceName?: LinkedServiceReference; /** Activity policy. */ @@ -9630,6 +9665,16 @@ export type ExecuteDataFlowActivity = ExecutionActivity & { runConcurrently?: Record; }; +/** Script activity type. */ +export type ScriptActivity = ExecutionActivity & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + type: "Script"; + /** Array of script blocks. Type: array. */ + scripts?: ScriptActivityScriptBlock[]; + /** Log settings of script activity. */ + logSettings?: ScriptActivityTypePropertiesLogSettings; +}; + /** Trigger that creates pipeline runs periodically, on schedule. */ export type ScheduleTrigger = MultiplePipelineTrigger & { /** Polymorphic discriminator, which specifies the different types this object can be */ @@ -11616,6 +11661,92 @@ export enum KnownWebHookActivityMethod { */ export type WebHookActivityMethod = string; +/** Known values of {@link ScriptType} that the service accepts. */ +export enum KnownScriptType { + Query = "Query", + NonQuery = "NonQuery" +} + +/** + * Defines values for ScriptType. \ + * {@link KnownScriptType} can be used interchangeably with ScriptType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Query** \ + * **NonQuery** + */ +export type ScriptType = string; + +/** Known values of {@link ScriptActivityParameterType} that the service accepts. */ +export enum KnownScriptActivityParameterType { + Boolean = "Boolean", + DateTime = "DateTime", + DateTimeOffset = "DateTimeOffset", + Decimal = "Decimal", + Double = "Double", + Guid = "Guid", + Int16 = "Int16", + Int32 = "Int32", + Int64 = "Int64", + Single = "Single", + String = "String", + Timespan = "Timespan" +} + +/** + * Defines values for ScriptActivityParameterType. \ + * {@link KnownScriptActivityParameterType} can be used interchangeably with ScriptActivityParameterType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Boolean** \ + * **DateTime** \ + * **DateTimeOffset** \ + * **Decimal** \ + * **Double** \ + * **Guid** \ + * **Int16** \ + * **Int32** \ + * **Int64** \ + * **Single** \ + * **String** \ + * **Timespan** + */ +export type ScriptActivityParameterType = string; + +/** Known values of {@link ScriptActivityParameterDirection} that the service accepts. */ +export enum KnownScriptActivityParameterDirection { + Input = "Input", + Output = "Output", + InputOutput = "InputOutput" +} + +/** + * Defines values for ScriptActivityParameterDirection. \ + * {@link KnownScriptActivityParameterDirection} can be used interchangeably with ScriptActivityParameterDirection, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Input** \ + * **Output** \ + * **InputOutput** + */ +export type ScriptActivityParameterDirection = string; + +/** Known values of {@link ScriptActivityLogDestination} that the service accepts. */ +export enum KnownScriptActivityLogDestination { + ActivityOutput = "ActivityOutput", + ExternalStore = "ExternalStore" +} + +/** + * Defines values for ScriptActivityLogDestination. \ + * {@link KnownScriptActivityLogDestination} can be used interchangeably with ScriptActivityLogDestination, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **ActivityOutput** \ + * **ExternalStore** + */ +export type ScriptActivityLogDestination = string; + /** Known values of {@link RecurrenceFrequency} that the service accepts. */ export enum KnownRecurrenceFrequency { NotSpecified = "NotSpecified", diff --git a/sdk/datafactory/arm-datafactory/src/models/mappers.ts b/sdk/datafactory/arm-datafactory/src/models/mappers.ts index c851cfc13733..510cef06920b 100644 --- a/sdk/datafactory/arm-datafactory/src/models/mappers.ts +++ b/sdk/datafactory/arm-datafactory/src/models/mappers.ts @@ -710,7 +710,7 @@ export const FactoryUpdateParameters: coreClient.CompositeMapper = { } }, publicNetworkAccess: { - serializedName: "publicNetworkAccess", + serializedName: "properties.publicNetworkAccess", type: { name: "String" } @@ -6708,6 +6708,106 @@ export const PowerQuerySinkMapping: coreClient.CompositeMapper = { } }; +export const ScriptActivityScriptBlock: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ScriptActivityScriptBlock", + modelProperties: { + text: { + serializedName: "text", + required: true, + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + }, + type: { + serializedName: "type", + required: true, + type: { + name: "String" + } + }, + parameters: { + serializedName: "parameters", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ScriptActivityParameter" + } + } + } + } + } + } +}; + +export const ScriptActivityParameter: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ScriptActivityParameter", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + }, + type: { + serializedName: "type", + type: { + name: "String" + } + }, + value: { + serializedName: "value", + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + }, + direction: { + serializedName: "direction", + type: { + name: "String" + } + }, + size: { + serializedName: "size", + type: { + name: "Number" + } + } + } + } +}; + +export const ScriptActivityTypePropertiesLogSettings: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ScriptActivityTypePropertiesLogSettings", + modelProperties: { + logDestination: { + serializedName: "logDestination", + required: true, + type: { + name: "String" + } + }, + logLocationSettings: { + serializedName: "logLocationSettings", + type: { + name: "Composite", + className: "LogLocationSettings" + } + } + } + } +}; + export const ScheduleTriggerRecurrence: coreClient.CompositeMapper = { type: { name: "Composite", @@ -25115,6 +25215,39 @@ export const ExecuteDataFlowActivity: coreClient.CompositeMapper = { } }; +export const ScriptActivity: coreClient.CompositeMapper = { + serializedName: "Script", + type: { + name: "Composite", + className: "ScriptActivity", + uberParent: "Activity", + additionalProperties: { type: { name: "Object" } }, + polymorphicDiscriminator: Activity.type.polymorphicDiscriminator, + modelProperties: { + ...ExecutionActivity.type.modelProperties, + scripts: { + serializedName: "typeProperties.scripts", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ScriptActivityScriptBlock" + } + } + } + }, + logSettings: { + serializedName: "typeProperties.logSettings", + type: { + name: "Composite", + className: "ScriptActivityTypePropertiesLogSettings" + } + } + } + } +}; + export const ScheduleTrigger: coreClient.CompositeMapper = { serializedName: "ScheduleTrigger", type: { @@ -27398,6 +27531,7 @@ export let discriminators = { "Activity.DatabricksSparkPython": DatabricksSparkPythonActivity, "Activity.AzureFunctionActivity": AzureFunctionActivity, "Activity.ExecuteDataFlow": ExecuteDataFlowActivity, + "Activity.Script": ScriptActivity, "Trigger.ScheduleTrigger": ScheduleTrigger, "Trigger.BlobTrigger": BlobTrigger, "Trigger.BlobEventsTrigger": BlobEventsTrigger, diff --git a/sdk/datafactory/arm-datafactory/tsconfig.json b/sdk/datafactory/arm-datafactory/tsconfig.json index 6e3251194117..1fa076b90d1a 100644 --- a/sdk/datafactory/arm-datafactory/tsconfig.json +++ b/sdk/datafactory/arm-datafactory/tsconfig.json @@ -9,11 +9,24 @@ "esModuleInterop": true, "allowSyntheticDefaultImports": true, "forceConsistentCasingInFileNames": true, - "lib": ["es6", "dom"], + "lib": [ + "es6", + "dom" + ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true + "importHelpers": true, + "paths": { + "@azure/arm-datafactory": [ + "./src/index" + ] + } }, - "include": ["./src/**/*.ts", "./test/**/*.ts"], - "exclude": ["node_modules"] -} + "include": [ + "./src/**/*.ts", + "./test/**/*.ts" + ], + "exclude": [ + "node_modules" + ] +} \ No newline at end of file From b433cdbb9e2f33a3c5f5a710db817904f259122b Mon Sep 17 00:00:00 2001 From: colawwj Date: Mon, 21 Feb 2022 15:31:44 +0800 Subject: [PATCH 2/5] update --- common/config/rush/pnpm-lock.yaml | 30 ++- sdk/datafactory/arm-datafactory/CHANGELOG.md | 10 +- sdk/datafactory/arm-datafactory/README.md | 11 ++ sdk/datafactory/arm-datafactory/_meta.json | 6 +- sdk/datafactory/arm-datafactory/package.json | 24 +-- .../review/arm-datafactory.api.md | 63 +++++- .../arm-datafactory/rollup.config.js | 78 +------- .../arm-datafactory/src/models/index.ts | 98 ++++++++++ .../arm-datafactory/src/models/mappers.ts | 182 ++++++++++++++++++ sdk/datafactory/arm-datafactory/tsconfig.json | 7 +- 10 files changed, 402 insertions(+), 107 deletions(-) diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 5bbdd3f33b59..ea8cdd746f47 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -7073,6 +7073,21 @@ packages: source-map-resolve: 0.6.0 dev: false + /rollup-plugin-sourcemaps/0.6.3_rollup@2.67.1: + resolution: {integrity: sha512-paFu+nT1xvuO1tPFYXGe+XnQvg4Hjqv/eIhG8i5EspfYYPBKL57X7iVbfv55aNVASg3dzWvES9dmWsL2KhfByw==} + engines: {node: '>=10.0.0'} + peerDependencies: + '@types/node': '>=10.0.0' + rollup: '>=0.31.2' + peerDependenciesMeta: + '@types/node': + optional: true + dependencies: + '@rollup/pluginutils': 3.1.0_rollup@2.67.1 + rollup: 2.67.1 + source-map-resolve: 0.6.0 + dev: false + /rollup-plugin-terser/5.3.1_rollup@2.67.1: resolution: {integrity: sha512-1pkwkervMJQGFYvM9nscrUoncPwiKR/K+bHdjv6PFgRo3cgPHoRT83y2Aa3GvINj4539S15t/tpFPb775TDs6w==} peerDependencies: @@ -9822,26 +9837,27 @@ packages: dev: false file:projects/arm-datafactory.tgz: - resolution: {integrity: sha512-UH32IrZ05BYFMqfakt70EmTQsW+QVGgMw9gtJnETJPpfoFnPYlW51xBFXxTRjHU22gqHAFjxyVHhqfF3NucErQ==, tarball: file:projects/arm-datafactory.tgz} + resolution: {integrity: sha512-lgN7MeI9TSULYzpb6f4OVWqNOoAfbJjWsBbnBnj2vU1imocSDx8oxtp+g3+6Kjt+E0GNXbs2KmcbIMsLmdxc2w==, tarball: file:projects/arm-datafactory.tgz} name: '@rush-temp/arm-datafactory' version: 0.0.0 dependencies: '@azure-tools/test-recorder': 1.0.2 '@microsoft/api-extractor': 7.19.4 - '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 - '@rollup/plugin-json': 4.1.0_rollup@1.32.1 - '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 - '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 + '@rollup/plugin-commonjs': 21.0.1_rollup@2.67.1 + '@rollup/plugin-json': 4.1.0_rollup@2.67.1 + '@rollup/plugin-multi-entry': 4.1.0_rollup@2.67.1 + '@rollup/plugin-node-resolve': 13.1.3_rollup@2.67.1 cross-env: 7.0.3 mkdirp: 1.0.4 mocha: 7.2.0 rimraf: 3.0.2 - rollup: 1.32.1 - rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 + rollup: 2.67.1 + rollup-plugin-sourcemaps: 0.6.3_rollup@2.67.1 tslib: 2.3.1 typescript: 4.2.4 uglify-js: 3.15.1 transitivePeerDependencies: + - '@types/node' - encoding - supports-color dev: false diff --git a/sdk/datafactory/arm-datafactory/CHANGELOG.md b/sdk/datafactory/arm-datafactory/CHANGELOG.md index 4415273dea6e..1e44ed5dc888 100644 --- a/sdk/datafactory/arm-datafactory/CHANGELOG.md +++ b/sdk/datafactory/arm-datafactory/CHANGELOG.md @@ -1,21 +1,29 @@ # Release History -## 10.2.0 (2022-02-14) +## 10.2.0 (2022-02-21) **Features** - Added Interface ScriptActivityParameter - Added Interface ScriptActivityScriptBlock - Added Interface ScriptActivityTypePropertiesLogSettings + - Added Type Alias QuickbaseLinkedService - Added Type Alias ScriptActivity - Added Type Alias ScriptActivityLogDestination - Added Type Alias ScriptActivityParameterDirection - Added Type Alias ScriptActivityParameterType - Added Type Alias ScriptType + - Added Type Alias SmartsheetLinkedService + - Added Type Alias TeamDeskAuthenticationType + - Added Type Alias TeamDeskLinkedService + - Added Type Alias ZendeskAuthenticationType + - Added Type Alias ZendeskLinkedService - Added Enum KnownScriptActivityLogDestination - Added Enum KnownScriptActivityParameterDirection - Added Enum KnownScriptActivityParameterType - Added Enum KnownScriptType + - Added Enum KnownTeamDeskAuthenticationType + - Added Enum KnownZendeskAuthenticationType ## 10.1.0 (2022-01-10) diff --git a/sdk/datafactory/arm-datafactory/README.md b/sdk/datafactory/arm-datafactory/README.md index 8160aa493534..ba364beeca3d 100644 --- a/sdk/datafactory/arm-datafactory/README.md +++ b/sdk/datafactory/arm-datafactory/README.md @@ -16,6 +16,8 @@ The Azure Data Factory V2 management API provides a RESTful set of web services - [LTS versions of Node.js](https://nodejs.org/about/releases/) - Latest versions of Safari, Chrome, Edge and Firefox. +See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details. + ### Prerequisites - An [Azure subscription][azure_sub]. @@ -49,8 +51,17 @@ For more information about how to create an Azure AD Application check out [this ```javascript const { DataFactoryManagementClient } = require("@azure/arm-datafactory"); const { DefaultAzureCredential } = require("@azure/identity"); +// For client-side applications running in the browser, use InteractiveBrowserCredential instead of DefaultAzureCredential. See https://aka.ms/azsdk/js/identity/examples for more details. + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new DataFactoryManagementClient(new DefaultAzureCredential(), subscriptionId); + +// For client-side applications running in the browser, use this code instead: +// const credential = new InteractiveBrowserCredential({ +// tenantId: "", +// clientId: "" +// }); +// const client = new DataFactoryManagementClient(credential, subscriptionId); ``` diff --git a/sdk/datafactory/arm-datafactory/_meta.json b/sdk/datafactory/arm-datafactory/_meta.json index ab16b5487484..9c88399d14ad 100644 --- a/sdk/datafactory/arm-datafactory/_meta.json +++ b/sdk/datafactory/arm-datafactory/_meta.json @@ -1,7 +1,7 @@ { - "commit": "7c98de7664d4565c088350015ccd0cfc102eab49", + "commit": "bb9f1204f9a337404ff7e7b73b4c7b4ddde7f8f1", "readme": "specification/datafactory/resource-manager/readme.md", - "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\mydev\\azure-sdk-for-js ../azure-rest-api-specs/specification/datafactory/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20220128.1 --generate-sample=true", + "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\mydev\\azure-sdk-for-js ../azure-rest-api-specs/specification/datafactory/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20220218.1", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "use": "@autorest/typescript@6.0.0-alpha.16.20220128.1" + "use": "@autorest/typescript@6.0.0-alpha.16.20220218.1" } \ No newline at end of file diff --git a/sdk/datafactory/arm-datafactory/package.json b/sdk/datafactory/arm-datafactory/package.json index e12d8c2b71c5..e636a6a4dfe7 100644 --- a/sdk/datafactory/arm-datafactory/package.json +++ b/sdk/datafactory/arm-datafactory/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for DataFactoryManagementClient.", - "version": "10.2.0", + "version": "1.0.0-beta.1", "engines": { "node": ">=12.0.0" }, @@ -29,13 +29,13 @@ "types": "./types/arm-datafactory.d.ts", "devDependencies": { "@microsoft/api-extractor": "^7.18.11", - "@rollup/plugin-commonjs": "11.0.2", - "@rollup/plugin-json": "^4.0.0", - "@rollup/plugin-multi-entry": "^3.0.0", - "@rollup/plugin-node-resolve": "^8.0.0", + "@rollup/plugin-commonjs": "^21.0.1", + "@rollup/plugin-json": "^4.1.0", + "@rollup/plugin-multi-entry": "^4.1.0", + "@rollup/plugin-node-resolve": "^13.1.3", "mkdirp": "^1.0.4", - "rollup": "^1.16.3", - "rollup-plugin-sourcemaps": "^0.4.2", + "rollup": "^2.66.1", + "rollup-plugin-sourcemaps": "^0.6.3", "typescript": "~4.2.0", "uglify-js": "^3.4.9", "rimraf": "^3.0.0", @@ -106,13 +106,5 @@ } ] }, - "autoPublish": true, - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-datafactory?view=azure-node-preview" - } + "autoPublish": true } \ No newline at end of file diff --git a/sdk/datafactory/arm-datafactory/review/arm-datafactory.api.md b/sdk/datafactory/arm-datafactory/review/arm-datafactory.api.md index 6be899b87768..71421e2e9356 100644 --- a/sdk/datafactory/arm-datafactory/review/arm-datafactory.api.md +++ b/sdk/datafactory/arm-datafactory/review/arm-datafactory.api.md @@ -4893,6 +4893,14 @@ export enum KnownSybaseAuthenticationType { Windows = "Windows" } +// @public +export enum KnownTeamDeskAuthenticationType { + // (undocumented) + Basic = "Basic", + // (undocumented) + Token = "Token" +} + // @public export enum KnownTeradataAuthenticationType { // (undocumented) @@ -4979,6 +4987,14 @@ export enum KnownWebHookActivityMethod { Post = "POST" } +// @public +export enum KnownZendeskAuthenticationType { + // (undocumented) + Basic = "Basic", + // (undocumented) + Token = "Token" +} + // @public export interface LinkedIntegrationRuntime { readonly createTime?: Date; @@ -5023,7 +5039,7 @@ export interface LinkedService { parameters?: { [propertyName: string]: ParameterSpecification; }; - type: "AzureStorage" | "AzureBlobStorage" | "AzureTableStorage" | "AzureSqlDW" | "SqlServer" | "AmazonRdsForSqlServer" | "AzureSqlDatabase" | "AzureSqlMI" | "AzureBatch" | "AzureKeyVault" | "CosmosDb" | "Dynamics" | "DynamicsCrm" | "CommonDataServiceForApps" | "HDInsight" | "FileServer" | "AzureFileStorage" | "AmazonS3Compatible" | "OracleCloudStorage" | "GoogleCloudStorage" | "Oracle" | "AmazonRdsForOracle" | "AzureMySql" | "MySql" | "PostgreSql" | "Sybase" | "Db2" | "Teradata" | "AzureML" | "AzureMLService" | "Odbc" | "Informix" | "MicrosoftAccess" | "Hdfs" | "OData" | "Web" | "Cassandra" | "MongoDb" | "MongoDbAtlas" | "MongoDbV2" | "CosmosDbMongoDbApi" | "AzureDataLakeStore" | "AzureBlobFS" | "Office365" | "Salesforce" | "SalesforceServiceCloud" | "SapCloudForCustomer" | "SapEcc" | "SapOpenHub" | "RestService" | "AmazonS3" | "AmazonRedshift" | "CustomDataSource" | "AzureSearch" | "HttpServer" | "FtpServer" | "Sftp" | "SapBW" | "SapHana" | "AmazonMWS" | "AzurePostgreSql" | "Concur" | "Couchbase" | "Drill" | "Eloqua" | "GoogleBigQuery" | "Greenplum" | "HBase" | "Hive" | "Hubspot" | "Impala" | "Jira" | "Magento" | "MariaDB" | "AzureMariaDB" | "Marketo" | "Paypal" | "Phoenix" | "Presto" | "QuickBooks" | "ServiceNow" | "Shopify" | "Spark" | "Square" | "Xero" | "Zoho" | "Vertica" | "Netezza" | "SalesforceMarketingCloud" | "HDInsightOnDemand" | "AzureDataLakeAnalytics" | "AzureDatabricks" | "AzureDatabricksDeltaLake" | "Responsys" | "DynamicsAX" | "OracleServiceCloud" | "GoogleAdWords" | "SapTable" | "AzureDataExplorer" | "AzureFunction" | "Snowflake" | "SharePointOnlineList"; + type: "AzureStorage" | "AzureBlobStorage" | "AzureTableStorage" | "AzureSqlDW" | "SqlServer" | "AmazonRdsForSqlServer" | "AzureSqlDatabase" | "AzureSqlMI" | "AzureBatch" | "AzureKeyVault" | "CosmosDb" | "Dynamics" | "DynamicsCrm" | "CommonDataServiceForApps" | "HDInsight" | "FileServer" | "AzureFileStorage" | "AmazonS3Compatible" | "OracleCloudStorage" | "GoogleCloudStorage" | "Oracle" | "AmazonRdsForOracle" | "AzureMySql" | "MySql" | "PostgreSql" | "Sybase" | "Db2" | "Teradata" | "AzureML" | "AzureMLService" | "Odbc" | "Informix" | "MicrosoftAccess" | "Hdfs" | "OData" | "Web" | "Cassandra" | "MongoDb" | "MongoDbAtlas" | "MongoDbV2" | "CosmosDbMongoDbApi" | "AzureDataLakeStore" | "AzureBlobFS" | "Office365" | "Salesforce" | "SalesforceServiceCloud" | "SapCloudForCustomer" | "SapEcc" | "SapOpenHub" | "RestService" | "AmazonS3" | "TeamDesk" | "Quickbase" | "Smartsheet" | "Zendesk" | "AmazonRedshift" | "CustomDataSource" | "AzureSearch" | "HttpServer" | "FtpServer" | "Sftp" | "SapBW" | "SapHana" | "AmazonMWS" | "AzurePostgreSql" | "Concur" | "Couchbase" | "Drill" | "Eloqua" | "GoogleBigQuery" | "Greenplum" | "HBase" | "Hive" | "Hubspot" | "Impala" | "Jira" | "Magento" | "MariaDB" | "AzureMariaDB" | "Marketo" | "Paypal" | "Phoenix" | "Presto" | "QuickBooks" | "ServiceNow" | "Shopify" | "Spark" | "Square" | "Xero" | "Zoho" | "Vertica" | "Netezza" | "SalesforceMarketingCloud" | "HDInsightOnDemand" | "AzureDataLakeAnalytics" | "AzureDatabricks" | "AzureDatabricksDeltaLake" | "Responsys" | "DynamicsAX" | "OracleServiceCloud" | "GoogleAdWords" | "SapTable" | "AzureDataExplorer" | "AzureFunction" | "Snowflake" | "SharePointOnlineList"; } // @public @@ -5094,7 +5110,7 @@ export interface LinkedServicesListByFactoryOptionalParams extends coreClient.Op export type LinkedServicesListByFactoryResponse = LinkedServiceListResponse; // @public (undocumented) -export type LinkedServiceUnion = LinkedService | AzureStorageLinkedService | AzureBlobStorageLinkedService | AzureTableStorageLinkedService | AzureSqlDWLinkedService | SqlServerLinkedService | AmazonRdsForSqlServerLinkedService | AzureSqlDatabaseLinkedService | AzureSqlMILinkedService | AzureBatchLinkedService | AzureKeyVaultLinkedService | CosmosDbLinkedService | DynamicsLinkedService | DynamicsCrmLinkedService | CommonDataServiceForAppsLinkedService | HDInsightLinkedService | FileServerLinkedService | AzureFileStorageLinkedService | AmazonS3CompatibleLinkedService | OracleCloudStorageLinkedService | GoogleCloudStorageLinkedService | OracleLinkedService | AmazonRdsForOracleLinkedService | AzureMySqlLinkedService | MySqlLinkedService | PostgreSqlLinkedService | SybaseLinkedService | Db2LinkedService | TeradataLinkedService | AzureMLLinkedService | AzureMLServiceLinkedService | OdbcLinkedService | InformixLinkedService | MicrosoftAccessLinkedService | HdfsLinkedService | ODataLinkedService | WebLinkedService | CassandraLinkedService | MongoDbLinkedService | MongoDbAtlasLinkedService | MongoDbV2LinkedService | CosmosDbMongoDbApiLinkedService | AzureDataLakeStoreLinkedService | AzureBlobFSLinkedService | Office365LinkedService | SalesforceLinkedService | SalesforceServiceCloudLinkedService | SapCloudForCustomerLinkedService | SapEccLinkedService | SapOpenHubLinkedService | RestServiceLinkedService | AmazonS3LinkedService | AmazonRedshiftLinkedService | CustomDataSourceLinkedService | AzureSearchLinkedService | HttpLinkedService | FtpServerLinkedService | SftpServerLinkedService | SapBWLinkedService | SapHanaLinkedService | AmazonMWSLinkedService | AzurePostgreSqlLinkedService | ConcurLinkedService | CouchbaseLinkedService | DrillLinkedService | EloquaLinkedService | GoogleBigQueryLinkedService | GreenplumLinkedService | HBaseLinkedService | HiveLinkedService | HubspotLinkedService | ImpalaLinkedService | JiraLinkedService | MagentoLinkedService | MariaDBLinkedService | AzureMariaDBLinkedService | MarketoLinkedService | PaypalLinkedService | PhoenixLinkedService | PrestoLinkedService | QuickBooksLinkedService | ServiceNowLinkedService | ShopifyLinkedService | SparkLinkedService | SquareLinkedService | XeroLinkedService | ZohoLinkedService | VerticaLinkedService | NetezzaLinkedService | SalesforceMarketingCloudLinkedService | HDInsightOnDemandLinkedService | AzureDataLakeAnalyticsLinkedService | AzureDatabricksLinkedService | AzureDatabricksDeltaLakeLinkedService | ResponsysLinkedService | DynamicsAXLinkedService | OracleServiceCloudLinkedService | GoogleAdWordsLinkedService | SapTableLinkedService | AzureDataExplorerLinkedService | AzureFunctionLinkedService | SnowflakeLinkedService | SharePointOnlineListLinkedService; +export type LinkedServiceUnion = LinkedService | AzureStorageLinkedService | AzureBlobStorageLinkedService | AzureTableStorageLinkedService | AzureSqlDWLinkedService | SqlServerLinkedService | AmazonRdsForSqlServerLinkedService | AzureSqlDatabaseLinkedService | AzureSqlMILinkedService | AzureBatchLinkedService | AzureKeyVaultLinkedService | CosmosDbLinkedService | DynamicsLinkedService | DynamicsCrmLinkedService | CommonDataServiceForAppsLinkedService | HDInsightLinkedService | FileServerLinkedService | AzureFileStorageLinkedService | AmazonS3CompatibleLinkedService | OracleCloudStorageLinkedService | GoogleCloudStorageLinkedService | OracleLinkedService | AmazonRdsForOracleLinkedService | AzureMySqlLinkedService | MySqlLinkedService | PostgreSqlLinkedService | SybaseLinkedService | Db2LinkedService | TeradataLinkedService | AzureMLLinkedService | AzureMLServiceLinkedService | OdbcLinkedService | InformixLinkedService | MicrosoftAccessLinkedService | HdfsLinkedService | ODataLinkedService | WebLinkedService | CassandraLinkedService | MongoDbLinkedService | MongoDbAtlasLinkedService | MongoDbV2LinkedService | CosmosDbMongoDbApiLinkedService | AzureDataLakeStoreLinkedService | AzureBlobFSLinkedService | Office365LinkedService | SalesforceLinkedService | SalesforceServiceCloudLinkedService | SapCloudForCustomerLinkedService | SapEccLinkedService | SapOpenHubLinkedService | RestServiceLinkedService | AmazonS3LinkedService | TeamDeskLinkedService | QuickbaseLinkedService | SmartsheetLinkedService | ZendeskLinkedService | AmazonRedshiftLinkedService | CustomDataSourceLinkedService | AzureSearchLinkedService | HttpLinkedService | FtpServerLinkedService | SftpServerLinkedService | SapBWLinkedService | SapHanaLinkedService | AmazonMWSLinkedService | AzurePostgreSqlLinkedService | ConcurLinkedService | CouchbaseLinkedService | DrillLinkedService | EloquaLinkedService | GoogleBigQueryLinkedService | GreenplumLinkedService | HBaseLinkedService | HiveLinkedService | HubspotLinkedService | ImpalaLinkedService | JiraLinkedService | MagentoLinkedService | MariaDBLinkedService | AzureMariaDBLinkedService | MarketoLinkedService | PaypalLinkedService | PhoenixLinkedService | PrestoLinkedService | QuickBooksLinkedService | ServiceNowLinkedService | ShopifyLinkedService | SparkLinkedService | SquareLinkedService | XeroLinkedService | ZohoLinkedService | VerticaLinkedService | NetezzaLinkedService | SalesforceMarketingCloudLinkedService | HDInsightOnDemandLinkedService | AzureDataLakeAnalyticsLinkedService | AzureDatabricksLinkedService | AzureDatabricksDeltaLakeLinkedService | ResponsysLinkedService | DynamicsAXLinkedService | OracleServiceCloudLinkedService | GoogleAdWordsLinkedService | SapTableLinkedService | AzureDataExplorerLinkedService | AzureFunctionLinkedService | SnowflakeLinkedService | SharePointOnlineListLinkedService; // @public export interface LogLocationSettings { @@ -6365,6 +6381,14 @@ export interface QueryDataFlowDebugSessionsResponse { value?: DataFlowDebugSessionInfo[]; } +// @public +export type QuickbaseLinkedService = LinkedService & { + type: "Quickbase"; + url: Record; + userToken: SecretBaseUnion; + encryptedCredential?: Record; +}; + // @public export type QuickBooksLinkedService = LinkedService & { type: "QuickBooks"; @@ -7167,6 +7191,13 @@ export interface SkipErrorFile { fileMissing?: Record; } +// @public +export type SmartsheetLinkedService = LinkedService & { + type: "Smartsheet"; + apiToken: SecretBaseUnion; + encryptedCredential?: Record; +}; + // @public export type SnowflakeDataset = Dataset & { type: "SnowflakeTable"; @@ -7746,6 +7777,20 @@ export type TarReadSettings = CompressionReadSettings & { preserveCompressionFileNameAsFolder?: Record; }; +// @public +export type TeamDeskAuthenticationType = string; + +// @public +export type TeamDeskLinkedService = LinkedService & { + type: "TeamDesk"; + authenticationType: TeamDeskAuthenticationType; + url: Record; + userName?: Record; + password?: SecretBaseUnion; + apiToken?: SecretBaseUnion; + encryptedCredential?: Record; +}; + // @public export type TeradataAuthenticationType = string; @@ -8292,6 +8337,20 @@ export type XmlSource = CopySource & { additionalColumns?: Record; }; +// @public +export type ZendeskAuthenticationType = string; + +// @public +export type ZendeskLinkedService = LinkedService & { + type: "Zendesk"; + authenticationType: ZendeskAuthenticationType; + url: Record; + userName?: Record; + password?: SecretBaseUnion; + apiToken?: SecretBaseUnion; + encryptedCredential?: Record; +}; + // @public export type ZipDeflateReadSettings = CompressionReadSettings & { type: "ZipDeflateReadSettings"; diff --git a/sdk/datafactory/arm-datafactory/rollup.config.js b/sdk/datafactory/arm-datafactory/rollup.config.js index 9be1955eb7f1..3f89d7309da5 100644 --- a/sdk/datafactory/arm-datafactory/rollup.config.js +++ b/sdk/datafactory/arm-datafactory/rollup.config.js @@ -14,62 +14,14 @@ import json from "@rollup/plugin-json"; import nodeBuiltins from "builtin-modules"; -/** - * Gets the proper configuration needed for rollup's commonJS plugin for @opentelemetry/api. - * - * NOTE: this manual configuration is only needed because OpenTelemetry uses an - * __exportStar downleveled helper function to declare its exports which confuses - * rollup's automatic discovery mechanism. - * - * @returns an object reference that can be `...`'d into your cjs() configuration. - */ -export function openTelemetryCommonJs() { - const namedExports = {}; - - for (const key of [ - "@opentelemetry/api", - "@azure/core-tracing/node_modules/@opentelemetry/api" - ]) { - namedExports[key] = [ - "SpanKind", - "TraceFlags", - "getSpan", - "setSpan", - "SpanStatusCode", - "getSpanContext", - "setSpanContext" - ]; - } - - const releasedOpenTelemetryVersions = ["0.10.2", "1.0.0-rc.0"]; - - for (const version of releasedOpenTelemetryVersions) { - namedExports[ - // working around a limitation in the rollup common.js plugin - it's not able to resolve these modules so the named exports listed above will not get applied. We have to drill down to the actual path. - `../../../common/temp/node_modules/.pnpm/@opentelemetry/api@${version}/node_modules/@opentelemetry/api/build/src/index.js` - ] = [ - "SpanKind", - "TraceFlags", - "getSpan", - "setSpan", - "StatusCode", - "CanonicalCode", - "getSpanContext", - "setSpanContext" - ]; - } - - return namedExports; -} - // #region Warning Handler /** - * A function that can determine whether a rollupwarning should be ignored. If + * A function that can determine whether a rollup warning should be ignored. If * the function returns `true`, then the warning will not be displayed. */ -function ignoreNiseSinonEvalWarnings(warning) { +function ignoreNiseSinonEval(warning) { return ( warning.code === "EVAL" && warning.id && @@ -78,17 +30,14 @@ function ignoreNiseSinonEvalWarnings(warning) { ); } -function ignoreChaiCircularDependencyWarnings(warning) { +function ignoreChaiCircularDependency(warning) { return ( warning.code === "CIRCULAR_DEPENDENCY" && warning.importer && warning.importer.includes("node_modules/chai") === true ); } -const warningInhibitors = [ - ignoreChaiCircularDependencyWarnings, - ignoreNiseSinonEvalWarnings -]; +const warningInhibitors = [ignoreChaiCircularDependency, ignoreNiseSinonEval]; /** * Construct a warning handler for the shared rollup configuration @@ -122,22 +71,7 @@ function makeBrowserTestConfig() { nodeResolve({ mainFields: ["module", "browser"] }), - cjs({ - namedExports: { - // Chai's strange internal architecture makes it impossible to statically - // analyze its exports. - chai: [ - "version", - "use", - "util", - "config", - "expect", - "should", - "assert" - ], - ...openTelemetryCommonJs() - } - }), + cjs(), json(), sourcemaps() //viz({ filename: "dist-test/browser-stats.html", sourcemap: true }) @@ -173,7 +107,7 @@ export function makeConfig(pkg, options) { ], output: { file: "dist/index.js", format: "cjs", sourcemap: true }, preserveSymlinks: false, - plugins: [sourcemaps(), nodeResolve(), cjs()] + plugins: [sourcemaps(), nodeResolve()] }; const config = [baseConfig]; diff --git a/sdk/datafactory/arm-datafactory/src/models/index.ts b/sdk/datafactory/arm-datafactory/src/models/index.ts index c6bab94ba2a5..2b59668c3adb 100644 --- a/sdk/datafactory/arm-datafactory/src/models/index.ts +++ b/sdk/datafactory/arm-datafactory/src/models/index.ts @@ -79,6 +79,10 @@ export type LinkedServiceUnion = | SapOpenHubLinkedService | RestServiceLinkedService | AmazonS3LinkedService + | TeamDeskLinkedService + | QuickbaseLinkedService + | SmartsheetLinkedService + | ZendeskLinkedService | AmazonRedshiftLinkedService | CustomDataSourceLinkedService | AzureSearchLinkedService @@ -1275,6 +1279,10 @@ export interface LinkedService { | "SapOpenHub" | "RestService" | "AmazonS3" + | "TeamDesk" + | "Quickbase" + | "Smartsheet" + | "Zendesk" | "AmazonRedshift" | "CustomDataSource" | "AzureSearch" @@ -4911,6 +4919,64 @@ export type AmazonS3LinkedService = LinkedService & { encryptedCredential?: Record; }; +/** Linked service for TeamDesk. */ +export type TeamDeskLinkedService = LinkedService & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + type: "TeamDesk"; + /** The authentication type to use. */ + authenticationType: TeamDeskAuthenticationType; + /** The url to connect TeamDesk source. Type: string (or Expression with resultType string). */ + url: Record; + /** The username of the TeamDesk source. Type: string (or Expression with resultType string). */ + userName?: Record; + /** The password of the TeamDesk source. */ + password?: SecretBaseUnion; + /** The api token for the TeamDesk source. */ + apiToken?: SecretBaseUnion; + /** The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). */ + encryptedCredential?: Record; +}; + +/** Linked service for Quickbase. */ +export type QuickbaseLinkedService = LinkedService & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + type: "Quickbase"; + /** The url to connect Quickbase source. Type: string (or Expression with resultType string). */ + url: Record; + /** The user token for the Quickbase source. */ + userToken: SecretBaseUnion; + /** The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). */ + encryptedCredential?: Record; +}; + +/** Linked service for Smartsheet. */ +export type SmartsheetLinkedService = LinkedService & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + type: "Smartsheet"; + /** The api token for the Smartsheet source. */ + apiToken: SecretBaseUnion; + /** The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). */ + encryptedCredential?: Record; +}; + +/** Linked service for Zendesk. */ +export type ZendeskLinkedService = LinkedService & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + type: "Zendesk"; + /** The authentication type to use. */ + authenticationType: ZendeskAuthenticationType; + /** The url to connect Zendesk source. Type: string (or Expression with resultType string). */ + url: Record; + /** The username of the Zendesk source. Type: string (or Expression with resultType string). */ + userName?: Record; + /** The password of the Zendesk source. */ + password?: SecretBaseUnion; + /** The api token for the Zendesk source. */ + apiToken?: SecretBaseUnion; + /** The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). */ + encryptedCredential?: Record; +}; + /** Linked service for Amazon Redshift. */ export type AmazonRedshiftLinkedService = LinkedService & { /** Polymorphic discriminator, which specifies the different types this object can be */ @@ -11097,6 +11163,38 @@ export enum KnownRestServiceAuthenticationType { */ export type RestServiceAuthenticationType = string; +/** Known values of {@link TeamDeskAuthenticationType} that the service accepts. */ +export enum KnownTeamDeskAuthenticationType { + Basic = "Basic", + Token = "Token" +} + +/** + * Defines values for TeamDeskAuthenticationType. \ + * {@link KnownTeamDeskAuthenticationType} can be used interchangeably with TeamDeskAuthenticationType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Basic** \ + * **Token** + */ +export type TeamDeskAuthenticationType = string; + +/** Known values of {@link ZendeskAuthenticationType} that the service accepts. */ +export enum KnownZendeskAuthenticationType { + Basic = "Basic", + Token = "Token" +} + +/** + * Defines values for ZendeskAuthenticationType. \ + * {@link KnownZendeskAuthenticationType} can be used interchangeably with ZendeskAuthenticationType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Basic** \ + * **Token** + */ +export type ZendeskAuthenticationType = string; + /** Known values of {@link HttpAuthenticationType} that the service accepts. */ export enum KnownHttpAuthenticationType { Basic = "Basic", diff --git a/sdk/datafactory/arm-datafactory/src/models/mappers.ts b/sdk/datafactory/arm-datafactory/src/models/mappers.ts index 510cef06920b..9b547a452afb 100644 --- a/sdk/datafactory/arm-datafactory/src/models/mappers.ts +++ b/sdk/datafactory/arm-datafactory/src/models/mappers.ts @@ -10973,6 +10973,184 @@ export const AmazonS3LinkedService: coreClient.CompositeMapper = { } }; +export const TeamDeskLinkedService: coreClient.CompositeMapper = { + serializedName: "TeamDesk", + type: { + name: "Composite", + className: "TeamDeskLinkedService", + uberParent: "LinkedService", + additionalProperties: { type: { name: "Object" } }, + polymorphicDiscriminator: LinkedService.type.polymorphicDiscriminator, + modelProperties: { + ...LinkedService.type.modelProperties, + authenticationType: { + serializedName: "typeProperties.authenticationType", + required: true, + type: { + name: "String" + } + }, + url: { + serializedName: "typeProperties.url", + required: true, + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + }, + userName: { + serializedName: "typeProperties.userName", + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + }, + password: { + serializedName: "typeProperties.password", + type: { + name: "Composite", + className: "SecretBase" + } + }, + apiToken: { + serializedName: "typeProperties.apiToken", + type: { + name: "Composite", + className: "SecretBase" + } + }, + encryptedCredential: { + serializedName: "typeProperties.encryptedCredential", + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + } + } + } +}; + +export const QuickbaseLinkedService: coreClient.CompositeMapper = { + serializedName: "Quickbase", + type: { + name: "Composite", + className: "QuickbaseLinkedService", + uberParent: "LinkedService", + additionalProperties: { type: { name: "Object" } }, + polymorphicDiscriminator: LinkedService.type.polymorphicDiscriminator, + modelProperties: { + ...LinkedService.type.modelProperties, + url: { + serializedName: "typeProperties.url", + required: true, + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + }, + userToken: { + serializedName: "typeProperties.userToken", + type: { + name: "Composite", + className: "SecretBase" + } + }, + encryptedCredential: { + serializedName: "typeProperties.encryptedCredential", + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + } + } + } +}; + +export const SmartsheetLinkedService: coreClient.CompositeMapper = { + serializedName: "Smartsheet", + type: { + name: "Composite", + className: "SmartsheetLinkedService", + uberParent: "LinkedService", + additionalProperties: { type: { name: "Object" } }, + polymorphicDiscriminator: LinkedService.type.polymorphicDiscriminator, + modelProperties: { + ...LinkedService.type.modelProperties, + apiToken: { + serializedName: "typeProperties.apiToken", + type: { + name: "Composite", + className: "SecretBase" + } + }, + encryptedCredential: { + serializedName: "typeProperties.encryptedCredential", + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + } + } + } +}; + +export const ZendeskLinkedService: coreClient.CompositeMapper = { + serializedName: "Zendesk", + type: { + name: "Composite", + className: "ZendeskLinkedService", + uberParent: "LinkedService", + additionalProperties: { type: { name: "Object" } }, + polymorphicDiscriminator: LinkedService.type.polymorphicDiscriminator, + modelProperties: { + ...LinkedService.type.modelProperties, + authenticationType: { + serializedName: "typeProperties.authenticationType", + required: true, + type: { + name: "String" + } + }, + url: { + serializedName: "typeProperties.url", + required: true, + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + }, + userName: { + serializedName: "typeProperties.userName", + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + }, + password: { + serializedName: "typeProperties.password", + type: { + name: "Composite", + className: "SecretBase" + } + }, + apiToken: { + serializedName: "typeProperties.apiToken", + type: { + name: "Composite", + className: "SecretBase" + } + }, + encryptedCredential: { + serializedName: "typeProperties.encryptedCredential", + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + } + } + } +}; + export const AmazonRedshiftLinkedService: coreClient.CompositeMapper = { serializedName: "AmazonRedshift", type: { @@ -27195,6 +27373,10 @@ export let discriminators = { "LinkedService.SapOpenHub": SapOpenHubLinkedService, "LinkedService.RestService": RestServiceLinkedService, "LinkedService.AmazonS3": AmazonS3LinkedService, + "LinkedService.TeamDesk": TeamDeskLinkedService, + "LinkedService.Quickbase": QuickbaseLinkedService, + "LinkedService.Smartsheet": SmartsheetLinkedService, + "LinkedService.Zendesk": ZendeskLinkedService, "LinkedService.AmazonRedshift": AmazonRedshiftLinkedService, "LinkedService.CustomDataSource": CustomDataSourceLinkedService, "LinkedService.AzureSearch": AzureSearchLinkedService, diff --git a/sdk/datafactory/arm-datafactory/tsconfig.json b/sdk/datafactory/arm-datafactory/tsconfig.json index 1fa076b90d1a..3e6ae96443f3 100644 --- a/sdk/datafactory/arm-datafactory/tsconfig.json +++ b/sdk/datafactory/arm-datafactory/tsconfig.json @@ -15,12 +15,7 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-datafactory": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", From dbdf7b97920ed07812212c3f498da8a61295db48 Mon Sep 17 00:00:00 2001 From: colawwj Date: Mon, 21 Feb 2022 15:33:19 +0800 Subject: [PATCH 3/5] update --- sdk/datafactory/arm-datafactory/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/datafactory/arm-datafactory/package.json b/sdk/datafactory/arm-datafactory/package.json index e636a6a4dfe7..acd7f6ef7411 100644 --- a/sdk/datafactory/arm-datafactory/package.json +++ b/sdk/datafactory/arm-datafactory/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for DataFactoryManagementClient.", - "version": "1.0.0-beta.1", + "version": "10.2.0", "engines": { "node": ">=12.0.0" }, @@ -107,4 +107,4 @@ ] }, "autoPublish": true -} \ No newline at end of file +} From 26af16eee442592afb3a551004f5f1ce6a4fb2d9 Mon Sep 17 00:00:00 2001 From: colawwj Date: Tue, 22 Feb 2022 09:12:25 +0800 Subject: [PATCH 4/5] update --- sdk/datafactory/arm-datafactory/CHANGELOG.md | 2 +- sdk/datafactory/arm-datafactory/package.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sdk/datafactory/arm-datafactory/CHANGELOG.md b/sdk/datafactory/arm-datafactory/CHANGELOG.md index 1e44ed5dc888..3450231639c3 100644 --- a/sdk/datafactory/arm-datafactory/CHANGELOG.md +++ b/sdk/datafactory/arm-datafactory/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 10.2.0 (2022-02-21) +## 10.2.0 (2022-02-22) **Features** diff --git a/sdk/datafactory/arm-datafactory/package.json b/sdk/datafactory/arm-datafactory/package.json index acd7f6ef7411..e636a6a4dfe7 100644 --- a/sdk/datafactory/arm-datafactory/package.json +++ b/sdk/datafactory/arm-datafactory/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for DataFactoryManagementClient.", - "version": "10.2.0", + "version": "1.0.0-beta.1", "engines": { "node": ">=12.0.0" }, @@ -107,4 +107,4 @@ ] }, "autoPublish": true -} +} \ No newline at end of file From a78d147624f0a460ff06ade4c4f84795cdb5c846 Mon Sep 17 00:00:00 2001 From: colawwj Date: Tue, 22 Feb 2022 09:21:15 +0800 Subject: [PATCH 5/5] update --- sdk/datafactory/arm-datafactory/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/datafactory/arm-datafactory/package.json b/sdk/datafactory/arm-datafactory/package.json index e636a6a4dfe7..acd7f6ef7411 100644 --- a/sdk/datafactory/arm-datafactory/package.json +++ b/sdk/datafactory/arm-datafactory/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for DataFactoryManagementClient.", - "version": "1.0.0-beta.1", + "version": "10.2.0", "engines": { "node": ">=12.0.0" }, @@ -107,4 +107,4 @@ ] }, "autoPublish": true -} \ No newline at end of file +}