From 9f4b4f168bdf3208df0505f2a6bf45a47c84f454 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 14 Dec 2022 08:40:19 +0000 Subject: [PATCH] CodeGen from PR 21888 in Azure/azure-rest-api-specs Merge f41a8e5e05c718909c7f50495bb9a55d0d9dd5b7 into 2647ee494ecbe4668bdf16486207fecd67843e57 --- common/config/rush/pnpm-lock.yaml | 10 +- sdk/datafactory/arm-datafactory/CHANGELOG.md | 32 +- sdk/datafactory/arm-datafactory/_meta.json | 8 +- sdk/datafactory/arm-datafactory/package.json | 16 +- .../review/arm-datafactory.api.md | 72 +++- .../src/dataFactoryManagementClient.ts | 15 +- .../arm-datafactory/src/models/index.ts | 142 ++++++-- .../arm-datafactory/src/models/mappers.ts | 262 +++++++++----- .../arm-datafactory/src/models/parameters.ts | 24 ++ .../src/operations/credentialOperations.ts | 341 ++++++++++++++++++ .../src/operations/dataFlowDebugSession.ts | 1 - .../src/operations/dataFlows.ts | 1 - .../src/operations/datasets.ts | 1 - .../src/operations/factories.ts | 2 - .../src/operations/globalParameters.ts | 1 - .../arm-datafactory/src/operations/index.ts | 1 + .../src/operations/integrationRuntimes.ts | 1 - .../src/operations/linkedServices.ts | 1 - .../src/operations/managedPrivateEndpoints.ts | 1 - .../src/operations/managedVirtualNetworks.ts | 1 - .../src/operations/operations.ts | 1 - .../src/operations/pipelines.ts | 1 - .../operations/privateEndPointConnections.ts | 1 - .../src/operations/triggers.ts | 1 - .../credentialOperations.ts | 75 ++++ .../src/operationsInterfaces/index.ts | 1 + .../arm-datafactory/src/pagingHelper.ts | 8 +- .../arm-datafactory/test/sampleTest.ts | 43 +++ sdk/datafactory/arm-datafactory/tsconfig.json | 10 +- 29 files changed, 875 insertions(+), 199 deletions(-) create mode 100644 sdk/datafactory/arm-datafactory/src/operations/credentialOperations.ts create mode 100644 sdk/datafactory/arm-datafactory/src/operationsInterfaces/credentialOperations.ts create mode 100644 sdk/datafactory/arm-datafactory/test/sampleTest.ts diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 81a5887584b3..3c73c83fbce6 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -3830,7 +3830,7 @@ packages: dependencies: semver: 7.3.8 shelljs: 0.8.5 - typescript: 5.0.0-dev.20221213 + typescript: 5.0.0-dev.20221214 dev: false /downlevel-dts/0.8.0: @@ -8770,8 +8770,8 @@ packages: hasBin: true dev: false - /typescript/5.0.0-dev.20221213: - resolution: {integrity: sha512-CONCSaeW3yqMVDra8geo9H+hDek37C1z/b05gWtzTJP4vVQ+exSRJmPNqhvuGyEs5En8wcjH/iXVGYQymJC4aQ==} + /typescript/5.0.0-dev.20221214: + resolution: {integrity: sha512-sg2HlS57Zxo1AbNpq+lUY9yHR3qA8DmP2nS8KBkvGO86PXCYtWYxkPhbwV8KtAlU50GNmj20fEVJK7kxvZdXfw==} engines: {node: '>=4.2.0'} hasBin: true dev: false @@ -11412,7 +11412,7 @@ packages: dev: false file:projects/arm-datafactory.tgz: - resolution: {integrity: sha512-6ENvRJON3IOdZX0+eArEaLoE1ryKBtMVTUmATWNa/FLZUio/9j4daiqBVslGLOY4r6e7iwAilGbptlAdlYbQ/g==, tarball: file:projects/arm-datafactory.tgz} + resolution: {integrity: sha512-GJaX2nKgF5lCQ4x6mEQ5OnqVlJLwrygA3B2m17AlLq1Iv29N5hORstHVOcSqMZJqv5HlK3NT51uotv+Iv+aUYA==, tarball: file:projects/arm-datafactory.tgz} name: '@rush-temp/arm-datafactory' version: 0.0.0 dependencies: @@ -11432,7 +11432,7 @@ packages: rollup: 2.79.1 rollup-plugin-sourcemaps: 0.6.3_7459fe0d37cbbca90688e529585c250d tslib: 2.4.1 - typescript: 4.6.4 + typescript: 4.8.4 uglify-js: 3.17.4 transitivePeerDependencies: - supports-color diff --git a/sdk/datafactory/arm-datafactory/CHANGELOG.md b/sdk/datafactory/arm-datafactory/CHANGELOG.md index 33404e7eea29..bd59e8696724 100644 --- a/sdk/datafactory/arm-datafactory/CHANGELOG.md +++ b/sdk/datafactory/arm-datafactory/CHANGELOG.md @@ -1,15 +1,31 @@ # Release History + +## 11.0.0 (2022-12-14) + +**Features** -## 10.10.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed + - Added operation group CredentialOperations + - Added Interface CredentialListResponse + - Added Interface CredentialOperationsCreateOrUpdateOptionalParams + - Added Interface CredentialOperationsDeleteOptionalParams + - Added Interface CredentialOperationsGetOptionalParams + - Added Interface CredentialOperationsListByFactoryNextOptionalParams + - Added Interface CredentialOperationsListByFactoryOptionalParams + - Added Interface ManagedIdentityCredentialResource + - Added Interface PowerBILinkedService + - Added Type Alias CredentialOperationsCreateOrUpdateResponse + - Added Type Alias CredentialOperationsGetResponse + - Added Type Alias CredentialOperationsListByFactoryNextResponse + - Added Type Alias CredentialOperationsListByFactoryResponse -### Other Changes +**Breaking Changes** + - Parameter exportSettings of interface SnowflakeSource is now required + - Type of parameter type of interface Credential_2 is changed from "ServicePrincipal" | "ManagedIdentity" to "ManagedIdentity" | "ServicePrincipal" + - Type of parameter type of interface LinkedService is changed from "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" | "SapOdp" | "RestService" | "TeamDesk" | "Quickbase" | "Smartsheet" | "Zendesk" | "Dataworld" | "AppFigures" | "Asana" | "Twilio" | "GoogleSheets" | "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" | "AzureSynapseArtifacts" to "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" | "SapOdp" | "RestService" | "TeamDesk" | "Quickbase" | "Smartsheet" | "Zendesk" | "Dataworld" | "AppFigures" | "Asana" | "Twilio" | "GoogleSheets" | "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" | "AzureSynapseArtifacts" | "PowerBI" + - Class DataFactoryManagementClient has a new required parameter credentialOperations + + ## 10.10.0 (2022-11-04) **Features** diff --git a/sdk/datafactory/arm-datafactory/_meta.json b/sdk/datafactory/arm-datafactory/_meta.json index 1b9dc9bcb813..c8c293e6fe5b 100644 --- a/sdk/datafactory/arm-datafactory/_meta.json +++ b/sdk/datafactory/arm-datafactory/_meta.json @@ -1,8 +1,8 @@ { - "commit": "8fcc099eeda14f210476c935241d429f46c2d02e", + "commit": "1a7ed23039d926c3d4fe77008e300d653e41602e", "readme": "specification/datafactory/resource-manager/readme.md", - "autorest_command": "autorest --version=3.8.4 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\datafactory\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.3.20221101.1 --generate-sample=true", + "autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/datafactory/resource-manager/readme.md --use=@autorest/typescript@6.0.0-rc.5", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.4.2", - "use": "@autorest/typescript@6.0.0-rc.3.20221101.1" + "release_tool": "@azure-tools/js-sdk-release-tools@2.5.3", + "use": "@autorest/typescript@6.0.0-rc.5" } \ No newline at end of file diff --git a/sdk/datafactory/arm-datafactory/package.json b/sdk/datafactory/arm-datafactory/package.json index 269d974cc748..022b99fd1f2c 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.10.1", + "version": "11.0.0", "engines": { "node": ">=14.0.0" }, @@ -36,7 +36,7 @@ "mkdirp": "^1.0.4", "rollup": "^2.66.1", "rollup-plugin-sourcemaps": "^0.6.3", - "typescript": "~4.6.0", + "typescript": "~4.8.0", "uglify-js": "^3.4.9", "rimraf": "^3.0.0", "@azure/identity": "^2.0.1", @@ -110,13 +110,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 9b13403b7af7..97b1bfa9b6ca 100644 --- a/sdk/datafactory/arm-datafactory/review/arm-datafactory.api.md +++ b/sdk/datafactory/arm-datafactory/review/arm-datafactory.api.md @@ -1499,10 +1499,58 @@ interface Credential_2 { [property: string]: any; annotations?: any[]; description?: string; - type: "ServicePrincipal" | "ManagedIdentity"; + type: "ManagedIdentity" | "ServicePrincipal"; } export { Credential_2 as Credential } +// @public +export interface CredentialListResponse { + nextLink?: string; + value: ManagedIdentityCredentialResource[]; +} + +// @public +export interface CredentialOperations { + createOrUpdate(resourceGroupName: string, factoryName: string, credentialName: string, credential: ManagedIdentityCredentialResource, options?: CredentialOperationsCreateOrUpdateOptionalParams): Promise; + delete(resourceGroupName: string, factoryName: string, credentialName: string, options?: CredentialOperationsDeleteOptionalParams): Promise; + get(resourceGroupName: string, factoryName: string, credentialName: string, options?: CredentialOperationsGetOptionalParams): Promise; + listByFactory(resourceGroupName: string, factoryName: string, options?: CredentialOperationsListByFactoryOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface CredentialOperationsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + ifMatch?: string; +} + +// @public +export type CredentialOperationsCreateOrUpdateResponse = ManagedIdentityCredentialResource; + +// @public +export interface CredentialOperationsDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface CredentialOperationsGetOptionalParams extends coreClient.OperationOptions { + ifNoneMatch?: string; +} + +// @public +export type CredentialOperationsGetResponse = ManagedIdentityCredentialResource; + +// @public +export interface CredentialOperationsListByFactoryNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type CredentialOperationsListByFactoryNextResponse = CredentialListResponse; + +// @public +export interface CredentialOperationsListByFactoryOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type CredentialOperationsListByFactoryResponse = CredentialListResponse; + // @public export interface CredentialReference { [property: string]: any; @@ -1519,7 +1567,7 @@ export interface CredentialResource extends SubResource { } // @public (undocumented) -export type CredentialUnion = Credential_2 | ServicePrincipalCredential | ManagedIdentityCredential; +export type CredentialUnion = Credential_2 | ManagedIdentityCredential | ServicePrincipalCredential; // @public export interface CustomActivity extends ExecutionActivity { @@ -1612,6 +1660,8 @@ export class DataFactoryManagementClient extends coreClient.ServiceClient { // (undocumented) apiVersion: string; // (undocumented) + credentialOperations: CredentialOperations; + // (undocumented) dataFlowDebugSession: DataFlowDebugSession; // (undocumented) dataFlows: DataFlows; @@ -4864,7 +4914,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" | "SapOdp" | "RestService" | "TeamDesk" | "Quickbase" | "Smartsheet" | "Zendesk" | "Dataworld" | "AppFigures" | "Asana" | "Twilio" | "GoogleSheets" | "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" | "AzureSynapseArtifacts"; + 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" | "SapOdp" | "RestService" | "TeamDesk" | "Quickbase" | "Smartsheet" | "Zendesk" | "Dataworld" | "AppFigures" | "Asana" | "Twilio" | "GoogleSheets" | "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" | "AzureSynapseArtifacts" | "PowerBI"; } // @public @@ -4935,7 +4985,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 | SapOdpLinkedService | RestServiceLinkedService | TeamDeskLinkedService | QuickbaseLinkedService | SmartsheetLinkedService | ZendeskLinkedService | DataworldLinkedService | AppFiguresLinkedService | AsanaLinkedService | TwilioLinkedService | GoogleSheetsLinkedService | 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 | AzureSynapseArtifactsLinkedService; +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 | SapOdpLinkedService | RestServiceLinkedService | TeamDeskLinkedService | QuickbaseLinkedService | SmartsheetLinkedService | ZendeskLinkedService | DataworldLinkedService | AppFiguresLinkedService | AsanaLinkedService | TwilioLinkedService | GoogleSheetsLinkedService | 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 | AzureSynapseArtifactsLinkedService | PowerBILinkedService; // @public export interface LogLocationSettings { @@ -4996,6 +5046,11 @@ export interface ManagedIdentityCredential extends Credential_2 { type: "ManagedIdentity"; } +// @public +export interface ManagedIdentityCredentialResource extends SubResource { + properties: ManagedIdentityCredential; +} + // @public export interface ManagedIntegrationRuntime extends IntegrationRuntime { computeProperties?: IntegrationRuntimeComputeProperties; @@ -6056,6 +6111,13 @@ export interface PostgreSqlTableDataset extends Dataset { type: "PostgreSqlTable"; } +// @public +export interface PowerBILinkedService extends LinkedService { + tenantId: string; + type: "PowerBI"; + workspaceId: string; +} + // @public export interface PowerQuerySink extends DataFlowSink { script?: string; @@ -7140,7 +7202,7 @@ export interface SnowflakeSink extends CopySink { // @public export interface SnowflakeSource extends CopySource { - exportSettings?: SnowflakeExportCopyCommand; + exportSettings: SnowflakeExportCopyCommand; query?: any; type: "SnowflakeSource"; } diff --git a/sdk/datafactory/arm-datafactory/src/dataFactoryManagementClient.ts b/sdk/datafactory/arm-datafactory/src/dataFactoryManagementClient.ts index 633d0da610a5..8f2d722e3142 100644 --- a/sdk/datafactory/arm-datafactory/src/dataFactoryManagementClient.ts +++ b/sdk/datafactory/arm-datafactory/src/dataFactoryManagementClient.ts @@ -32,6 +32,7 @@ import { DataFlowDebugSessionImpl, ManagedVirtualNetworksImpl, ManagedPrivateEndpointsImpl, + CredentialOperationsImpl, PrivateEndPointConnectionsImpl, PrivateEndpointConnectionImpl, PrivateLinkResourcesImpl, @@ -55,6 +56,7 @@ import { DataFlowDebugSession, ManagedVirtualNetworks, ManagedPrivateEndpoints, + CredentialOperations, PrivateEndPointConnections, PrivateEndpointConnection, PrivateLinkResources, @@ -94,22 +96,19 @@ export class DataFactoryManagementClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-datafactory/10.10.1`; + const packageDetails = `azsdk-js-arm-datafactory/11.0.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` : `${packageDetails}`; - if (!options.credentialScopes) { - options.credentialScopes = ["https://management.azure.com/.default"]; - } const optionsWithDefaults = { ...defaults, ...options, userAgentOptions: { userAgentPrefix }, - baseUri: + endpoint: options.endpoint ?? options.baseUri ?? "https://management.azure.com" }; super(optionsWithDefaults); @@ -135,7 +134,9 @@ export class DataFactoryManagementClient extends coreClient.ServiceClient { this.pipeline.addPolicy( coreRestPipeline.bearerTokenAuthenticationPolicy({ credential: credentials, - scopes: `${optionsWithDefaults.credentialScopes}`, + scopes: + optionsWithDefaults.credentialScopes ?? + `${optionsWithDefaults.endpoint}/.default`, challengeCallbacks: { authorizeRequestOnChallenge: coreClient.authorizeRequestOnClaimChallenge @@ -168,6 +169,7 @@ export class DataFactoryManagementClient extends coreClient.ServiceClient { this.dataFlowDebugSession = new DataFlowDebugSessionImpl(this); this.managedVirtualNetworks = new ManagedVirtualNetworksImpl(this); this.managedPrivateEndpoints = new ManagedPrivateEndpointsImpl(this); + this.credentialOperations = new CredentialOperationsImpl(this); this.privateEndPointConnections = new PrivateEndPointConnectionsImpl(this); this.privateEndpointConnection = new PrivateEndpointConnectionImpl(this); this.privateLinkResources = new PrivateLinkResourcesImpl(this); @@ -220,6 +222,7 @@ export class DataFactoryManagementClient extends coreClient.ServiceClient { dataFlowDebugSession: DataFlowDebugSession; managedVirtualNetworks: ManagedVirtualNetworks; managedPrivateEndpoints: ManagedPrivateEndpoints; + credentialOperations: CredentialOperations; privateEndPointConnections: PrivateEndPointConnections; privateEndpointConnection: PrivateEndpointConnection; privateLinkResources: PrivateLinkResources; diff --git a/sdk/datafactory/arm-datafactory/src/models/index.ts b/sdk/datafactory/arm-datafactory/src/models/index.ts index 59949fe9f3f4..402b40ebcc69 100644 --- a/sdk/datafactory/arm-datafactory/src/models/index.ts +++ b/sdk/datafactory/arm-datafactory/src/models/index.ts @@ -140,7 +140,8 @@ export type LinkedServiceUnion = | AzureFunctionLinkedService | SnowflakeLinkedService | SharePointOnlineListLinkedService - | AzureSynapseArtifactsLinkedService; + | AzureSynapseArtifactsLinkedService + | PowerBILinkedService; export type DatasetUnion = | Dataset | AmazonS3Dataset @@ -255,14 +256,14 @@ export type DataFlowUnion = | MappingDataFlow | Flowlet | WranglingDataFlow; +export type CredentialUnion = + | Credential + | ManagedIdentityCredential + | ServicePrincipalCredential; export type SecretBaseUnion = | SecretBase | SecureString | AzureKeyVaultSecretReference; -export type CredentialUnion = - | Credential - | ServicePrincipalCredential - | ManagedIdentityCredential; export type DatasetLocationUnion = | DatasetLocation | AzureBlobStorageLocation @@ -1359,7 +1360,8 @@ export interface LinkedService { | "AzureFunction" | "Snowflake" | "SharePointOnlineList" - | "AzureSynapseArtifacts"; + | "AzureSynapseArtifacts" + | "PowerBI"; /** Describes unknown properties. The value of an unknown property can be of "any" type. */ [property: string]: any; /** The integration runtime reference. */ @@ -2242,6 +2244,26 @@ export interface ConnectionStateProperties { readonly status?: string; } +/** A list of credential resources. */ +export interface CredentialListResponse { + /** List of credentials. */ + value: ManagedIdentityCredentialResource[]; + /** The link to the next page of results, if any remaining results exist. */ + nextLink?: string; +} + +/** The Azure Data Factory nested object which contains the information and credential which can be used to connect with related store or compute resource. */ +export interface Credential { + /** Polymorphic discriminator, which specifies the different types this object can be */ + type: "ManagedIdentity" | "ServicePrincipal"; + /** Describes unknown properties. The value of an unknown property can be of "any" type. */ + [property: string]: any; + /** Credential description. */ + description?: string; + /** List of tags that can be used for describing the Credential. */ + annotations?: any[]; +} + /** A list of linked service resources. */ export interface PrivateEndpointConnectionListResponse { /** List of Private Endpoint Connections. */ @@ -2412,18 +2434,6 @@ export interface CredentialReference { referenceName: string; } -/** The Azure Data Factory nested object which contains the information and credential which can be used to connect with related store or compute resource. */ -export interface Credential { - /** Polymorphic discriminator, which specifies the different types this object can be */ - type: "ServicePrincipal" | "ManagedIdentity"; - /** Describes unknown properties. The value of an unknown property can be of "any" type. */ - [property: string]: any; - /** Credential description. */ - description?: string; - /** List of tags that can be used for describing the Credential. */ - annotations?: any[]; -} - /** A data flow transformation. */ export interface Transformation { /** Transformation name. */ @@ -3847,6 +3857,12 @@ export interface ManagedPrivateEndpointResource extends SubResource { properties: ManagedPrivateEndpoint; } +/** Credential resource type. */ +export interface ManagedIdentityCredentialResource extends SubResource { + /** Managed Identity Credential properties. */ + properties: ManagedIdentityCredential; +} + /** Private Endpoint Connection ARM resource. */ export interface PrivateEndpointConnectionResource extends SubResource { /** Core resource properties */ @@ -6333,6 +6349,16 @@ export interface AzureSynapseArtifactsLinkedService extends LinkedService { workspaceResourceId?: any; } +/** Power BI linked service. */ +export interface PowerBILinkedService extends LinkedService { + /** Polymorphic discriminator, which specifies the different types this object can be */ + type: "PowerBI"; + /** The Power BI workspace id. */ + workspaceId: string; + /** The tenant id to which the Power BI workspace belongs. */ + tenantId: string; +} + /** A single Amazon Simple Storage Service (S3) object or a set of S3 objects. */ export interface AmazonS3Dataset extends Dataset { /** Polymorphic discriminator, which specifies the different types this object can be */ @@ -7538,6 +7564,26 @@ export interface LinkedServiceDebugResource extends SubResourceDebugResource { properties: LinkedServiceUnion; } +/** Managed identity credential. */ +export interface ManagedIdentityCredential extends Credential { + /** Polymorphic discriminator, which specifies the different types this object can be */ + type: "ManagedIdentity"; + /** The resource id of user assigned managed identity */ + resourceId?: string; +} + +/** Service principal credential. */ +export interface ServicePrincipalCredential extends Credential { + /** Polymorphic discriminator, which specifies the different types this object can be */ + type: "ServicePrincipal"; + /** The app ID of the service principal used to authenticate */ + servicePrincipalId?: any; + /** The key of the service principal used to authenticate. */ + servicePrincipalKey?: AzureKeyVaultSecretReference; + /** The ID of the tenant to which the service principal belongs */ + tenant?: any; +} + /** Azure Data Factory secure string definition. The string value will be masked with asterisks '*' during Get or List API calls. */ export interface SecureString extends SecretBase { /** Polymorphic discriminator, which specifies the different types this object can be */ @@ -7558,26 +7604,6 @@ export interface AzureKeyVaultSecretReference extends SecretBase { secretVersion?: any; } -/** Service principal credential. */ -export interface ServicePrincipalCredential extends Credential { - /** Polymorphic discriminator, which specifies the different types this object can be */ - type: "ServicePrincipal"; - /** The app ID of the service principal used to authenticate */ - servicePrincipalId?: any; - /** The key of the service principal used to authenticate. */ - servicePrincipalKey?: AzureKeyVaultSecretReference; - /** The ID of the tenant to which the service principal belongs */ - tenant?: any; -} - -/** Managed identity credential. */ -export interface ManagedIdentityCredential extends Credential { - /** Polymorphic discriminator, which specifies the different types this object can be */ - type: "ManagedIdentity"; - /** The resource id of user assigned managed identity */ - resourceId?: string; -} - /** Transformation for data flow source. */ export interface DataFlowSource extends Transformation { /** Schema linked service reference. */ @@ -8811,7 +8837,7 @@ export interface SnowflakeSource extends CopySource { /** Snowflake Sql query. Type: string (or Expression with resultType string). */ query?: any; /** Snowflake export settings. */ - exportSettings?: SnowflakeExportCopyCommand; + exportSettings: SnowflakeExportCopyCommand; } /** A copy activity Azure Databricks Delta Lake source. */ @@ -13791,6 +13817,44 @@ export interface ManagedPrivateEndpointsListByFactoryNextOptionalParams /** Contains response data for the listByFactoryNext operation. */ export type ManagedPrivateEndpointsListByFactoryNextResponse = ManagedPrivateEndpointListResponse; +/** Optional parameters. */ +export interface CredentialOperationsListByFactoryOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByFactory operation. */ +export type CredentialOperationsListByFactoryResponse = CredentialListResponse; + +/** Optional parameters. */ +export interface CredentialOperationsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** ETag of the credential entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. */ + ifMatch?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type CredentialOperationsCreateOrUpdateResponse = ManagedIdentityCredentialResource; + +/** Optional parameters. */ +export interface CredentialOperationsGetOptionalParams + extends coreClient.OperationOptions { + /** ETag of the credential entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. */ + ifNoneMatch?: string; +} + +/** Contains response data for the get operation. */ +export type CredentialOperationsGetResponse = ManagedIdentityCredentialResource; + +/** Optional parameters. */ +export interface CredentialOperationsDeleteOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface CredentialOperationsListByFactoryNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByFactoryNext operation. */ +export type CredentialOperationsListByFactoryNextResponse = CredentialListResponse; + /** Optional parameters. */ export interface PrivateEndPointConnectionsListByFactoryOptionalParams extends coreClient.OperationOptions {} diff --git a/sdk/datafactory/arm-datafactory/src/models/mappers.ts b/sdk/datafactory/arm-datafactory/src/models/mappers.ts index 64683bb8dd75..38fb60f99f03 100644 --- a/sdk/datafactory/arm-datafactory/src/models/mappers.ts +++ b/sdk/datafactory/arm-datafactory/src/models/mappers.ts @@ -3523,6 +3523,74 @@ export const ConnectionStateProperties: coreClient.CompositeMapper = { } }; +export const CredentialListResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CredentialListResponse", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ManagedIdentityCredentialResource" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const Credential: coreClient.CompositeMapper = { + serializedName: "Credential", + type: { + name: "Composite", + className: "Credential", + uberParent: "Credential", + additionalProperties: { type: { name: "Object" } }, + polymorphicDiscriminator: { + serializedName: "type", + clientName: "type" + }, + modelProperties: { + type: { + serializedName: "type", + required: true, + type: { + name: "String" + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + }, + annotations: { + serializedName: "annotations", + type: { + name: "Sequence", + element: { + type: { + name: "any" + } + } + } + } + } + } +}; + export const PrivateEndpointConnectionListResponse: coreClient.CompositeMapper = { type: { name: "Composite", @@ -4009,46 +4077,6 @@ export const CredentialReference: coreClient.CompositeMapper = { } }; -export const Credential: coreClient.CompositeMapper = { - serializedName: "Credential", - type: { - name: "Composite", - className: "Credential", - uberParent: "Credential", - additionalProperties: { type: { name: "Object" } }, - polymorphicDiscriminator: { - serializedName: "type", - clientName: "type" - }, - modelProperties: { - type: { - serializedName: "type", - required: true, - type: { - name: "String" - } - }, - description: { - serializedName: "description", - type: { - name: "String" - } - }, - annotations: { - serializedName: "annotations", - type: { - name: "Sequence", - element: { - type: { - name: "any" - } - } - } - } - } - } -}; - export const Transformation: coreClient.CompositeMapper = { type: { name: "Composite", @@ -7472,6 +7500,23 @@ export const ManagedPrivateEndpointResource: coreClient.CompositeMapper = { } }; +export const ManagedIdentityCredentialResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedIdentityCredentialResource", + modelProperties: { + ...SubResource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "ManagedIdentityCredential" + } + } + } + } +}; + export const PrivateEndpointConnectionResource: coreClient.CompositeMapper = { type: { name: "Composite", @@ -14665,6 +14710,34 @@ export const AzureSynapseArtifactsLinkedService: coreClient.CompositeMapper = { } }; +export const PowerBILinkedService: coreClient.CompositeMapper = { + serializedName: "PowerBI", + type: { + name: "Composite", + className: "PowerBILinkedService", + uberParent: "LinkedService", + additionalProperties: { type: { name: "Object" } }, + polymorphicDiscriminator: LinkedService.type.polymorphicDiscriminator, + modelProperties: { + ...LinkedService.type.modelProperties, + workspaceId: { + serializedName: "typeProperties.workspaceId", + required: true, + type: { + name: "String" + } + }, + tenantId: { + serializedName: "typeProperties.tenantId", + required: true, + type: { + name: "String" + } + } + } + } +}; + export const AmazonS3Dataset: coreClient.CompositeMapper = { serializedName: "AmazonS3Object", type: { @@ -17862,18 +17935,18 @@ export const LinkedServiceDebugResource: coreClient.CompositeMapper = { } }; -export const SecureString: coreClient.CompositeMapper = { - serializedName: "SecureString", +export const ManagedIdentityCredential: coreClient.CompositeMapper = { + serializedName: "ManagedIdentity", type: { name: "Composite", - className: "SecureString", - uberParent: "SecretBase", - polymorphicDiscriminator: SecretBase.type.polymorphicDiscriminator, + className: "ManagedIdentityCredential", + uberParent: "Credential", + additionalProperties: { type: { name: "Object" } }, + polymorphicDiscriminator: Credential.type.polymorphicDiscriminator, modelProperties: { - ...SecretBase.type.modelProperties, - value: { - serializedName: "value", - required: true, + ...Credential.type.modelProperties, + resourceId: { + serializedName: "typeProperties.resourceId", type: { name: "String" } @@ -17882,39 +17955,6 @@ export const SecureString: coreClient.CompositeMapper = { } }; -export const AzureKeyVaultSecretReference: coreClient.CompositeMapper = { - serializedName: "AzureKeyVaultSecret", - type: { - name: "Composite", - className: "AzureKeyVaultSecretReference", - uberParent: "SecretBase", - polymorphicDiscriminator: SecretBase.type.polymorphicDiscriminator, - modelProperties: { - ...SecretBase.type.modelProperties, - store: { - serializedName: "store", - type: { - name: "Composite", - className: "LinkedServiceReference" - } - }, - secretName: { - serializedName: "secretName", - required: true, - type: { - name: "any" - } - }, - secretVersion: { - serializedName: "secretVersion", - type: { - name: "any" - } - } - } - } -}; - export const ServicePrincipalCredential: coreClient.CompositeMapper = { serializedName: "ServicePrincipal", type: { @@ -17948,18 +17988,18 @@ export const ServicePrincipalCredential: coreClient.CompositeMapper = { } }; -export const ManagedIdentityCredential: coreClient.CompositeMapper = { - serializedName: "ManagedIdentity", +export const SecureString: coreClient.CompositeMapper = { + serializedName: "SecureString", type: { name: "Composite", - className: "ManagedIdentityCredential", - uberParent: "Credential", - additionalProperties: { type: { name: "Object" } }, - polymorphicDiscriminator: Credential.type.polymorphicDiscriminator, + className: "SecureString", + uberParent: "SecretBase", + polymorphicDiscriminator: SecretBase.type.polymorphicDiscriminator, modelProperties: { - ...Credential.type.modelProperties, - resourceId: { - serializedName: "typeProperties.resourceId", + ...SecretBase.type.modelProperties, + value: { + serializedName: "value", + required: true, type: { name: "String" } @@ -17968,6 +18008,39 @@ export const ManagedIdentityCredential: coreClient.CompositeMapper = { } }; +export const AzureKeyVaultSecretReference: coreClient.CompositeMapper = { + serializedName: "AzureKeyVaultSecret", + type: { + name: "Composite", + className: "AzureKeyVaultSecretReference", + uberParent: "SecretBase", + polymorphicDiscriminator: SecretBase.type.polymorphicDiscriminator, + modelProperties: { + ...SecretBase.type.modelProperties, + store: { + serializedName: "store", + type: { + name: "Composite", + className: "LinkedServiceReference" + } + }, + secretName: { + serializedName: "secretName", + required: true, + type: { + name: "any" + } + }, + secretVersion: { + serializedName: "secretVersion", + type: { + name: "any" + } + } + } + } +}; + export const DataFlowSource: coreClient.CompositeMapper = { type: { name: "Composite", @@ -26610,8 +26683,8 @@ export let discriminators = { Activity: Activity, Trigger: Trigger, DataFlow: DataFlow, - SecretBase: SecretBase, Credential: Credential, + SecretBase: SecretBase, DatasetLocation: DatasetLocation, DatasetStorageFormat: DatasetStorageFormat, CustomSetupBase: CustomSetupBase, @@ -26751,6 +26824,7 @@ export let discriminators = { "LinkedService.Snowflake": SnowflakeLinkedService, "LinkedService.SharePointOnlineList": SharePointOnlineListLinkedService, "LinkedService.AzureSynapseArtifacts": AzureSynapseArtifactsLinkedService, + "LinkedService.PowerBI": PowerBILinkedService, "Dataset.AmazonS3Object": AmazonS3Dataset, "Dataset.Avro": AvroDataset, "Dataset.Excel": ExcelDataset, @@ -26857,10 +26931,10 @@ export let discriminators = { "DataFlow.MappingDataFlow": MappingDataFlow, "DataFlow.Flowlet": Flowlet, "DataFlow.WranglingDataFlow": WranglingDataFlow, + "Credential.ManagedIdentity": ManagedIdentityCredential, + "Credential.ServicePrincipal": ServicePrincipalCredential, "SecretBase.SecureString": SecureString, "SecretBase.AzureKeyVaultSecret": AzureKeyVaultSecretReference, - "Credential.ServicePrincipal": ServicePrincipalCredential, - "Credential.ManagedIdentity": ManagedIdentityCredential, "DatasetLocation.AzureBlobStorageLocation": AzureBlobStorageLocation, "DatasetLocation.AzureBlobFSLocation": AzureBlobFSLocation, "DatasetLocation.AzureDataLakeStoreLocation": AzureDataLakeStoreLocation, diff --git a/sdk/datafactory/arm-datafactory/src/models/parameters.ts b/sdk/datafactory/arm-datafactory/src/models/parameters.ts index da13206c196d..6dadaebc8713 100644 --- a/sdk/datafactory/arm-datafactory/src/models/parameters.ts +++ b/sdk/datafactory/arm-datafactory/src/models/parameters.ts @@ -39,6 +39,7 @@ import { DataFlowDebugCommandRequest as DataFlowDebugCommandRequestMapper, ManagedVirtualNetworkResource as ManagedVirtualNetworkResourceMapper, ManagedPrivateEndpointResource as ManagedPrivateEndpointResourceMapper, + ManagedIdentityCredentialResource as ManagedIdentityCredentialResourceMapper, PrivateLinkConnectionApprovalRequestResource as PrivateLinkConnectionApprovalRequestResourceMapper, GlobalParameterResource as GlobalParameterResourceMapper } from "../models/mappers"; @@ -532,6 +533,29 @@ export const managedPrivateEndpointName: OperationURLParameter = { } }; +export const credential: OperationParameter = { + parameterPath: "credential", + mapper: ManagedIdentityCredentialResourceMapper +}; + +export const credentialName: OperationURLParameter = { + parameterPath: "credentialName", + mapper: { + constraints: { + Pattern: new RegExp( + "^([_A-Za-z0-9]|([_A-Za-z0-9][-_A-Za-z0-9]{0,125}[_A-Za-z0-9]))$" + ), + MaxLength: 127, + MinLength: 1 + }, + serializedName: "credentialName", + required: true, + type: { + name: "String" + } + } +}; + export const privateEndpointWrapper: OperationParameter = { parameterPath: "privateEndpointWrapper", mapper: PrivateLinkConnectionApprovalRequestResourceMapper diff --git a/sdk/datafactory/arm-datafactory/src/operations/credentialOperations.ts b/sdk/datafactory/arm-datafactory/src/operations/credentialOperations.ts new file mode 100644 index 000000000000..c51ea55a6265 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/src/operations/credentialOperations.ts @@ -0,0 +1,341 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { CredentialOperations } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { DataFactoryManagementClient } from "../dataFactoryManagementClient"; +import { + ManagedIdentityCredentialResource, + CredentialOperationsListByFactoryNextOptionalParams, + CredentialOperationsListByFactoryOptionalParams, + CredentialOperationsListByFactoryResponse, + CredentialOperationsCreateOrUpdateOptionalParams, + CredentialOperationsCreateOrUpdateResponse, + CredentialOperationsGetOptionalParams, + CredentialOperationsGetResponse, + CredentialOperationsDeleteOptionalParams, + CredentialOperationsListByFactoryNextResponse +} from "../models"; + +/// +/** Class containing CredentialOperations operations. */ +export class CredentialOperationsImpl implements CredentialOperations { + private readonly client: DataFactoryManagementClient; + + /** + * Initialize a new instance of the class CredentialOperations class. + * @param client Reference to the service client + */ + constructor(client: DataFactoryManagementClient) { + this.client = client; + } + + /** + * List credentials. + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @param options The options parameters. + */ + public listByFactory( + resourceGroupName: string, + factoryName: string, + options?: CredentialOperationsListByFactoryOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByFactoryPagingAll( + resourceGroupName, + factoryName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByFactoryPagingPage( + resourceGroupName, + factoryName, + options, + settings + ); + } + }; + } + + private async *listByFactoryPagingPage( + resourceGroupName: string, + factoryName: string, + options?: CredentialOperationsListByFactoryOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: CredentialOperationsListByFactoryResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByFactory( + resourceGroupName, + factoryName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByFactoryNext( + resourceGroupName, + factoryName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByFactoryPagingAll( + resourceGroupName: string, + factoryName: string, + options?: CredentialOperationsListByFactoryOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByFactoryPagingPage( + resourceGroupName, + factoryName, + options + )) { + yield* page; + } + } + + /** + * List credentials. + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @param options The options parameters. + */ + private _listByFactory( + resourceGroupName: string, + factoryName: string, + options?: CredentialOperationsListByFactoryOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, factoryName, options }, + listByFactoryOperationSpec + ); + } + + /** + * Creates or updates a credential. + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @param credentialName Credential name + * @param credential Credential resource definition. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + factoryName: string, + credentialName: string, + credential: ManagedIdentityCredentialResource, + options?: CredentialOperationsCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, factoryName, credentialName, credential, options }, + createOrUpdateOperationSpec + ); + } + + /** + * Gets a credential. + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @param credentialName Credential name + * @param options The options parameters. + */ + get( + resourceGroupName: string, + factoryName: string, + credentialName: string, + options?: CredentialOperationsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, factoryName, credentialName, options }, + getOperationSpec + ); + } + + /** + * Deletes a credential. + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @param credentialName Credential name + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + factoryName: string, + credentialName: string, + options?: CredentialOperationsDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, factoryName, credentialName, options }, + deleteOperationSpec + ); + } + + /** + * ListByFactoryNext + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @param nextLink The nextLink from the previous successful call to the ListByFactory method. + * @param options The options parameters. + */ + private _listByFactoryNext( + resourceGroupName: string, + factoryName: string, + nextLink: string, + options?: CredentialOperationsListByFactoryNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, factoryName, nextLink, options }, + listByFactoryNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByFactoryOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/credentials", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.CredentialListResponse + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.factoryName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/credentials/{credentialName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ManagedIdentityCredentialResource + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + requestBody: Parameters.credential, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.factoryName, + Parameters.credentialName + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/credentials/{credentialName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ManagedIdentityCredentialResource + }, + 304: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.factoryName, + Parameters.credentialName + ], + headerParameters: [Parameters.accept, Parameters.ifNoneMatch], + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/credentials/{credentialName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.factoryName, + Parameters.credentialName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByFactoryNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.CredentialListResponse + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.factoryName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/datafactory/arm-datafactory/src/operations/dataFlowDebugSession.ts b/sdk/datafactory/arm-datafactory/src/operations/dataFlowDebugSession.ts index d27a186126fb..868245a28eff 100644 --- a/sdk/datafactory/arm-datafactory/src/operations/dataFlowDebugSession.ts +++ b/sdk/datafactory/arm-datafactory/src/operations/dataFlowDebugSession.ts @@ -537,7 +537,6 @@ const queryByFactoryNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.nextLink, diff --git a/sdk/datafactory/arm-datafactory/src/operations/dataFlows.ts b/sdk/datafactory/arm-datafactory/src/operations/dataFlows.ts index cafe22c64c2e..7ff173ccca10 100644 --- a/sdk/datafactory/arm-datafactory/src/operations/dataFlows.ts +++ b/sdk/datafactory/arm-datafactory/src/operations/dataFlows.ts @@ -328,7 +328,6 @@ const listByFactoryNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.nextLink, diff --git a/sdk/datafactory/arm-datafactory/src/operations/datasets.ts b/sdk/datafactory/arm-datafactory/src/operations/datasets.ts index 544ad111bdfa..e858daf967f8 100644 --- a/sdk/datafactory/arm-datafactory/src/operations/datasets.ts +++ b/sdk/datafactory/arm-datafactory/src/operations/datasets.ts @@ -329,7 +329,6 @@ const listByFactoryNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.nextLink, diff --git a/sdk/datafactory/arm-datafactory/src/operations/factories.ts b/sdk/datafactory/arm-datafactory/src/operations/factories.ts index eb85e1c23605..ec998d9461a2 100644 --- a/sdk/datafactory/arm-datafactory/src/operations/factories.ts +++ b/sdk/datafactory/arm-datafactory/src/operations/factories.ts @@ -581,7 +581,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.nextLink, @@ -601,7 +600,6 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.nextLink, diff --git a/sdk/datafactory/arm-datafactory/src/operations/globalParameters.ts b/sdk/datafactory/arm-datafactory/src/operations/globalParameters.ts index e96b63f1dd24..64efd92745e1 100644 --- a/sdk/datafactory/arm-datafactory/src/operations/globalParameters.ts +++ b/sdk/datafactory/arm-datafactory/src/operations/globalParameters.ts @@ -330,7 +330,6 @@ const listByFactoryNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.nextLink, diff --git a/sdk/datafactory/arm-datafactory/src/operations/index.ts b/sdk/datafactory/arm-datafactory/src/operations/index.ts index b877568ac19c..f62a8123bec3 100644 --- a/sdk/datafactory/arm-datafactory/src/operations/index.ts +++ b/sdk/datafactory/arm-datafactory/src/operations/index.ts @@ -23,6 +23,7 @@ export * from "./dataFlows"; export * from "./dataFlowDebugSession"; export * from "./managedVirtualNetworks"; export * from "./managedPrivateEndpoints"; +export * from "./credentialOperations"; export * from "./privateEndPointConnections"; export * from "./privateEndpointConnection"; export * from "./privateLinkResources"; diff --git a/sdk/datafactory/arm-datafactory/src/operations/integrationRuntimes.ts b/sdk/datafactory/arm-datafactory/src/operations/integrationRuntimes.ts index ed63df378bdb..2f141665743e 100644 --- a/sdk/datafactory/arm-datafactory/src/operations/integrationRuntimes.ts +++ b/sdk/datafactory/arm-datafactory/src/operations/integrationRuntimes.ts @@ -1104,7 +1104,6 @@ const listByFactoryNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.nextLink, diff --git a/sdk/datafactory/arm-datafactory/src/operations/linkedServices.ts b/sdk/datafactory/arm-datafactory/src/operations/linkedServices.ts index 1af8156420de..8e899d3d044f 100644 --- a/sdk/datafactory/arm-datafactory/src/operations/linkedServices.ts +++ b/sdk/datafactory/arm-datafactory/src/operations/linkedServices.ts @@ -335,7 +335,6 @@ const listByFactoryNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.nextLink, diff --git a/sdk/datafactory/arm-datafactory/src/operations/managedPrivateEndpoints.ts b/sdk/datafactory/arm-datafactory/src/operations/managedPrivateEndpoints.ts index 24ceddaae89c..2ee1d73c2d50 100644 --- a/sdk/datafactory/arm-datafactory/src/operations/managedPrivateEndpoints.ts +++ b/sdk/datafactory/arm-datafactory/src/operations/managedPrivateEndpoints.ts @@ -376,7 +376,6 @@ const listByFactoryNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.nextLink, diff --git a/sdk/datafactory/arm-datafactory/src/operations/managedVirtualNetworks.ts b/sdk/datafactory/arm-datafactory/src/operations/managedVirtualNetworks.ts index 3ac291f3a03b..aad09cab2b17 100644 --- a/sdk/datafactory/arm-datafactory/src/operations/managedVirtualNetworks.ts +++ b/sdk/datafactory/arm-datafactory/src/operations/managedVirtualNetworks.ts @@ -292,7 +292,6 @@ const listByFactoryNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.nextLink, diff --git a/sdk/datafactory/arm-datafactory/src/operations/operations.ts b/sdk/datafactory/arm-datafactory/src/operations/operations.ts index 7171cc25ff08..23ffbfe5a0ec 100644 --- a/sdk/datafactory/arm-datafactory/src/operations/operations.ts +++ b/sdk/datafactory/arm-datafactory/src/operations/operations.ts @@ -143,7 +143,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.$host, Parameters.nextLink], headerParameters: [Parameters.accept], serializer diff --git a/sdk/datafactory/arm-datafactory/src/operations/pipelines.ts b/sdk/datafactory/arm-datafactory/src/operations/pipelines.ts index 556e39236c58..6bd23669bd36 100644 --- a/sdk/datafactory/arm-datafactory/src/operations/pipelines.ts +++ b/sdk/datafactory/arm-datafactory/src/operations/pipelines.ts @@ -381,7 +381,6 @@ const listByFactoryNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.nextLink, diff --git a/sdk/datafactory/arm-datafactory/src/operations/privateEndPointConnections.ts b/sdk/datafactory/arm-datafactory/src/operations/privateEndPointConnections.ts index 341dd8129873..30865b4c9b68 100644 --- a/sdk/datafactory/arm-datafactory/src/operations/privateEndPointConnections.ts +++ b/sdk/datafactory/arm-datafactory/src/operations/privateEndPointConnections.ts @@ -191,7 +191,6 @@ const listByFactoryNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.nextLink, diff --git a/sdk/datafactory/arm-datafactory/src/operations/triggers.ts b/sdk/datafactory/arm-datafactory/src/operations/triggers.ts index 076726941d98..858b8303b35b 100644 --- a/sdk/datafactory/arm-datafactory/src/operations/triggers.ts +++ b/sdk/datafactory/arm-datafactory/src/operations/triggers.ts @@ -897,7 +897,6 @@ const listByFactoryNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.nextLink, diff --git a/sdk/datafactory/arm-datafactory/src/operationsInterfaces/credentialOperations.ts b/sdk/datafactory/arm-datafactory/src/operationsInterfaces/credentialOperations.ts new file mode 100644 index 000000000000..4fb383f8e57b --- /dev/null +++ b/sdk/datafactory/arm-datafactory/src/operationsInterfaces/credentialOperations.ts @@ -0,0 +1,75 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + ManagedIdentityCredentialResource, + CredentialOperationsListByFactoryOptionalParams, + CredentialOperationsCreateOrUpdateOptionalParams, + CredentialOperationsCreateOrUpdateResponse, + CredentialOperationsGetOptionalParams, + CredentialOperationsGetResponse, + CredentialOperationsDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a CredentialOperations. */ +export interface CredentialOperations { + /** + * List credentials. + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @param options The options parameters. + */ + listByFactory( + resourceGroupName: string, + factoryName: string, + options?: CredentialOperationsListByFactoryOptionalParams + ): PagedAsyncIterableIterator; + /** + * Creates or updates a credential. + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @param credentialName Credential name + * @param credential Credential resource definition. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + factoryName: string, + credentialName: string, + credential: ManagedIdentityCredentialResource, + options?: CredentialOperationsCreateOrUpdateOptionalParams + ): Promise; + /** + * Gets a credential. + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @param credentialName Credential name + * @param options The options parameters. + */ + get( + resourceGroupName: string, + factoryName: string, + credentialName: string, + options?: CredentialOperationsGetOptionalParams + ): Promise; + /** + * Deletes a credential. + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @param credentialName Credential name + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + factoryName: string, + credentialName: string, + options?: CredentialOperationsDeleteOptionalParams + ): Promise; +} diff --git a/sdk/datafactory/arm-datafactory/src/operationsInterfaces/index.ts b/sdk/datafactory/arm-datafactory/src/operationsInterfaces/index.ts index b877568ac19c..f62a8123bec3 100644 --- a/sdk/datafactory/arm-datafactory/src/operationsInterfaces/index.ts +++ b/sdk/datafactory/arm-datafactory/src/operationsInterfaces/index.ts @@ -23,6 +23,7 @@ export * from "./dataFlows"; export * from "./dataFlowDebugSession"; export * from "./managedVirtualNetworks"; export * from "./managedPrivateEndpoints"; +export * from "./credentialOperations"; export * from "./privateEndPointConnections"; export * from "./privateEndpointConnection"; export * from "./privateLinkResources"; diff --git a/sdk/datafactory/arm-datafactory/src/pagingHelper.ts b/sdk/datafactory/arm-datafactory/src/pagingHelper.ts index d85fc13bce1e..269a2b9814b5 100644 --- a/sdk/datafactory/arm-datafactory/src/pagingHelper.ts +++ b/sdk/datafactory/arm-datafactory/src/pagingHelper.ts @@ -13,11 +13,11 @@ export interface PageInfo { const pageMap = new WeakMap(); /** - * Given a result page from a pageable operation, returns a - * continuation token that can be used to begin paging from + * Given the last `.value` produced by the `byPage` iterator, + * returns a continuation token that can be used to begin paging from * that point later. - * @param page A result object from calling .byPage() on a paged operation. - * @returns The continuation token that can be passed into byPage(). + * @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator. + * @returns The continuation token that can be passed into byPage() during future calls. */ export function getContinuationToken(page: unknown): string | undefined { if (typeof page !== "object" || page === null) { diff --git a/sdk/datafactory/arm-datafactory/test/sampleTest.ts b/sdk/datafactory/arm-datafactory/test/sampleTest.ts new file mode 100644 index 000000000000..25aeb3ebcc36 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/test/sampleTest.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. + */ + +import { + Recorder, + RecorderStartOptions, + env +} from "@azure-tools/test-recorder"; +import { assert } from "chai"; +import { Context } from "mocha"; + +const replaceableVariables: Record = { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id" +}; + +const recorderOptions: RecorderStartOptions = { + envSetupForPlayback: replaceableVariables +}; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async function(this: Context) { + recorder = new Recorder(this.currentTest); + await recorder.start(recorderOptions); + }); + + afterEach(async function() { + await recorder.stop(); + }); + + it("sample test", async function() { + console.log("Hi, I'm a test!"); + }); +}); diff --git a/sdk/datafactory/arm-datafactory/tsconfig.json b/sdk/datafactory/arm-datafactory/tsconfig.json index 6f440f5c25a9..3e6ae96443f3 100644 --- a/sdk/datafactory/arm-datafactory/tsconfig.json +++ b/sdk/datafactory/arm-datafactory/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-datafactory": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"