Merge pull request #93 from Azure/generated/@azure/arm-datamigration-2018-10-11-765

Generate @azure/arm-datamigration package
This commit is contained in:
Dan Schulte 2018-10-12 11:50:12 -07:00 коммит произвёл GitHub
Родитель 85ce191894 c33c3b3151
Коммит afbf2ce04a
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
24 изменённых файлов: 18855 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,35 @@
#git
.git
.gitignore
#gulp
gulpfile.js
#documentation
doc/
docs/
#dependencies
node_modules/
#samples
sample/
samples/
#tests
test/
tests/
coverage/
#tools and scripts
tools/
scripts/
#IDE settings
*.sln
.vscode/
.idea
.editorconfig
.ntvs_analysis.*
#build tools
.travis.yml
.jenkins.yml
.codeclimate.yml
appveyor.yml
# Nuget packages #
.nuget/
packages/
packages.config

Просмотреть файл

@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2018 Microsoft
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Просмотреть файл

@ -0,0 +1,77 @@
# Azure DataMigrationServiceClient SDK for JavaScript
This package contains an isomorphic SDK for DataMigrationServiceClient.
## Currently supported environments
- Node.js version 6.x.x or higher
- Browser JavaScript
## How to Install
```
npm install @azure/arm-datamigration
```
## How to use
### nodejs - Authentication, client creation and listSkus resourceSkus as an example written in TypeScript.
```ts
import * as msRest from "ms-rest-js";
import * as msRestAzure from "ms-rest-azure-js";
import * as msRestNodeAuth from "ms-rest-nodeauth";
import { DataMigrationServiceClient, DataMigrationServiceModels, DataMigrationServiceMappers } from "@azure/arm-datamigration";
const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];
msRestNodeAuth.interactiveLogin().then((creds) => {
const client = new DataMigrationServiceClient(creds, subscriptionId);
client.resourceSkus.listSkus().then((result) => {
console.log("The result is:");
console.log(result);
});
}).catch((err) => {
console.error(err);
});
```
### browser - Authentication, client creation and listSkus resourceSkus as an example written in JavaScript.
See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser.
- index.html
```html
<!DOCTYPE html>
<html lang="en">
<head>
<title>@azure/arm-datamigration sample</title>
<script src="node_modules/ms-rest-js/dist/msRest.browser.js"></script>
<script src="node_modules/ms-rest-azure-js/dist/msRestAzure.js"></script>
<script src="node_modules/ms-rest-browserauth/dist/msAuth.js"></script>
<script src="node_modules/@azure/arm-datamigration/dist/arm-datamigration.js"></script>
<script>
const subscriptionId = "<Subscription_Id>";
const authManager = new msAuth.AuthManager({
clientId: "<client id for your Azure AD app>",
tenant: "<optional tenant for your organization>"
});
authManager.finalizeLogin().then((res) => {
if (!res.isLoggedIn) {
// may cause redirects
authManager.login();
}
const client = new Azure.ArmDatamigration.DataMigrationServiceClient(res.creds, subscriptionId);
client.resourceSkus.listSkus().then((result) => {
console.log("The result is:");
console.log(result);
}).catch((err) => {
console.log('An error occurred:');
console.error(err);
});
});
</script>
</head>
<body>
</body>
</html>
```
# Related projects
- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js)

Просмотреть файл

@ -0,0 +1,52 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/
import * as msRest from "ms-rest-js";
import * as Models from "./models";
import * as Mappers from "./models/mappers";
import * as operations from "./operations";
import { DataMigrationServiceClientContext } from "./dataMigrationServiceClientContext";
class DataMigrationServiceClient extends DataMigrationServiceClientContext {
// Operation groups
resourceSkus: operations.ResourceSkus;
services: operations.Services;
tasks: operations.Tasks;
projects: operations.Projects;
usages: operations.Usages;
operations: operations.Operations;
/**
* Initializes a new instance of the DataMigrationServiceClient class.
* @param credentials Credentials needed for the client to connect to Azure.
* @param subscriptionId Identifier of the subscription
* @param [options] The parameter options
*/
constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.DataMigrationServiceClientOptions) {
super(credentials, subscriptionId, options);
this.resourceSkus = new operations.ResourceSkus(this);
this.services = new operations.Services(this);
this.tasks = new operations.Tasks(this);
this.projects = new operations.Projects(this);
this.usages = new operations.Usages(this);
this.operations = new operations.Operations(this);
}
}
// Operation Specifications
export {
DataMigrationServiceClient,
DataMigrationServiceClientContext,
Models as DataMigrationServiceModels,
Mappers as DataMigrationServiceMappers
};
export * from "./operations";

Просмотреть файл

@ -0,0 +1,62 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/
import * as Models from "./models";
import * as msRest from "ms-rest-js";
import * as msRestAzure from "ms-rest-azure-js";
const packageName = "@azure/arm-datamigration";
const packageVersion = "1.0.0-preview";
export class DataMigrationServiceClientContext extends msRestAzure.AzureServiceClient {
credentials: msRest.ServiceClientCredentials;
subscriptionId: string;
acceptLanguage: string;
longRunningOperationRetryTimeout: number;
/**
* Initializes a new instance of the DataMigrationServiceClient class.
* @param credentials Credentials needed for the client to connect to Azure.
* @param subscriptionId Identifier of the subscription
* @param [options] The parameter options
*/
constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.DataMigrationServiceClientOptions) {
if (credentials == undefined) {
throw new Error('\'credentials\' cannot be null.');
}
if (subscriptionId == undefined) {
throw new Error('\'subscriptionId\' cannot be null.');
}
if (!options) {
options = {};
}
super(credentials, options);
this.acceptLanguage = 'en-US';
this.longRunningOperationRetryTimeout = 30;
this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com";
this.requestContentType = "application/json; charset=utf-8";
this.credentials = credentials;
this.subscriptionId = subscriptionId;
this.addUserAgentInfo(`${packageName}/${packageVersion}`);
if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) {
this.acceptLanguage = options.acceptLanguage;
}
if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) {
this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout;
}
}
}

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -0,0 +1,19 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/
export {
discriminators,
ServiceOperationList,
ServiceOperation,
ServiceOperationDisplay,
ApiError,
ODataError
} from "../models/mappers";

Просмотреть файл

@ -0,0 +1,141 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/
import * as msRest from "ms-rest-js";
export const acceptLanguage: msRest.OperationParameter = {
parameterPath: "acceptLanguage",
mapper: {
serializedName: "accept-language",
defaultValue: 'en-US',
type: {
name: "String"
}
}
};
export const apiVersion: msRest.OperationQueryParameter = {
parameterPath: "apiVersion",
mapper: {
required: true,
isConstant: true,
serializedName: "api-version",
defaultValue: '2018-07-15-preview',
type: {
name: "String"
}
}
};
export const deleteRunningTasks: msRest.OperationQueryParameter = {
parameterPath: [
"options",
"deleteRunningTasks"
],
mapper: {
serializedName: "deleteRunningTasks",
type: {
name: "Boolean"
}
}
};
export const expand: msRest.OperationQueryParameter = {
parameterPath: [
"options",
"expand"
],
mapper: {
serializedName: "$expand",
type: {
name: "String"
}
}
};
export const groupName: msRest.OperationURLParameter = {
parameterPath: "groupName",
mapper: {
required: true,
serializedName: "groupName",
type: {
name: "String"
}
}
};
export const location: msRest.OperationURLParameter = {
parameterPath: "location",
mapper: {
required: true,
serializedName: "location",
type: {
name: "String"
}
}
};
export const nextPageLink: msRest.OperationURLParameter = {
parameterPath: "nextPageLink",
mapper: {
required: true,
serializedName: "nextLink",
type: {
name: "String"
}
},
skipEncoding: true
};
export const projectName: msRest.OperationURLParameter = {
parameterPath: "projectName",
mapper: {
required: true,
serializedName: "projectName",
type: {
name: "String"
}
}
};
export const serviceName: msRest.OperationURLParameter = {
parameterPath: "serviceName",
mapper: {
required: true,
serializedName: "serviceName",
type: {
name: "String"
}
}
};
export const subscriptionId: msRest.OperationURLParameter = {
parameterPath: "subscriptionId",
mapper: {
required: true,
serializedName: "subscriptionId",
type: {
name: "String"
}
}
};
export const taskName: msRest.OperationURLParameter = {
parameterPath: "taskName",
mapper: {
required: true,
serializedName: "taskName",
type: {
name: "String"
}
}
};
export const taskType: msRest.OperationQueryParameter = {
parameterPath: [
"options",
"taskType"
],
mapper: {
serializedName: "taskType",
type: {
name: "String"
}
}
};

Просмотреть файл

@ -0,0 +1,142 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/
export {
discriminators,
ProjectList,
Project,
TrackedResource,
Resource,
BaseResource,
ConnectionInfo,
DatabaseInfo,
ApiError,
ODataError,
PostgreSqlConnectionInfo,
MySqlConnectionInfo,
SqlConnectionInfo,
ProjectTask,
ProjectTaskProperties,
CommandProperties,
DataMigrationService,
ServiceSku,
ConnectToSourceMySqlTaskProperties,
ConnectToSourceMySqlTaskInput,
ConnectToSourceNonSqlTaskOutput,
ServerProperties,
ReportableException,
MigrateSchemaSqlServerSqlDbTaskProperties,
MigrateSchemaSqlServerSqlDbTaskInput,
SqlMigrationTaskInput,
MigrateSchemaSqlServerSqlDbDatabaseInput,
SchemaMigrationSetting,
MigrateSchemaSqlServerSqlDbTaskOutput,
MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel,
MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel,
MigrateSchemaSqlServerSqlDbTaskOutputError,
MigrateSchemaSqlTaskOutputError,
MigrateSyncCompleteCommandProperties,
MigrateSyncCompleteCommandInput,
MigrateSyncCompleteCommandOutput,
GetTdeCertificatesSqlTaskProperties,
GetTdeCertificatesSqlTaskInput,
FileShare,
SelectedCertificateInput,
GetTdeCertificatesSqlTaskOutput,
ValidateMigrationInputSqlServerSqlMITaskProperties,
ValidateMigrationInputSqlServerSqlMITaskInput,
MigrateSqlServerSqlMIDatabaseInput,
BlobShare,
ValidateMigrationInputSqlServerSqlMITaskOutput,
DatabaseBackupInfo,
ValidateMigrationInputSqlServerSqlDbSyncTaskProperties,
ValidateSyncMigrationInputSqlServerTaskInput,
MigrateSqlServerSqlDbSyncDatabaseInput,
ValidateSyncMigrationInputSqlServerTaskOutput,
MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties,
MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput,
MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput,
MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput,
MigrateMySqlAzureDbForMySqlSyncTaskProperties,
MigrateMySqlAzureDbForMySqlSyncTaskInput,
MigrateMySqlAzureDbForMySqlSyncDatabaseInput,
MigrateMySqlAzureDbForMySqlSyncTaskOutput,
MigrateSqlServerSqlDbSyncTaskInput,
MigrationValidationOptions,
MigrateSqlServerSqlDbSyncTaskProperties,
MigrateSqlServerSqlDbSyncTaskOutput,
MigrateSqlServerSqlDbTaskInput,
MigrateSqlServerSqlDbDatabaseInput,
MigrateSqlServerSqlDbTaskProperties,
MigrateSqlServerSqlDbTaskOutput,
MigrateSqlServerSqlMITaskInput,
MigrateSqlServerSqlMITaskProperties,
MigrateSqlServerSqlMITaskOutput,
ConnectToTargetAzureDbForMySqlTaskProperties,
ConnectToTargetAzureDbForMySqlTaskInput,
ConnectToTargetAzureDbForMySqlTaskOutput,
ConnectToTargetSqlMITaskProperties,
ConnectToTargetSqlMITaskInput,
ConnectToTargetSqlMITaskOutput,
GetUserTablesSqlSyncTaskProperties,
GetUserTablesSqlSyncTaskInput,
GetUserTablesSqlSyncTaskOutput,
DatabaseTable,
GetUserTablesSqlTaskProperties,
GetUserTablesSqlTaskInput,
GetUserTablesSqlTaskOutput,
ConnectToTargetSqlSqlDbSyncTaskProperties,
ConnectToTargetSqlSqlDbSyncTaskInput,
ConnectToTargetSqlDbTaskOutput,
ConnectToTargetSqlDbTaskProperties,
ConnectToTargetSqlDbTaskInput,
ConnectToSourceSqlServerSyncTaskProperties,
ConnectToSourceSqlServerTaskInput,
ConnectToSourceSqlServerTaskOutput,
ConnectToSourceSqlServerTaskProperties,
MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError,
SyncMigrationDatabaseErrorEvent,
MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError,
MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel,
MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel,
MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel,
MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError,
MigrateMySqlAzureDbForMySqlSyncTaskOutputError,
MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel,
MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel,
MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel,
MigrateSqlServerSqlDbSyncTaskOutputDatabaseError,
MigrateSqlServerSqlDbSyncTaskOutputError,
MigrateSqlServerSqlDbSyncTaskOutputTableLevel,
MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel,
MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel,
MigrateSqlServerSqlDbTaskOutputError,
MigrateSqlServerSqlDbTaskOutputTableLevel,
MigrateSqlServerSqlDbTaskOutputDatabaseLevel,
DataItemMigrationSummaryResult,
DatabaseSummaryResult,
MigrateSqlServerSqlDbTaskOutputMigrationLevel,
MigrationValidationResult,
MigrationValidationDatabaseSummaryResult,
MigrationReportResult,
MigrateSqlServerSqlMITaskOutputError,
MigrateSqlServerSqlMITaskOutputLoginLevel,
MigrateSqlServerSqlMITaskOutputAgentJobLevel,
MigrateSqlServerSqlMITaskOutputDatabaseLevel,
MigrateSqlServerSqlMITaskOutputMigrationLevel,
StartMigrationScenarioServerRoleResult,
ConnectToSourceSqlServerTaskOutputAgentJobLevel,
MigrationEligibilityInfo,
ConnectToSourceSqlServerTaskOutputLoginLevel,
ConnectToSourceSqlServerTaskOutputDatabaseLevel,
DatabaseFileInfo,
ConnectToSourceSqlServerTaskOutputTaskLevel
} from "../models/mappers";

Просмотреть файл

@ -0,0 +1,22 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/
export {
discriminators,
ResourceSkusResult,
ResourceSku,
ResourceSkuCapacity,
ResourceSkuCosts,
ResourceSkuCapabilities,
ResourceSkuRestrictions,
ApiError,
ODataError
} from "../models/mappers";

Просмотреть файл

@ -0,0 +1,149 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/
export {
discriminators,
DataMigrationService,
TrackedResource,
Resource,
BaseResource,
ServiceSku,
ApiError,
ODataError,
DataMigrationServiceStatusResponse,
ServiceSkuList,
AvailableServiceSku,
AvailableServiceSkuSku,
AvailableServiceSkuCapacity,
NameAvailabilityRequest,
NameAvailabilityResponse,
DataMigrationServiceList,
ProjectTask,
ProjectTaskProperties,
CommandProperties,
Project,
ConnectionInfo,
DatabaseInfo,
ConnectToSourceMySqlTaskProperties,
ConnectToSourceMySqlTaskInput,
MySqlConnectionInfo,
ConnectToSourceNonSqlTaskOutput,
ServerProperties,
ReportableException,
MigrateSchemaSqlServerSqlDbTaskProperties,
MigrateSchemaSqlServerSqlDbTaskInput,
SqlMigrationTaskInput,
SqlConnectionInfo,
MigrateSchemaSqlServerSqlDbDatabaseInput,
SchemaMigrationSetting,
MigrateSchemaSqlServerSqlDbTaskOutput,
MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel,
MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel,
MigrateSchemaSqlServerSqlDbTaskOutputError,
MigrateSchemaSqlTaskOutputError,
MigrateSyncCompleteCommandProperties,
MigrateSyncCompleteCommandInput,
MigrateSyncCompleteCommandOutput,
PostgreSqlConnectionInfo,
GetTdeCertificatesSqlTaskProperties,
GetTdeCertificatesSqlTaskInput,
FileShare,
SelectedCertificateInput,
GetTdeCertificatesSqlTaskOutput,
ValidateMigrationInputSqlServerSqlMITaskProperties,
ValidateMigrationInputSqlServerSqlMITaskInput,
MigrateSqlServerSqlMIDatabaseInput,
BlobShare,
ValidateMigrationInputSqlServerSqlMITaskOutput,
DatabaseBackupInfo,
ValidateMigrationInputSqlServerSqlDbSyncTaskProperties,
ValidateSyncMigrationInputSqlServerTaskInput,
MigrateSqlServerSqlDbSyncDatabaseInput,
ValidateSyncMigrationInputSqlServerTaskOutput,
MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties,
MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput,
MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput,
MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput,
MigrateMySqlAzureDbForMySqlSyncTaskProperties,
MigrateMySqlAzureDbForMySqlSyncTaskInput,
MigrateMySqlAzureDbForMySqlSyncDatabaseInput,
MigrateMySqlAzureDbForMySqlSyncTaskOutput,
MigrateSqlServerSqlDbSyncTaskInput,
MigrationValidationOptions,
MigrateSqlServerSqlDbSyncTaskProperties,
MigrateSqlServerSqlDbSyncTaskOutput,
MigrateSqlServerSqlDbTaskInput,
MigrateSqlServerSqlDbDatabaseInput,
MigrateSqlServerSqlDbTaskProperties,
MigrateSqlServerSqlDbTaskOutput,
MigrateSqlServerSqlMITaskInput,
MigrateSqlServerSqlMITaskProperties,
MigrateSqlServerSqlMITaskOutput,
ConnectToTargetAzureDbForMySqlTaskProperties,
ConnectToTargetAzureDbForMySqlTaskInput,
ConnectToTargetAzureDbForMySqlTaskOutput,
ConnectToTargetSqlMITaskProperties,
ConnectToTargetSqlMITaskInput,
ConnectToTargetSqlMITaskOutput,
GetUserTablesSqlSyncTaskProperties,
GetUserTablesSqlSyncTaskInput,
GetUserTablesSqlSyncTaskOutput,
DatabaseTable,
GetUserTablesSqlTaskProperties,
GetUserTablesSqlTaskInput,
GetUserTablesSqlTaskOutput,
ConnectToTargetSqlSqlDbSyncTaskProperties,
ConnectToTargetSqlSqlDbSyncTaskInput,
ConnectToTargetSqlDbTaskOutput,
ConnectToTargetSqlDbTaskProperties,
ConnectToTargetSqlDbTaskInput,
ConnectToSourceSqlServerSyncTaskProperties,
ConnectToSourceSqlServerTaskInput,
ConnectToSourceSqlServerTaskOutput,
ConnectToSourceSqlServerTaskProperties,
MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError,
SyncMigrationDatabaseErrorEvent,
MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError,
MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel,
MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel,
MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel,
MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError,
MigrateMySqlAzureDbForMySqlSyncTaskOutputError,
MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel,
MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel,
MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel,
MigrateSqlServerSqlDbSyncTaskOutputDatabaseError,
MigrateSqlServerSqlDbSyncTaskOutputError,
MigrateSqlServerSqlDbSyncTaskOutputTableLevel,
MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel,
MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel,
MigrateSqlServerSqlDbTaskOutputError,
MigrateSqlServerSqlDbTaskOutputTableLevel,
MigrateSqlServerSqlDbTaskOutputDatabaseLevel,
DataItemMigrationSummaryResult,
DatabaseSummaryResult,
MigrateSqlServerSqlDbTaskOutputMigrationLevel,
MigrationValidationResult,
MigrationValidationDatabaseSummaryResult,
MigrationReportResult,
MigrateSqlServerSqlMITaskOutputError,
MigrateSqlServerSqlMITaskOutputLoginLevel,
MigrateSqlServerSqlMITaskOutputAgentJobLevel,
MigrateSqlServerSqlMITaskOutputDatabaseLevel,
MigrateSqlServerSqlMITaskOutputMigrationLevel,
StartMigrationScenarioServerRoleResult,
ConnectToSourceSqlServerTaskOutputAgentJobLevel,
MigrationEligibilityInfo,
ConnectToSourceSqlServerTaskOutputLoginLevel,
ConnectToSourceSqlServerTaskOutputDatabaseLevel,
DatabaseFileInfo,
ConnectToSourceSqlServerTaskOutputTaskLevel
} from "../models/mappers";

Просмотреть файл

@ -0,0 +1,142 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/
export {
discriminators,
TaskList,
ProjectTask,
Resource,
BaseResource,
ProjectTaskProperties,
ODataError,
CommandProperties,
ApiError,
MigrateSyncCompleteCommandProperties,
MigrateSyncCompleteCommandInput,
MigrateSyncCompleteCommandOutput,
ReportableException,
TrackedResource,
GetTdeCertificatesSqlTaskProperties,
GetTdeCertificatesSqlTaskInput,
SqlConnectionInfo,
ConnectionInfo,
FileShare,
SelectedCertificateInput,
GetTdeCertificatesSqlTaskOutput,
ValidateMigrationInputSqlServerSqlMITaskProperties,
ValidateMigrationInputSqlServerSqlMITaskInput,
MigrateSqlServerSqlMIDatabaseInput,
BlobShare,
ValidateMigrationInputSqlServerSqlMITaskOutput,
DatabaseBackupInfo,
ValidateMigrationInputSqlServerSqlDbSyncTaskProperties,
ValidateSyncMigrationInputSqlServerTaskInput,
MigrateSqlServerSqlDbSyncDatabaseInput,
ValidateSyncMigrationInputSqlServerTaskOutput,
MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties,
MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput,
MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput,
PostgreSqlConnectionInfo,
MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput,
MigrateMySqlAzureDbForMySqlSyncTaskProperties,
MigrateMySqlAzureDbForMySqlSyncTaskInput,
MySqlConnectionInfo,
MigrateMySqlAzureDbForMySqlSyncDatabaseInput,
MigrateMySqlAzureDbForMySqlSyncTaskOutput,
MigrateSqlServerSqlDbSyncTaskProperties,
MigrateSqlServerSqlDbSyncTaskInput,
SqlMigrationTaskInput,
MigrationValidationOptions,
MigrateSqlServerSqlDbSyncTaskOutput,
MigrateSqlServerSqlDbTaskInput,
MigrateSqlServerSqlDbDatabaseInput,
MigrateSqlServerSqlDbTaskProperties,
MigrateSqlServerSqlDbTaskOutput,
MigrateSqlServerSqlMITaskInput,
MigrateSqlServerSqlMITaskProperties,
MigrateSqlServerSqlMITaskOutput,
ConnectToTargetAzureDbForMySqlTaskProperties,
ConnectToTargetAzureDbForMySqlTaskInput,
ConnectToTargetAzureDbForMySqlTaskOutput,
ConnectToTargetSqlMITaskProperties,
ConnectToTargetSqlMITaskInput,
ConnectToTargetSqlMITaskOutput,
GetUserTablesSqlSyncTaskProperties,
GetUserTablesSqlSyncTaskInput,
GetUserTablesSqlSyncTaskOutput,
DatabaseTable,
GetUserTablesSqlTaskProperties,
GetUserTablesSqlTaskInput,
GetUserTablesSqlTaskOutput,
ConnectToTargetSqlSqlDbSyncTaskProperties,
ConnectToTargetSqlSqlDbSyncTaskInput,
ConnectToTargetSqlDbTaskOutput,
ConnectToTargetSqlDbTaskProperties,
ConnectToTargetSqlDbTaskInput,
ConnectToSourceSqlServerSyncTaskProperties,
ConnectToSourceSqlServerTaskInput,
ConnectToSourceSqlServerTaskOutput,
ConnectToSourceSqlServerTaskProperties,
DataMigrationService,
ServiceSku,
Project,
DatabaseInfo,
ConnectToSourceMySqlTaskProperties,
ConnectToSourceMySqlTaskInput,
ConnectToSourceNonSqlTaskOutput,
ServerProperties,
MigrateSchemaSqlServerSqlDbTaskInput,
MigrateSchemaSqlServerSqlDbDatabaseInput,
SchemaMigrationSetting,
MigrateSchemaSqlServerSqlDbTaskProperties,
MigrateSchemaSqlServerSqlDbTaskOutput,
MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel,
MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel,
MigrateSchemaSqlServerSqlDbTaskOutputError,
MigrateSchemaSqlTaskOutputError,
MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError,
SyncMigrationDatabaseErrorEvent,
MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError,
MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel,
MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel,
MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel,
MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError,
MigrateMySqlAzureDbForMySqlSyncTaskOutputError,
MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel,
MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel,
MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel,
MigrateSqlServerSqlDbSyncTaskOutputDatabaseError,
MigrateSqlServerSqlDbSyncTaskOutputError,
MigrateSqlServerSqlDbSyncTaskOutputTableLevel,
MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel,
MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel,
MigrateSqlServerSqlDbTaskOutputError,
MigrateSqlServerSqlDbTaskOutputTableLevel,
MigrateSqlServerSqlDbTaskOutputDatabaseLevel,
DataItemMigrationSummaryResult,
DatabaseSummaryResult,
MigrateSqlServerSqlDbTaskOutputMigrationLevel,
MigrationValidationResult,
MigrationValidationDatabaseSummaryResult,
MigrationReportResult,
MigrateSqlServerSqlMITaskOutputError,
MigrateSqlServerSqlMITaskOutputLoginLevel,
MigrateSqlServerSqlMITaskOutputAgentJobLevel,
MigrateSqlServerSqlMITaskOutputDatabaseLevel,
MigrateSqlServerSqlMITaskOutputMigrationLevel,
StartMigrationScenarioServerRoleResult,
ConnectToSourceSqlServerTaskOutputAgentJobLevel,
MigrationEligibilityInfo,
ConnectToSourceSqlServerTaskOutputLoginLevel,
ConnectToSourceSqlServerTaskOutputDatabaseLevel,
DatabaseFileInfo,
ConnectToSourceSqlServerTaskOutputTaskLevel
} from "../models/mappers";

Просмотреть файл

@ -0,0 +1,19 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/
export {
discriminators,
QuotaList,
Quota,
QuotaName,
ApiError,
ODataError
} from "../models/mappers";

Просмотреть файл

@ -0,0 +1,16 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/
export * from "./resourceSkus";
export * from "./services";
export * from "./tasks";
export * from "./projects";
export * from "./usages";
export * from "./operations";

Просмотреть файл

@ -0,0 +1,125 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/
import * as msRest from "ms-rest-js";
import * as Models from "../models";
import * as Mappers from "../models/operationsMappers";
import * as Parameters from "../models/parameters";
import { DataMigrationServiceClientContext } from "../dataMigrationServiceClientContext";
/** Class representing a Operations. */
export class Operations {
private readonly client: DataMigrationServiceClientContext;
/**
* Create a Operations.
* @param {DataMigrationServiceClientContext} client Reference to the service client.
*/
constructor(client: DataMigrationServiceClientContext) {
this.client = client;
}
/**
* Lists all available actions exposed by the Database Migration Service resource provider.
* @summary Get available resource provider actions (operations)
* @param [options] The optional parameters
* @returns Promise<Models.OperationsListResponse>
*/
list(options?: msRest.RequestOptionsBase): Promise<Models.OperationsListResponse>;
/**
* @param callback The callback
*/
list(callback: msRest.ServiceCallback<Models.ServiceOperationList>): void;
/**
* @param options The optional parameters
* @param callback The callback
*/
list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.ServiceOperationList>): void;
list(options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback<Models.ServiceOperationList>): Promise<Models.OperationsListResponse> {
return this.client.sendOperationRequest(
{
options
},
listOperationSpec,
callback) as Promise<Models.OperationsListResponse>;
}
/**
* Lists all available actions exposed by the Database Migration Service resource provider.
* @summary Get available resource provider actions (operations)
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @param [options] The optional parameters
* @returns Promise<Models.OperationsListNextResponse>
*/
listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.OperationsListNextResponse>;
/**
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @param callback The callback
*/
listNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.ServiceOperationList>): void;
/**
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @param options The optional parameters
* @param callback The callback
*/
listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.ServiceOperationList>): void;
listNext(nextPageLink: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback<Models.ServiceOperationList>): Promise<Models.OperationsListNextResponse> {
return this.client.sendOperationRequest(
{
nextPageLink,
options
},
listNextOperationSpec,
callback) as Promise<Models.OperationsListNextResponse>;
}
}
// Operation Specifications
const serializer = new msRest.Serializer(Mappers);
const listOperationSpec: msRest.OperationSpec = {
httpMethod: "GET",
path: "providers/Microsoft.DataMigration/operations",
queryParameters: [
Parameters.apiVersion
],
headerParameters: [
Parameters.acceptLanguage
],
responses: {
200: {
bodyMapper: Mappers.ServiceOperationList
},
default: {
bodyMapper: Mappers.ApiError
}
},
serializer
};
const listNextOperationSpec: msRest.OperationSpec = {
httpMethod: "GET",
baseUrl: "https://management.azure.com",
path: "{nextLink}",
urlParameters: [
Parameters.nextPageLink
],
headerParameters: [
Parameters.acceptLanguage
],
responses: {
200: {
bodyMapper: Mappers.ServiceOperationList
},
default: {
bodyMapper: Mappers.ApiError
}
},
serializer
};

Просмотреть файл

@ -0,0 +1,421 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/
import * as msRest from "ms-rest-js";
import * as Models from "../models";
import * as Mappers from "../models/projectsMappers";
import * as Parameters from "../models/parameters";
import { DataMigrationServiceClientContext } from "../dataMigrationServiceClientContext";
/** Class representing a Projects. */
export class Projects {
private readonly client: DataMigrationServiceClientContext;
/**
* Create a Projects.
* @param {DataMigrationServiceClientContext} client Reference to the service client.
*/
constructor(client: DataMigrationServiceClientContext) {
this.client = client;
}
/**
* The project resource is a nested resource representing a stored migration project. This method
* returns a list of projects owned by a service resource.
* @summary Get projects in a service
* @param groupName Name of the resource group
* @param serviceName Name of the service
* @param [options] The optional parameters
* @returns Promise<Models.ProjectsListResponse>
*/
list(groupName: string, serviceName: string, options?: msRest.RequestOptionsBase): Promise<Models.ProjectsListResponse>;
/**
* @param groupName Name of the resource group
* @param serviceName Name of the service
* @param callback The callback
*/
list(groupName: string, serviceName: string, callback: msRest.ServiceCallback<Models.ProjectList>): void;
/**
* @param groupName Name of the resource group
* @param serviceName Name of the service
* @param options The optional parameters
* @param callback The callback
*/
list(groupName: string, serviceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.ProjectList>): void;
list(groupName: string, serviceName: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback<Models.ProjectList>): Promise<Models.ProjectsListResponse> {
return this.client.sendOperationRequest(
{
groupName,
serviceName,
options
},
listOperationSpec,
callback) as Promise<Models.ProjectsListResponse>;
}
/**
* The project resource is a nested resource representing a stored migration project. The PUT
* method creates a new project or updates an existing one.
* @summary Create or update project
* @param parameters Information about the project
* @param groupName Name of the resource group
* @param serviceName Name of the service
* @param projectName Name of the project
* @param [options] The optional parameters
* @returns Promise<Models.ProjectsCreateOrUpdateResponse>
*/
createOrUpdate(parameters: Models.Project, groupName: string, serviceName: string, projectName: string, options?: msRest.RequestOptionsBase): Promise<Models.ProjectsCreateOrUpdateResponse>;
/**
* @param parameters Information about the project
* @param groupName Name of the resource group
* @param serviceName Name of the service
* @param projectName Name of the project
* @param callback The callback
*/
createOrUpdate(parameters: Models.Project, groupName: string, serviceName: string, projectName: string, callback: msRest.ServiceCallback<Models.Project>): void;
/**
* @param parameters Information about the project
* @param groupName Name of the resource group
* @param serviceName Name of the service
* @param projectName Name of the project
* @param options The optional parameters
* @param callback The callback
*/
createOrUpdate(parameters: Models.Project, groupName: string, serviceName: string, projectName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.Project>): void;
createOrUpdate(parameters: Models.Project, groupName: string, serviceName: string, projectName: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback<Models.Project>): Promise<Models.ProjectsCreateOrUpdateResponse> {
return this.client.sendOperationRequest(
{
parameters,
groupName,
serviceName,
projectName,
options
},
createOrUpdateOperationSpec,
callback) as Promise<Models.ProjectsCreateOrUpdateResponse>;
}
/**
* The project resource is a nested resource representing a stored migration project. The GET
* method retrieves information about a project.
* @summary Get project information
* @param groupName Name of the resource group
* @param serviceName Name of the service
* @param projectName Name of the project
* @param [options] The optional parameters
* @returns Promise<Models.ProjectsGetResponse>
*/
get(groupName: string, serviceName: string, projectName: string, options?: msRest.RequestOptionsBase): Promise<Models.ProjectsGetResponse>;
/**
* @param groupName Name of the resource group
* @param serviceName Name of the service
* @param projectName Name of the project
* @param callback The callback
*/
get(groupName: string, serviceName: string, projectName: string, callback: msRest.ServiceCallback<Models.Project>): void;
/**
* @param groupName Name of the resource group
* @param serviceName Name of the service
* @param projectName Name of the project
* @param options The optional parameters
* @param callback The callback
*/
get(groupName: string, serviceName: string, projectName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.Project>): void;
get(groupName: string, serviceName: string, projectName: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback<Models.Project>): Promise<Models.ProjectsGetResponse> {
return this.client.sendOperationRequest(
{
groupName,
serviceName,
projectName,
options
},
getOperationSpec,
callback) as Promise<Models.ProjectsGetResponse>;
}
/**
* The project resource is a nested resource representing a stored migration project. The DELETE
* method deletes a project.
* @summary Delete project
* @param groupName Name of the resource group
* @param serviceName Name of the service
* @param projectName Name of the project
* @param [options] The optional parameters
* @returns Promise<msRest.RestResponse>
*/
deleteMethod(groupName: string, serviceName: string, projectName: string, options?: Models.ProjectsDeleteMethodOptionalParams): Promise<msRest.RestResponse>;
/**
* @param groupName Name of the resource group
* @param serviceName Name of the service
* @param projectName Name of the project
* @param callback The callback
*/
deleteMethod(groupName: string, serviceName: string, projectName: string, callback: msRest.ServiceCallback<void>): void;
/**
* @param groupName Name of the resource group
* @param serviceName Name of the service
* @param projectName Name of the project
* @param options The optional parameters
* @param callback The callback
*/
deleteMethod(groupName: string, serviceName: string, projectName: string, options: Models.ProjectsDeleteMethodOptionalParams, callback: msRest.ServiceCallback<void>): void;
deleteMethod(groupName: string, serviceName: string, projectName: string, options?: Models.ProjectsDeleteMethodOptionalParams, callback?: msRest.ServiceCallback<void>): Promise<msRest.RestResponse> {
return this.client.sendOperationRequest(
{
groupName,
serviceName,
projectName,
options
},
deleteMethodOperationSpec,
callback);
}
/**
* The project resource is a nested resource representing a stored migration project. The PATCH
* method updates an existing project.
* @summary Update project
* @param parameters Information about the project
* @param groupName Name of the resource group
* @param serviceName Name of the service
* @param projectName Name of the project
* @param [options] The optional parameters
* @returns Promise<Models.ProjectsUpdateResponse>
*/
update(parameters: Models.Project, groupName: string, serviceName: string, projectName: string, options?: msRest.RequestOptionsBase): Promise<Models.ProjectsUpdateResponse>;
/**
* @param parameters Information about the project
* @param groupName Name of the resource group
* @param serviceName Name of the service
* @param projectName Name of the project
* @param callback The callback
*/
update(parameters: Models.Project, groupName: string, serviceName: string, projectName: string, callback: msRest.ServiceCallback<Models.Project>): void;
/**
* @param parameters Information about the project
* @param groupName Name of the resource group
* @param serviceName Name of the service
* @param projectName Name of the project
* @param options The optional parameters
* @param callback The callback
*/
update(parameters: Models.Project, groupName: string, serviceName: string, projectName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.Project>): void;
update(parameters: Models.Project, groupName: string, serviceName: string, projectName: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback<Models.Project>): Promise<Models.ProjectsUpdateResponse> {
return this.client.sendOperationRequest(
{
parameters,
groupName,
serviceName,
projectName,
options
},
updateOperationSpec,
callback) as Promise<Models.ProjectsUpdateResponse>;
}
/**
* The project resource is a nested resource representing a stored migration project. This method
* returns a list of projects owned by a service resource.
* @summary Get projects in a service
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @param [options] The optional parameters
* @returns Promise<Models.ProjectsListNextResponse>
*/
listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.ProjectsListNextResponse>;
/**
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @param callback The callback
*/
listNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.ProjectList>): void;
/**
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @param options The optional parameters
* @param callback The callback
*/
listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.ProjectList>): void;
listNext(nextPageLink: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback<Models.ProjectList>): Promise<Models.ProjectsListNextResponse> {
return this.client.sendOperationRequest(
{
nextPageLink,
options
},
listNextOperationSpec,
callback) as Promise<Models.ProjectsListNextResponse>;
}
}
// Operation Specifications
const serializer = new msRest.Serializer(Mappers);
const listOperationSpec: msRest.OperationSpec = {
httpMethod: "GET",
path: "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects",
urlParameters: [
Parameters.subscriptionId,
Parameters.groupName,
Parameters.serviceName
],
queryParameters: [
Parameters.apiVersion
],
headerParameters: [
Parameters.acceptLanguage
],
responses: {
200: {
bodyMapper: Mappers.ProjectList
},
default: {
bodyMapper: Mappers.ApiError
}
},
serializer
};
const createOrUpdateOperationSpec: msRest.OperationSpec = {
httpMethod: "PUT",
path: "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}",
urlParameters: [
Parameters.subscriptionId,
Parameters.groupName,
Parameters.serviceName,
Parameters.projectName
],
queryParameters: [
Parameters.apiVersion
],
headerParameters: [
Parameters.acceptLanguage
],
requestBody: {
parameterPath: "parameters",
mapper: {
...Mappers.Project,
required: true
}
},
responses: {
200: {
bodyMapper: Mappers.Project
},
201: {
bodyMapper: Mappers.Project
},
default: {
bodyMapper: Mappers.ApiError
}
},
serializer
};
const getOperationSpec: msRest.OperationSpec = {
httpMethod: "GET",
path: "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}",
urlParameters: [
Parameters.subscriptionId,
Parameters.groupName,
Parameters.serviceName,
Parameters.projectName
],
queryParameters: [
Parameters.apiVersion
],
headerParameters: [
Parameters.acceptLanguage
],
responses: {
200: {
bodyMapper: Mappers.Project
},
default: {
bodyMapper: Mappers.ApiError
}
},
serializer
};
const deleteMethodOperationSpec: msRest.OperationSpec = {
httpMethod: "DELETE",
path: "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}",
urlParameters: [
Parameters.subscriptionId,
Parameters.groupName,
Parameters.serviceName,
Parameters.projectName
],
queryParameters: [
Parameters.deleteRunningTasks,
Parameters.apiVersion
],
headerParameters: [
Parameters.acceptLanguage
],
responses: {
200: {},
204: {},
default: {
bodyMapper: Mappers.ApiError
}
},
serializer
};
const updateOperationSpec: msRest.OperationSpec = {
httpMethod: "PATCH",
path: "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}",
urlParameters: [
Parameters.subscriptionId,
Parameters.groupName,
Parameters.serviceName,
Parameters.projectName
],
queryParameters: [
Parameters.apiVersion
],
headerParameters: [
Parameters.acceptLanguage
],
requestBody: {
parameterPath: "parameters",
mapper: {
...Mappers.Project,
required: true
}
},
responses: {
200: {
bodyMapper: Mappers.Project
},
default: {
bodyMapper: Mappers.ApiError
}
},
serializer
};
const listNextOperationSpec: msRest.OperationSpec = {
httpMethod: "GET",
baseUrl: "https://management.azure.com",
path: "{nextLink}",
urlParameters: [
Parameters.nextPageLink
],
headerParameters: [
Parameters.acceptLanguage
],
responses: {
200: {
bodyMapper: Mappers.ProjectList
},
default: {
bodyMapper: Mappers.ApiError
}
},
serializer
};

Просмотреть файл

@ -0,0 +1,128 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/
import * as msRest from "ms-rest-js";
import * as Models from "../models";
import * as Mappers from "../models/resourceSkusMappers";
import * as Parameters from "../models/parameters";
import { DataMigrationServiceClientContext } from "../dataMigrationServiceClientContext";
/** Class representing a ResourceSkus. */
export class ResourceSkus {
private readonly client: DataMigrationServiceClientContext;
/**
* Create a ResourceSkus.
* @param {DataMigrationServiceClientContext} client Reference to the service client.
*/
constructor(client: DataMigrationServiceClientContext) {
this.client = client;
}
/**
* The skus action returns the list of SKUs that DMS supports.
* @summary Get supported SKUs
* @param [options] The optional parameters
* @returns Promise<Models.ResourceSkusListSkusResponse>
*/
listSkus(options?: msRest.RequestOptionsBase): Promise<Models.ResourceSkusListSkusResponse>;
/**
* @param callback The callback
*/
listSkus(callback: msRest.ServiceCallback<Models.ResourceSkusResult>): void;
/**
* @param options The optional parameters
* @param callback The callback
*/
listSkus(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.ResourceSkusResult>): void;
listSkus(options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback<Models.ResourceSkusResult>): Promise<Models.ResourceSkusListSkusResponse> {
return this.client.sendOperationRequest(
{
options
},
listSkusOperationSpec,
callback) as Promise<Models.ResourceSkusListSkusResponse>;
}
/**
* The skus action returns the list of SKUs that DMS supports.
* @summary Get supported SKUs
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @param [options] The optional parameters
* @returns Promise<Models.ResourceSkusListSkusNextResponse>
*/
listSkusNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.ResourceSkusListSkusNextResponse>;
/**
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @param callback The callback
*/
listSkusNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.ResourceSkusResult>): void;
/**
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @param options The optional parameters
* @param callback The callback
*/
listSkusNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.ResourceSkusResult>): void;
listSkusNext(nextPageLink: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback<Models.ResourceSkusResult>): Promise<Models.ResourceSkusListSkusNextResponse> {
return this.client.sendOperationRequest(
{
nextPageLink,
options
},
listSkusNextOperationSpec,
callback) as Promise<Models.ResourceSkusListSkusNextResponse>;
}
}
// Operation Specifications
const serializer = new msRest.Serializer(Mappers);
const listSkusOperationSpec: msRest.OperationSpec = {
httpMethod: "GET",
path: "subscriptions/{subscriptionId}/providers/Microsoft.DataMigration/skus",
urlParameters: [
Parameters.subscriptionId
],
queryParameters: [
Parameters.apiVersion
],
headerParameters: [
Parameters.acceptLanguage
],
responses: {
200: {
bodyMapper: Mappers.ResourceSkusResult
},
default: {
bodyMapper: Mappers.ApiError
}
},
serializer
};
const listSkusNextOperationSpec: msRest.OperationSpec = {
httpMethod: "GET",
baseUrl: "https://management.azure.com",
path: "{nextLink}",
urlParameters: [
Parameters.nextPageLink
],
headerParameters: [
Parameters.acceptLanguage
],
responses: {
200: {
bodyMapper: Mappers.ResourceSkusResult
},
default: {
bodyMapper: Mappers.ApiError
}
},
serializer
};

Просмотреть файл

@ -0,0 +1,935 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/
import * as msRest from "ms-rest-js";
import * as msRestAzure from "ms-rest-azure-js";
import * as Models from "../models";
import * as Mappers from "../models/servicesMappers";
import * as Parameters from "../models/parameters";
import { DataMigrationServiceClientContext } from "../dataMigrationServiceClientContext";
/** Class representing a Services. */
export class Services {
private readonly client: DataMigrationServiceClientContext;
/**
* Create a Services.
* @param {DataMigrationServiceClientContext} client Reference to the service client.
*/
constructor(client: DataMigrationServiceClientContext) {
this.client = client;
}
/**
* The services resource is the top-level resource that represents the Database Migration Service.
* The PUT method creates a new service or updates an existing one. When a service is updated,
* existing child resources (i.e. tasks) are unaffected. Services currently support a single kind,
* "vm", which refers to a VM-based service, although other kinds may be added in the future. This
* method can change the kind, SKU, and network of the service, but if tasks are currently running
* (i.e. the service is busy), this will fail with 400 Bad Request ("ServiceIsBusy"). The provider
* will reply when successful with 200 OK or 201 Created. Long-running operations use the
* provisioningState property.
* @summary Create or update DMS Instance
* @param parameters Information about the service
* @param groupName Name of the resource group
* @param serviceName Name of the service
* @param [options] The optional parameters
* @returns Promise<Models.ServicesCreateOrUpdateResponse>
*/
createOrUpdate(parameters: Models.DataMigrationService, groupName: string, serviceName: string, options?: msRest.RequestOptionsBase): Promise<Models.ServicesCreateOrUpdateResponse> {
return this.beginCreateOrUpdate(parameters,groupName,serviceName,options)
.then(lroPoller => lroPoller.pollUntilFinished()) as Promise<Models.ServicesCreateOrUpdateResponse>;
}
/**
* The services resource is the top-level resource that represents the Database Migration Service.
* The GET method retrieves information about a service instance.
* @summary Get DMS Service Instance
* @param groupName Name of the resource group
* @param serviceName Name of the service
* @param [options] The optional parameters
* @returns Promise<Models.ServicesGetResponse>
*/
get(groupName: string, serviceName: string, options?: msRest.RequestOptionsBase): Promise<Models.ServicesGetResponse>;
/**
* @param groupName Name of the resource group
* @param serviceName Name of the service
* @param callback The callback
*/
get(groupName: string, serviceName: string, callback: msRest.ServiceCallback<Models.DataMigrationService>): void;
/**
* @param groupName Name of the resource group
* @param serviceName Name of the service
* @param options The optional parameters
* @param callback The callback
*/
get(groupName: string, serviceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.DataMigrationService>): void;
get(groupName: string, serviceName: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback<Models.DataMigrationService>): Promise<Models.ServicesGetResponse> {
return this.client.sendOperationRequest(
{
groupName,
serviceName,
options
},
getOperationSpec,
callback) as Promise<Models.ServicesGetResponse>;
}
/**
* The services resource is the top-level resource that represents the Database Migration Service.
* The DELETE method deletes a service. Any running tasks will be canceled.
* @summary Delete DMS Service Instance
* @param groupName Name of the resource group
* @param serviceName Name of the service
* @param [options] The optional parameters
* @returns Promise<msRest.RestResponse>
*/
deleteMethod(groupName: string, serviceName: string, options?: Models.ServicesDeleteMethodOptionalParams): Promise<msRest.RestResponse> {
return this.beginDeleteMethod(groupName,serviceName,options)
.then(lroPoller => lroPoller.pollUntilFinished());
}
/**
* The services resource is the top-level resource that represents the Database Migration Service.
* The PATCH method updates an existing service. This method can change the kind, SKU, and network
* of the service, but if tasks are currently running (i.e. the service is busy), this will fail
* with 400 Bad Request ("ServiceIsBusy").
* @summary Create or update DMS Service Instance
* @param parameters Information about the service
* @param groupName Name of the resource group
* @param serviceName Name of the service
* @param [options] The optional parameters
* @returns Promise<Models.ServicesUpdateResponse>
*/
update(parameters: Models.DataMigrationService, groupName: string, serviceName: string, options?: msRest.RequestOptionsBase): Promise<Models.ServicesUpdateResponse> {
return this.beginUpdate(parameters,groupName,serviceName,options)
.then(lroPoller => lroPoller.pollUntilFinished()) as Promise<Models.ServicesUpdateResponse>;
}
/**
* The services resource is the top-level resource that represents the Database Migration Service.
* This action performs a health check and returns the status of the service and virtual machine
* size.
* @summary Check service health status
* @param groupName Name of the resource group
* @param serviceName Name of the service
* @param [options] The optional parameters
* @returns Promise<Models.ServicesCheckStatusResponse>
*/
checkStatus(groupName: string, serviceName: string, options?: msRest.RequestOptionsBase): Promise<Models.ServicesCheckStatusResponse>;
/**
* @param groupName Name of the resource group
* @param serviceName Name of the service
* @param callback The callback
*/
checkStatus(groupName: string, serviceName: string, callback: msRest.ServiceCallback<Models.DataMigrationServiceStatusResponse>): void;
/**
* @param groupName Name of the resource group
* @param serviceName Name of the service
* @param options The optional parameters
* @param callback The callback
*/
checkStatus(groupName: string, serviceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.DataMigrationServiceStatusResponse>): void;
checkStatus(groupName: string, serviceName: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback<Models.DataMigrationServiceStatusResponse>): Promise<Models.ServicesCheckStatusResponse> {
return this.client.sendOperationRequest(
{
groupName,
serviceName,
options
},
checkStatusOperationSpec,
callback) as Promise<Models.ServicesCheckStatusResponse>;
}
/**
* The services resource is the top-level resource that represents the Database Migration Service.
* This action starts the service and the service can be used for data migration.
* @summary Start service
* @param groupName Name of the resource group
* @param serviceName Name of the service
* @param [options] The optional parameters
* @returns Promise<msRest.RestResponse>
*/
start(groupName: string, serviceName: string, options?: msRest.RequestOptionsBase): Promise<msRest.RestResponse> {
return this.beginStart(groupName,serviceName,options)
.then(lroPoller => lroPoller.pollUntilFinished());
}
/**
* The services resource is the top-level resource that represents the Database Migration Service.
* This action stops the service and the service cannot be used for data migration. The service
* owner won't be billed when the service is stopped.
* @summary Stop service
* @param groupName Name of the resource group
* @param serviceName Name of the service
* @param [options] The optional parameters
* @returns Promise<msRest.RestResponse>
*/
stop(groupName: string, serviceName: string, options?: msRest.RequestOptionsBase): Promise<msRest.RestResponse> {
return this.beginStop(groupName,serviceName,options)
.then(lroPoller => lroPoller.pollUntilFinished());
}
/**
* The services resource is the top-level resource that represents the Database Migration Service.
* The skus action returns the list of SKUs that a service resource can be updated to.
* @summary Get compatible SKUs
* @param groupName Name of the resource group
* @param serviceName Name of the service
* @param [options] The optional parameters
* @returns Promise<Models.ServicesListSkusResponse>
*/
listSkus(groupName: string, serviceName: string, options?: msRest.RequestOptionsBase): Promise<Models.ServicesListSkusResponse>;
/**
* @param groupName Name of the resource group
* @param serviceName Name of the service
* @param callback The callback
*/
listSkus(groupName: string, serviceName: string, callback: msRest.ServiceCallback<Models.ServiceSkuList>): void;
/**
* @param groupName Name of the resource group
* @param serviceName Name of the service
* @param options The optional parameters
* @param callback The callback
*/
listSkus(groupName: string, serviceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.ServiceSkuList>): void;
listSkus(groupName: string, serviceName: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback<Models.ServiceSkuList>): Promise<Models.ServicesListSkusResponse> {
return this.client.sendOperationRequest(
{
groupName,
serviceName,
options
},
listSkusOperationSpec,
callback) as Promise<Models.ServicesListSkusResponse>;
}
/**
* This method checks whether a proposed nested resource name is valid and available.
* @summary Check nested resource name validity and availability
* @param groupName Name of the resource group
* @param serviceName Name of the service
* @param parameters Requested name to validate
* @param [options] The optional parameters
* @returns Promise<Models.ServicesCheckChildrenNameAvailabilityResponse>
*/
checkChildrenNameAvailability(groupName: string, serviceName: string, parameters: Models.NameAvailabilityRequest, options?: msRest.RequestOptionsBase): Promise<Models.ServicesCheckChildrenNameAvailabilityResponse>;
/**
* @param groupName Name of the resource group
* @param serviceName Name of the service
* @param parameters Requested name to validate
* @param callback The callback
*/
checkChildrenNameAvailability(groupName: string, serviceName: string, parameters: Models.NameAvailabilityRequest, callback: msRest.ServiceCallback<Models.NameAvailabilityResponse>): void;
/**
* @param groupName Name of the resource group
* @param serviceName Name of the service
* @param parameters Requested name to validate
* @param options The optional parameters
* @param callback The callback
*/
checkChildrenNameAvailability(groupName: string, serviceName: string, parameters: Models.NameAvailabilityRequest, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.NameAvailabilityResponse>): void;
checkChildrenNameAvailability(groupName: string, serviceName: string, parameters: Models.NameAvailabilityRequest, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback<Models.NameAvailabilityResponse>): Promise<Models.ServicesCheckChildrenNameAvailabilityResponse> {
return this.client.sendOperationRequest(
{
groupName,
serviceName,
parameters,
options
},
checkChildrenNameAvailabilityOperationSpec,
callback) as Promise<Models.ServicesCheckChildrenNameAvailabilityResponse>;
}
/**
* The Services resource is the top-level resource that represents the Database Migration Service.
* This method returns a list of service resources in a resource group.
* @summary Get services in resource group
* @param groupName Name of the resource group
* @param [options] The optional parameters
* @returns Promise<Models.ServicesListByResourceGroupResponse>
*/
listByResourceGroup(groupName: string, options?: msRest.RequestOptionsBase): Promise<Models.ServicesListByResourceGroupResponse>;
/**
* @param groupName Name of the resource group
* @param callback The callback
*/
listByResourceGroup(groupName: string, callback: msRest.ServiceCallback<Models.DataMigrationServiceList>): void;
/**
* @param groupName Name of the resource group
* @param options The optional parameters
* @param callback The callback
*/
listByResourceGroup(groupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.DataMigrationServiceList>): void;
listByResourceGroup(groupName: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback<Models.DataMigrationServiceList>): Promise<Models.ServicesListByResourceGroupResponse> {
return this.client.sendOperationRequest(
{
groupName,
options
},
listByResourceGroupOperationSpec,
callback) as Promise<Models.ServicesListByResourceGroupResponse>;
}
/**
* The services resource is the top-level resource that represents the Database Migration Service.
* This method returns a list of service resources in a subscription.
* @summary Get services in subscription
* @param [options] The optional parameters
* @returns Promise<Models.ServicesListResponse>
*/
list(options?: msRest.RequestOptionsBase): Promise<Models.ServicesListResponse>;
/**
* @param callback The callback
*/
list(callback: msRest.ServiceCallback<Models.DataMigrationServiceList>): void;
/**
* @param options The optional parameters
* @param callback The callback
*/
list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.DataMigrationServiceList>): void;
list(options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback<Models.DataMigrationServiceList>): Promise<Models.ServicesListResponse> {
return this.client.sendOperationRequest(
{
options
},
listOperationSpec,
callback) as Promise<Models.ServicesListResponse>;
}
/**
* This method checks whether a proposed top-level resource name is valid and available.
* @summary Check name validity and availability
* @param location The Azure region of the operation
* @param parameters Requested name to validate
* @param [options] The optional parameters
* @returns Promise<Models.ServicesCheckNameAvailabilityResponse>
*/
checkNameAvailability(location: string, parameters: Models.NameAvailabilityRequest, options?: msRest.RequestOptionsBase): Promise<Models.ServicesCheckNameAvailabilityResponse>;
/**
* @param location The Azure region of the operation
* @param parameters Requested name to validate
* @param callback The callback
*/
checkNameAvailability(location: string, parameters: Models.NameAvailabilityRequest, callback: msRest.ServiceCallback<Models.NameAvailabilityResponse>): void;
/**
* @param location The Azure region of the operation
* @param parameters Requested name to validate
* @param options The optional parameters
* @param callback The callback
*/
checkNameAvailability(location: string, parameters: Models.NameAvailabilityRequest, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.NameAvailabilityResponse>): void;
checkNameAvailability(location: string, parameters: Models.NameAvailabilityRequest, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback<Models.NameAvailabilityResponse>): Promise<Models.ServicesCheckNameAvailabilityResponse> {
return this.client.sendOperationRequest(
{
location,
parameters,
options
},
checkNameAvailabilityOperationSpec,
callback) as Promise<Models.ServicesCheckNameAvailabilityResponse>;
}
/**
* The services resource is the top-level resource that represents the Database Migration Service.
* The PUT method creates a new service or updates an existing one. When a service is updated,
* existing child resources (i.e. tasks) are unaffected. Services currently support a single kind,
* "vm", which refers to a VM-based service, although other kinds may be added in the future. This
* method can change the kind, SKU, and network of the service, but if tasks are currently running
* (i.e. the service is busy), this will fail with 400 Bad Request ("ServiceIsBusy"). The provider
* will reply when successful with 200 OK or 201 Created. Long-running operations use the
* provisioningState property.
* @summary Create or update DMS Instance
* @param parameters Information about the service
* @param groupName Name of the resource group
* @param serviceName Name of the service
* @param [options] The optional parameters
* @returns Promise<msRestAzure.LROPoller>
*/
beginCreateOrUpdate(parameters: Models.DataMigrationService, groupName: string, serviceName: string, options?: msRest.RequestOptionsBase): Promise<msRestAzure.LROPoller> {
return this.client.sendLRORequest(
{
parameters,
groupName,
serviceName,
options
},
beginCreateOrUpdateOperationSpec,
options);
}
/**
* The services resource is the top-level resource that represents the Database Migration Service.
* The DELETE method deletes a service. Any running tasks will be canceled.
* @summary Delete DMS Service Instance
* @param groupName Name of the resource group
* @param serviceName Name of the service
* @param [options] The optional parameters
* @returns Promise<msRestAzure.LROPoller>
*/
beginDeleteMethod(groupName: string, serviceName: string, options?: Models.ServicesBeginDeleteMethodOptionalParams): Promise<msRestAzure.LROPoller> {
return this.client.sendLRORequest(
{
groupName,
serviceName,
options
},
beginDeleteMethodOperationSpec,
options);
}
/**
* The services resource is the top-level resource that represents the Database Migration Service.
* The PATCH method updates an existing service. This method can change the kind, SKU, and network
* of the service, but if tasks are currently running (i.e. the service is busy), this will fail
* with 400 Bad Request ("ServiceIsBusy").
* @summary Create or update DMS Service Instance
* @param parameters Information about the service
* @param groupName Name of the resource group
* @param serviceName Name of the service
* @param [options] The optional parameters
* @returns Promise<msRestAzure.LROPoller>
*/
beginUpdate(parameters: Models.DataMigrationService, groupName: string, serviceName: string, options?: msRest.RequestOptionsBase): Promise<msRestAzure.LROPoller> {
return this.client.sendLRORequest(
{
parameters,
groupName,
serviceName,
options
},
beginUpdateOperationSpec,
options);
}
/**
* The services resource is the top-level resource that represents the Database Migration Service.
* This action starts the service and the service can be used for data migration.
* @summary Start service
* @param groupName Name of the resource group
* @param serviceName Name of the service
* @param [options] The optional parameters
* @returns Promise<msRestAzure.LROPoller>
*/
beginStart(groupName: string, serviceName: string, options?: msRest.RequestOptionsBase): Promise<msRestAzure.LROPoller> {
return this.client.sendLRORequest(
{
groupName,
serviceName,
options
},
beginStartOperationSpec,
options);
}
/**
* The services resource is the top-level resource that represents the Database Migration Service.
* This action stops the service and the service cannot be used for data migration. The service
* owner won't be billed when the service is stopped.
* @summary Stop service
* @param groupName Name of the resource group
* @param serviceName Name of the service
* @param [options] The optional parameters
* @returns Promise<msRestAzure.LROPoller>
*/
beginStop(groupName: string, serviceName: string, options?: msRest.RequestOptionsBase): Promise<msRestAzure.LROPoller> {
return this.client.sendLRORequest(
{
groupName,
serviceName,
options
},
beginStopOperationSpec,
options);
}
/**
* The services resource is the top-level resource that represents the Database Migration Service.
* The skus action returns the list of SKUs that a service resource can be updated to.
* @summary Get compatible SKUs
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @param [options] The optional parameters
* @returns Promise<Models.ServicesListSkusNextResponse>
*/
listSkusNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.ServicesListSkusNextResponse>;
/**
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @param callback The callback
*/
listSkusNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.ServiceSkuList>): void;
/**
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @param options The optional parameters
* @param callback The callback
*/
listSkusNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.ServiceSkuList>): void;
listSkusNext(nextPageLink: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback<Models.ServiceSkuList>): Promise<Models.ServicesListSkusNextResponse> {
return this.client.sendOperationRequest(
{
nextPageLink,
options
},
listSkusNextOperationSpec,
callback) as Promise<Models.ServicesListSkusNextResponse>;
}
/**
* The Services resource is the top-level resource that represents the Database Migration Service.
* This method returns a list of service resources in a resource group.
* @summary Get services in resource group
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @param [options] The optional parameters
* @returns Promise<Models.ServicesListByResourceGroupNextResponse>
*/
listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.ServicesListByResourceGroupNextResponse>;
/**
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @param callback The callback
*/
listByResourceGroupNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.DataMigrationServiceList>): void;
/**
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @param options The optional parameters
* @param callback The callback
*/
listByResourceGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.DataMigrationServiceList>): void;
listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback<Models.DataMigrationServiceList>): Promise<Models.ServicesListByResourceGroupNextResponse> {
return this.client.sendOperationRequest(
{
nextPageLink,
options
},
listByResourceGroupNextOperationSpec,
callback) as Promise<Models.ServicesListByResourceGroupNextResponse>;
}
/**
* The services resource is the top-level resource that represents the Database Migration Service.
* This method returns a list of service resources in a subscription.
* @summary Get services in subscription
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @param [options] The optional parameters
* @returns Promise<Models.ServicesListNextResponse>
*/
listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.ServicesListNextResponse>;
/**
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @param callback The callback
*/
listNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.DataMigrationServiceList>): void;
/**
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @param options The optional parameters
* @param callback The callback
*/
listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.DataMigrationServiceList>): void;
listNext(nextPageLink: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback<Models.DataMigrationServiceList>): Promise<Models.ServicesListNextResponse> {
return this.client.sendOperationRequest(
{
nextPageLink,
options
},
listNextOperationSpec,
callback) as Promise<Models.ServicesListNextResponse>;
}
}
// Operation Specifications
const serializer = new msRest.Serializer(Mappers);
const getOperationSpec: msRest.OperationSpec = {
httpMethod: "GET",
path: "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}",
urlParameters: [
Parameters.subscriptionId,
Parameters.groupName,
Parameters.serviceName
],
queryParameters: [
Parameters.apiVersion
],
headerParameters: [
Parameters.acceptLanguage
],
responses: {
200: {
bodyMapper: Mappers.DataMigrationService
},
default: {
bodyMapper: Mappers.ApiError
}
},
serializer
};
const checkStatusOperationSpec: msRest.OperationSpec = {
httpMethod: "POST",
path: "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/checkStatus",
urlParameters: [
Parameters.subscriptionId,
Parameters.groupName,
Parameters.serviceName
],
queryParameters: [
Parameters.apiVersion
],
headerParameters: [
Parameters.acceptLanguage
],
responses: {
200: {
bodyMapper: Mappers.DataMigrationServiceStatusResponse
},
default: {
bodyMapper: Mappers.ApiError
}
},
serializer
};
const listSkusOperationSpec: msRest.OperationSpec = {
httpMethod: "GET",
path: "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/skus",
urlParameters: [
Parameters.subscriptionId,
Parameters.groupName,
Parameters.serviceName
],
queryParameters: [
Parameters.apiVersion
],
headerParameters: [
Parameters.acceptLanguage
],
responses: {
200: {
bodyMapper: Mappers.ServiceSkuList
},
default: {
bodyMapper: Mappers.ApiError
}
},
serializer
};
const checkChildrenNameAvailabilityOperationSpec: msRest.OperationSpec = {
httpMethod: "POST",
path: "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/checkNameAvailability",
urlParameters: [
Parameters.subscriptionId,
Parameters.groupName,
Parameters.serviceName
],
queryParameters: [
Parameters.apiVersion
],
headerParameters: [
Parameters.acceptLanguage
],
requestBody: {
parameterPath: "parameters",
mapper: {
...Mappers.NameAvailabilityRequest,
required: true
}
},
responses: {
200: {
bodyMapper: Mappers.NameAvailabilityResponse
},
default: {
bodyMapper: Mappers.ApiError
}
},
serializer
};
const listByResourceGroupOperationSpec: msRest.OperationSpec = {
httpMethod: "GET",
path: "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services",
urlParameters: [
Parameters.subscriptionId,
Parameters.groupName
],
queryParameters: [
Parameters.apiVersion
],
headerParameters: [
Parameters.acceptLanguage
],
responses: {
200: {
bodyMapper: Mappers.DataMigrationServiceList
},
default: {
bodyMapper: Mappers.ApiError
}
},
serializer
};
const listOperationSpec: msRest.OperationSpec = {
httpMethod: "GET",
path: "subscriptions/{subscriptionId}/providers/Microsoft.DataMigration/services",
urlParameters: [
Parameters.subscriptionId
],
queryParameters: [
Parameters.apiVersion
],
headerParameters: [
Parameters.acceptLanguage
],
responses: {
200: {
bodyMapper: Mappers.DataMigrationServiceList
},
default: {
bodyMapper: Mappers.ApiError
}
},
serializer
};
const checkNameAvailabilityOperationSpec: msRest.OperationSpec = {
httpMethod: "POST",
path: "subscriptions/{subscriptionId}/providers/Microsoft.DataMigration/locations/{location}/checkNameAvailability",
urlParameters: [
Parameters.subscriptionId,
Parameters.location
],
queryParameters: [
Parameters.apiVersion
],
headerParameters: [
Parameters.acceptLanguage
],
requestBody: {
parameterPath: "parameters",
mapper: {
...Mappers.NameAvailabilityRequest,
required: true
}
},
responses: {
200: {
bodyMapper: Mappers.NameAvailabilityResponse
},
default: {
bodyMapper: Mappers.ApiError
}
},
serializer
};
const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = {
httpMethod: "PUT",
path: "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}",
urlParameters: [
Parameters.subscriptionId,
Parameters.groupName,
Parameters.serviceName
],
queryParameters: [
Parameters.apiVersion
],
headerParameters: [
Parameters.acceptLanguage
],
requestBody: {
parameterPath: "parameters",
mapper: {
...Mappers.DataMigrationService,
required: true
}
},
responses: {
200: {
bodyMapper: Mappers.DataMigrationService
},
201: {
bodyMapper: Mappers.DataMigrationService
},
202: {},
default: {
bodyMapper: Mappers.ApiError
}
},
serializer
};
const beginDeleteMethodOperationSpec: msRest.OperationSpec = {
httpMethod: "DELETE",
path: "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}",
urlParameters: [
Parameters.subscriptionId,
Parameters.groupName,
Parameters.serviceName
],
queryParameters: [
Parameters.deleteRunningTasks,
Parameters.apiVersion
],
headerParameters: [
Parameters.acceptLanguage
],
responses: {
200: {},
202: {},
204: {},
default: {
bodyMapper: Mappers.ApiError
}
},
serializer
};
const beginUpdateOperationSpec: msRest.OperationSpec = {
httpMethod: "PATCH",
path: "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}",
urlParameters: [
Parameters.subscriptionId,
Parameters.groupName,
Parameters.serviceName
],
queryParameters: [
Parameters.apiVersion
],
headerParameters: [
Parameters.acceptLanguage
],
requestBody: {
parameterPath: "parameters",
mapper: {
...Mappers.DataMigrationService,
required: true
}
},
responses: {
200: {
bodyMapper: Mappers.DataMigrationService
},
202: {},
default: {
bodyMapper: Mappers.ApiError
}
},
serializer
};
const beginStartOperationSpec: msRest.OperationSpec = {
httpMethod: "POST",
path: "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/start",
urlParameters: [
Parameters.subscriptionId,
Parameters.groupName,
Parameters.serviceName
],
queryParameters: [
Parameters.apiVersion
],
headerParameters: [
Parameters.acceptLanguage
],
responses: {
200: {},
202: {},
default: {
bodyMapper: Mappers.ApiError
}
},
serializer
};
const beginStopOperationSpec: msRest.OperationSpec = {
httpMethod: "POST",
path: "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/stop",
urlParameters: [
Parameters.subscriptionId,
Parameters.groupName,
Parameters.serviceName
],
queryParameters: [
Parameters.apiVersion
],
headerParameters: [
Parameters.acceptLanguage
],
responses: {
200: {},
202: {},
default: {
bodyMapper: Mappers.ApiError
}
},
serializer
};
const listSkusNextOperationSpec: msRest.OperationSpec = {
httpMethod: "GET",
baseUrl: "https://management.azure.com",
path: "{nextLink}",
urlParameters: [
Parameters.nextPageLink
],
headerParameters: [
Parameters.acceptLanguage
],
responses: {
200: {
bodyMapper: Mappers.ServiceSkuList
},
default: {
bodyMapper: Mappers.ApiError
}
},
serializer
};
const listByResourceGroupNextOperationSpec: msRest.OperationSpec = {
httpMethod: "GET",
baseUrl: "https://management.azure.com",
path: "{nextLink}",
urlParameters: [
Parameters.nextPageLink
],
headerParameters: [
Parameters.acceptLanguage
],
responses: {
200: {
bodyMapper: Mappers.DataMigrationServiceList
},
default: {
bodyMapper: Mappers.ApiError
}
},
serializer
};
const listNextOperationSpec: msRest.OperationSpec = {
httpMethod: "GET",
baseUrl: "https://management.azure.com",
path: "{nextLink}",
urlParameters: [
Parameters.nextPageLink
],
headerParameters: [
Parameters.acceptLanguage
],
responses: {
200: {
bodyMapper: Mappers.DataMigrationServiceList
},
default: {
bodyMapper: Mappers.ApiError
}
},
serializer
};

Просмотреть файл

@ -0,0 +1,601 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/
import * as msRest from "ms-rest-js";
import * as Models from "../models";
import * as Mappers from "../models/tasksMappers";
import * as Parameters from "../models/parameters";
import { DataMigrationServiceClientContext } from "../dataMigrationServiceClientContext";
/** Class representing a Tasks. */
export class Tasks {
private readonly client: DataMigrationServiceClientContext;
/**
* Create a Tasks.
* @param {DataMigrationServiceClientContext} client Reference to the service client.
*/
constructor(client: DataMigrationServiceClientContext) {
this.client = client;
}
/**
* The services resource is the top-level resource that represents the Database Migration Service.
* This method returns a list of tasks owned by a service resource. Some tasks may have a status of
* Unknown, which indicates that an error occurred while querying the status of that task.
* @summary Get tasks in a service
* @param groupName Name of the resource group
* @param serviceName Name of the service
* @param projectName Name of the project
* @param [options] The optional parameters
* @returns Promise<Models.TasksListResponse>
*/
list(groupName: string, serviceName: string, projectName: string, options?: Models.TasksListOptionalParams): Promise<Models.TasksListResponse>;
/**
* @param groupName Name of the resource group
* @param serviceName Name of the service
* @param projectName Name of the project
* @param callback The callback
*/
list(groupName: string, serviceName: string, projectName: string, callback: msRest.ServiceCallback<Models.TaskList>): void;
/**
* @param groupName Name of the resource group
* @param serviceName Name of the service
* @param projectName Name of the project
* @param options The optional parameters
* @param callback The callback
*/
list(groupName: string, serviceName: string, projectName: string, options: Models.TasksListOptionalParams, callback: msRest.ServiceCallback<Models.TaskList>): void;
list(groupName: string, serviceName: string, projectName: string, options?: Models.TasksListOptionalParams, callback?: msRest.ServiceCallback<Models.TaskList>): Promise<Models.TasksListResponse> {
return this.client.sendOperationRequest(
{
groupName,
serviceName,
projectName,
options
},
listOperationSpec,
callback) as Promise<Models.TasksListResponse>;
}
/**
* The tasks resource is a nested, proxy-only resource representing work performed by a DMS
* instance. The PUT method creates a new task or updates an existing one, although since tasks
* have no mutable custom properties, there is little reason to update an exising one.
* @summary Create or update task
* @param parameters Information about the task
* @param groupName Name of the resource group
* @param serviceName Name of the service
* @param projectName Name of the project
* @param taskName Name of the Task
* @param [options] The optional parameters
* @returns Promise<Models.TasksCreateOrUpdateResponse>
*/
createOrUpdate(parameters: Models.ProjectTask, groupName: string, serviceName: string, projectName: string, taskName: string, options?: msRest.RequestOptionsBase): Promise<Models.TasksCreateOrUpdateResponse>;
/**
* @param parameters Information about the task
* @param groupName Name of the resource group
* @param serviceName Name of the service
* @param projectName Name of the project
* @param taskName Name of the Task
* @param callback The callback
*/
createOrUpdate(parameters: Models.ProjectTask, groupName: string, serviceName: string, projectName: string, taskName: string, callback: msRest.ServiceCallback<Models.ProjectTask>): void;
/**
* @param parameters Information about the task
* @param groupName Name of the resource group
* @param serviceName Name of the service
* @param projectName Name of the project
* @param taskName Name of the Task
* @param options The optional parameters
* @param callback The callback
*/
createOrUpdate(parameters: Models.ProjectTask, groupName: string, serviceName: string, projectName: string, taskName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.ProjectTask>): void;
createOrUpdate(parameters: Models.ProjectTask, groupName: string, serviceName: string, projectName: string, taskName: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback<Models.ProjectTask>): Promise<Models.TasksCreateOrUpdateResponse> {
return this.client.sendOperationRequest(
{
parameters,
groupName,
serviceName,
projectName,
taskName,
options
},
createOrUpdateOperationSpec,
callback) as Promise<Models.TasksCreateOrUpdateResponse>;
}
/**
* The tasks resource is a nested, proxy-only resource representing work performed by a DMS
* instance. The GET method retrieves information about a task.
* @summary Get task information
* @param groupName Name of the resource group
* @param serviceName Name of the service
* @param projectName Name of the project
* @param taskName Name of the Task
* @param [options] The optional parameters
* @returns Promise<Models.TasksGetResponse>
*/
get(groupName: string, serviceName: string, projectName: string, taskName: string, options?: Models.TasksGetOptionalParams): Promise<Models.TasksGetResponse>;
/**
* @param groupName Name of the resource group
* @param serviceName Name of the service
* @param projectName Name of the project
* @param taskName Name of the Task
* @param callback The callback
*/
get(groupName: string, serviceName: string, projectName: string, taskName: string, callback: msRest.ServiceCallback<Models.ProjectTask>): void;
/**
* @param groupName Name of the resource group
* @param serviceName Name of the service
* @param projectName Name of the project
* @param taskName Name of the Task
* @param options The optional parameters
* @param callback The callback
*/
get(groupName: string, serviceName: string, projectName: string, taskName: string, options: Models.TasksGetOptionalParams, callback: msRest.ServiceCallback<Models.ProjectTask>): void;
get(groupName: string, serviceName: string, projectName: string, taskName: string, options?: Models.TasksGetOptionalParams, callback?: msRest.ServiceCallback<Models.ProjectTask>): Promise<Models.TasksGetResponse> {
return this.client.sendOperationRequest(
{
groupName,
serviceName,
projectName,
taskName,
options
},
getOperationSpec,
callback) as Promise<Models.TasksGetResponse>;
}
/**
* The tasks resource is a nested, proxy-only resource representing work performed by a DMS
* instance. The DELETE method deletes a task, canceling it first if it's running.
* @summary Delete task
* @param groupName Name of the resource group
* @param serviceName Name of the service
* @param projectName Name of the project
* @param taskName Name of the Task
* @param [options] The optional parameters
* @returns Promise<msRest.RestResponse>
*/
deleteMethod(groupName: string, serviceName: string, projectName: string, taskName: string, options?: Models.TasksDeleteMethodOptionalParams): Promise<msRest.RestResponse>;
/**
* @param groupName Name of the resource group
* @param serviceName Name of the service
* @param projectName Name of the project
* @param taskName Name of the Task
* @param callback The callback
*/
deleteMethod(groupName: string, serviceName: string, projectName: string, taskName: string, callback: msRest.ServiceCallback<void>): void;
/**
* @param groupName Name of the resource group
* @param serviceName Name of the service
* @param projectName Name of the project
* @param taskName Name of the Task
* @param options The optional parameters
* @param callback The callback
*/
deleteMethod(groupName: string, serviceName: string, projectName: string, taskName: string, options: Models.TasksDeleteMethodOptionalParams, callback: msRest.ServiceCallback<void>): void;
deleteMethod(groupName: string, serviceName: string, projectName: string, taskName: string, options?: Models.TasksDeleteMethodOptionalParams, callback?: msRest.ServiceCallback<void>): Promise<msRest.RestResponse> {
return this.client.sendOperationRequest(
{
groupName,
serviceName,
projectName,
taskName,
options
},
deleteMethodOperationSpec,
callback);
}
/**
* The tasks resource is a nested, proxy-only resource representing work performed by a DMS
* instance. The PATCH method updates an existing task, but since tasks have no mutable custom
* properties, there is little reason to do so.
* @summary Create or update task
* @param parameters Information about the task
* @param groupName Name of the resource group
* @param serviceName Name of the service
* @param projectName Name of the project
* @param taskName Name of the Task
* @param [options] The optional parameters
* @returns Promise<Models.TasksUpdateResponse>
*/
update(parameters: Models.ProjectTask, groupName: string, serviceName: string, projectName: string, taskName: string, options?: msRest.RequestOptionsBase): Promise<Models.TasksUpdateResponse>;
/**
* @param parameters Information about the task
* @param groupName Name of the resource group
* @param serviceName Name of the service
* @param projectName Name of the project
* @param taskName Name of the Task
* @param callback The callback
*/
update(parameters: Models.ProjectTask, groupName: string, serviceName: string, projectName: string, taskName: string, callback: msRest.ServiceCallback<Models.ProjectTask>): void;
/**
* @param parameters Information about the task
* @param groupName Name of the resource group
* @param serviceName Name of the service
* @param projectName Name of the project
* @param taskName Name of the Task
* @param options The optional parameters
* @param callback The callback
*/
update(parameters: Models.ProjectTask, groupName: string, serviceName: string, projectName: string, taskName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.ProjectTask>): void;
update(parameters: Models.ProjectTask, groupName: string, serviceName: string, projectName: string, taskName: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback<Models.ProjectTask>): Promise<Models.TasksUpdateResponse> {
return this.client.sendOperationRequest(
{
parameters,
groupName,
serviceName,
projectName,
taskName,
options
},
updateOperationSpec,
callback) as Promise<Models.TasksUpdateResponse>;
}
/**
* The tasks resource is a nested, proxy-only resource representing work performed by a DMS
* instance. This method cancels a task if it's currently queued or running.
* @summary Cancel a task
* @param groupName Name of the resource group
* @param serviceName Name of the service
* @param projectName Name of the project
* @param taskName Name of the Task
* @param [options] The optional parameters
* @returns Promise<Models.TasksCancelResponse>
*/
cancel(groupName: string, serviceName: string, projectName: string, taskName: string, options?: msRest.RequestOptionsBase): Promise<Models.TasksCancelResponse>;
/**
* @param groupName Name of the resource group
* @param serviceName Name of the service
* @param projectName Name of the project
* @param taskName Name of the Task
* @param callback The callback
*/
cancel(groupName: string, serviceName: string, projectName: string, taskName: string, callback: msRest.ServiceCallback<Models.ProjectTask>): void;
/**
* @param groupName Name of the resource group
* @param serviceName Name of the service
* @param projectName Name of the project
* @param taskName Name of the Task
* @param options The optional parameters
* @param callback The callback
*/
cancel(groupName: string, serviceName: string, projectName: string, taskName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.ProjectTask>): void;
cancel(groupName: string, serviceName: string, projectName: string, taskName: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback<Models.ProjectTask>): Promise<Models.TasksCancelResponse> {
return this.client.sendOperationRequest(
{
groupName,
serviceName,
projectName,
taskName,
options
},
cancelOperationSpec,
callback) as Promise<Models.TasksCancelResponse>;
}
/**
* The tasks resource is a nested, proxy-only resource representing work performed by a DMS
* instance. This method executes a command on a running task.
* @summary Execute a command on a task
* @param groupName Name of the resource group
* @param serviceName Name of the service
* @param projectName Name of the project
* @param taskName Name of the Task
* @param parameters Command to execute
* @param [options] The optional parameters
* @returns Promise<Models.TasksCommandResponse>
*/
command(groupName: string, serviceName: string, projectName: string, taskName: string, parameters: Models.CommandPropertiesUnion, options?: msRest.RequestOptionsBase): Promise<Models.TasksCommandResponse>;
/**
* @param groupName Name of the resource group
* @param serviceName Name of the service
* @param projectName Name of the project
* @param taskName Name of the Task
* @param parameters Command to execute
* @param callback The callback
*/
command(groupName: string, serviceName: string, projectName: string, taskName: string, parameters: Models.CommandPropertiesUnion, callback: msRest.ServiceCallback<Models.CommandPropertiesUnion>): void;
/**
* @param groupName Name of the resource group
* @param serviceName Name of the service
* @param projectName Name of the project
* @param taskName Name of the Task
* @param parameters Command to execute
* @param options The optional parameters
* @param callback The callback
*/
command(groupName: string, serviceName: string, projectName: string, taskName: string, parameters: Models.CommandPropertiesUnion, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.CommandPropertiesUnion>): void;
command(groupName: string, serviceName: string, projectName: string, taskName: string, parameters: Models.CommandPropertiesUnion, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback<Models.CommandPropertiesUnion>): Promise<Models.TasksCommandResponse> {
return this.client.sendOperationRequest(
{
groupName,
serviceName,
projectName,
taskName,
parameters,
options
},
commandOperationSpec,
callback) as Promise<Models.TasksCommandResponse>;
}
/**
* The services resource is the top-level resource that represents the Database Migration Service.
* This method returns a list of tasks owned by a service resource. Some tasks may have a status of
* Unknown, which indicates that an error occurred while querying the status of that task.
* @summary Get tasks in a service
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @param [options] The optional parameters
* @returns Promise<Models.TasksListNextResponse>
*/
listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.TasksListNextResponse>;
/**
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @param callback The callback
*/
listNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.TaskList>): void;
/**
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @param options The optional parameters
* @param callback The callback
*/
listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.TaskList>): void;
listNext(nextPageLink: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback<Models.TaskList>): Promise<Models.TasksListNextResponse> {
return this.client.sendOperationRequest(
{
nextPageLink,
options
},
listNextOperationSpec,
callback) as Promise<Models.TasksListNextResponse>;
}
}
// Operation Specifications
const serializer = new msRest.Serializer(Mappers);
const listOperationSpec: msRest.OperationSpec = {
httpMethod: "GET",
path: "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/tasks",
urlParameters: [
Parameters.subscriptionId,
Parameters.groupName,
Parameters.serviceName,
Parameters.projectName
],
queryParameters: [
Parameters.apiVersion,
Parameters.taskType
],
headerParameters: [
Parameters.acceptLanguage
],
responses: {
200: {
bodyMapper: Mappers.TaskList
},
default: {
bodyMapper: Mappers.ApiError
}
},
serializer
};
const createOrUpdateOperationSpec: msRest.OperationSpec = {
httpMethod: "PUT",
path: "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/tasks/{taskName}",
urlParameters: [
Parameters.subscriptionId,
Parameters.groupName,
Parameters.serviceName,
Parameters.projectName,
Parameters.taskName
],
queryParameters: [
Parameters.apiVersion
],
headerParameters: [
Parameters.acceptLanguage
],
requestBody: {
parameterPath: "parameters",
mapper: {
...Mappers.ProjectTask,
required: true
}
},
responses: {
200: {
bodyMapper: Mappers.ProjectTask
},
201: {
bodyMapper: Mappers.ProjectTask
},
default: {
bodyMapper: Mappers.ApiError
}
},
serializer
};
const getOperationSpec: msRest.OperationSpec = {
httpMethod: "GET",
path: "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/tasks/{taskName}",
urlParameters: [
Parameters.subscriptionId,
Parameters.groupName,
Parameters.serviceName,
Parameters.projectName,
Parameters.taskName
],
queryParameters: [
Parameters.expand,
Parameters.apiVersion
],
headerParameters: [
Parameters.acceptLanguage
],
responses: {
200: {
bodyMapper: Mappers.ProjectTask
},
default: {
bodyMapper: Mappers.ApiError
}
},
serializer
};
const deleteMethodOperationSpec: msRest.OperationSpec = {
httpMethod: "DELETE",
path: "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/tasks/{taskName}",
urlParameters: [
Parameters.subscriptionId,
Parameters.groupName,
Parameters.serviceName,
Parameters.projectName,
Parameters.taskName
],
queryParameters: [
Parameters.deleteRunningTasks,
Parameters.apiVersion
],
headerParameters: [
Parameters.acceptLanguage
],
responses: {
200: {},
204: {},
default: {
bodyMapper: Mappers.ApiError
}
},
serializer
};
const updateOperationSpec: msRest.OperationSpec = {
httpMethod: "PATCH",
path: "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/tasks/{taskName}",
urlParameters: [
Parameters.subscriptionId,
Parameters.groupName,
Parameters.serviceName,
Parameters.projectName,
Parameters.taskName
],
queryParameters: [
Parameters.apiVersion
],
headerParameters: [
Parameters.acceptLanguage
],
requestBody: {
parameterPath: "parameters",
mapper: {
...Mappers.ProjectTask,
required: true
}
},
responses: {
200: {
bodyMapper: Mappers.ProjectTask
},
default: {
bodyMapper: Mappers.ApiError
}
},
serializer
};
const cancelOperationSpec: msRest.OperationSpec = {
httpMethod: "POST",
path: "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/tasks/{taskName}/cancel",
urlParameters: [
Parameters.subscriptionId,
Parameters.groupName,
Parameters.serviceName,
Parameters.projectName,
Parameters.taskName
],
queryParameters: [
Parameters.apiVersion
],
headerParameters: [
Parameters.acceptLanguage
],
responses: {
200: {
bodyMapper: Mappers.ProjectTask
},
default: {
bodyMapper: Mappers.ApiError
}
},
serializer
};
const commandOperationSpec: msRest.OperationSpec = {
httpMethod: "POST",
path: "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/tasks/{taskName}/command",
urlParameters: [
Parameters.subscriptionId,
Parameters.groupName,
Parameters.serviceName,
Parameters.projectName,
Parameters.taskName
],
queryParameters: [
Parameters.apiVersion
],
headerParameters: [
Parameters.acceptLanguage
],
requestBody: {
parameterPath: "parameters",
mapper: {
...Mappers.CommandProperties,
required: true
}
},
responses: {
200: {
bodyMapper: Mappers.CommandProperties
},
default: {
bodyMapper: Mappers.ApiError
}
},
serializer
};
const listNextOperationSpec: msRest.OperationSpec = {
httpMethod: "GET",
baseUrl: "https://management.azure.com",
path: "{nextLink}",
urlParameters: [
Parameters.nextPageLink
],
headerParameters: [
Parameters.acceptLanguage
],
responses: {
200: {
bodyMapper: Mappers.TaskList
},
default: {
bodyMapper: Mappers.ApiError
}
},
serializer
};

Просмотреть файл

@ -0,0 +1,135 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/
import * as msRest from "ms-rest-js";
import * as Models from "../models";
import * as Mappers from "../models/usagesMappers";
import * as Parameters from "../models/parameters";
import { DataMigrationServiceClientContext } from "../dataMigrationServiceClientContext";
/** Class representing a Usages. */
export class Usages {
private readonly client: DataMigrationServiceClientContext;
/**
* Create a Usages.
* @param {DataMigrationServiceClientContext} client Reference to the service client.
*/
constructor(client: DataMigrationServiceClientContext) {
this.client = client;
}
/**
* This method returns region-specific quotas and resource usage information for the Database
* Migration Service.
* @summary Get resource quotas and usage information
* @param location The Azure region of the operation
* @param [options] The optional parameters
* @returns Promise<Models.UsagesListResponse>
*/
list(location: string, options?: msRest.RequestOptionsBase): Promise<Models.UsagesListResponse>;
/**
* @param location The Azure region of the operation
* @param callback The callback
*/
list(location: string, callback: msRest.ServiceCallback<Models.QuotaList>): void;
/**
* @param location The Azure region of the operation
* @param options The optional parameters
* @param callback The callback
*/
list(location: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.QuotaList>): void;
list(location: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback<Models.QuotaList>): Promise<Models.UsagesListResponse> {
return this.client.sendOperationRequest(
{
location,
options
},
listOperationSpec,
callback) as Promise<Models.UsagesListResponse>;
}
/**
* This method returns region-specific quotas and resource usage information for the Database
* Migration Service.
* @summary Get resource quotas and usage information
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @param [options] The optional parameters
* @returns Promise<Models.UsagesListNextResponse>
*/
listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.UsagesListNextResponse>;
/**
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @param callback The callback
*/
listNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.QuotaList>): void;
/**
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @param options The optional parameters
* @param callback The callback
*/
listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.QuotaList>): void;
listNext(nextPageLink: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback<Models.QuotaList>): Promise<Models.UsagesListNextResponse> {
return this.client.sendOperationRequest(
{
nextPageLink,
options
},
listNextOperationSpec,
callback) as Promise<Models.UsagesListNextResponse>;
}
}
// Operation Specifications
const serializer = new msRest.Serializer(Mappers);
const listOperationSpec: msRest.OperationSpec = {
httpMethod: "GET",
path: "subscriptions/{subscriptionId}/providers/Microsoft.DataMigration/locations/{location}/usages",
urlParameters: [
Parameters.subscriptionId,
Parameters.location
],
queryParameters: [
Parameters.apiVersion
],
headerParameters: [
Parameters.acceptLanguage
],
responses: {
200: {
bodyMapper: Mappers.QuotaList
},
default: {
bodyMapper: Mappers.ApiError
}
},
serializer
};
const listNextOperationSpec: msRest.OperationSpec = {
httpMethod: "GET",
baseUrl: "https://management.azure.com",
path: "{nextLink}",
urlParameters: [
Parameters.nextPageLink
],
headerParameters: [
Parameters.acceptLanguage
],
responses: {
200: {
bodyMapper: Mappers.QuotaList
},
default: {
bodyMapper: Mappers.ApiError
}
},
serializer
};

Просмотреть файл

@ -0,0 +1,42 @@
{
"name": "@azure/arm-datamigration",
"author": "Microsoft Corporation",
"description": "DataMigrationServiceClient Library with typescript type definitions for node.js and browser.",
"version": "1.0.0-preview",
"dependencies": {
"ms-rest-azure-js": "^1.0.166",
"ms-rest-js": "^1.0.439",
"tslib": "^1.9.3"
},
"keywords": [
"node",
"azure",
"typescript",
"browser",
"isomorphic"
],
"license": "MIT",
"main": "./dist/arm-datamigration.js",
"module": "./esm/dataMigrationServiceClient.js",
"types": "./esm/dataMigrationServiceClient.d.ts",
"devDependencies": {
"typescript": "^3.1.1",
"rollup": "^0.66.2",
"rollup-plugin-node-resolve": "^3.4.0",
"uglify-js": "^3.4.9"
},
"homepage": "https://github.com/azure/azure-sdk-for-js",
"repository": {
"type": "git",
"url": "https://github.com/azure/azure-sdk-for-js.git"
},
"bugs": {
"url": "https://github.com/azure/azure-sdk-for-js/issues"
},
"scripts": {
"build": "tsc && rollup -c rollup.config.js && npm run minify",
"minify": "uglifyjs -c -m --comments --source-map \"content='./dist/arm-datamigration.js.map'\" -o ./dist/arm-datamigration.min.js ./dist/arm-datamigration.js",
"prepare": "npm run build"
},
"sideEffects": false
}

Просмотреть файл

@ -0,0 +1,31 @@
import nodeResolve from "rollup-plugin-node-resolve";
/**
* @type {import('rollup').RollupFileOptions}
*/
const config = {
input: './esm/dataMigrationServiceClient.js',
external: ["ms-rest-js", "ms-rest-azure-js"],
output: {
file: "./dist/arm-datamigration.js",
format: "umd",
name: "Azure.ArmDatamigration",
sourcemap: true,
globals: {
"ms-rest-js": "msRest",
"ms-rest-azure-js": "msRestAzure"
},
banner: `/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/`
},
plugins: [
nodeResolve({ module: true })
]
};
export default config;

Просмотреть файл

@ -0,0 +1,19 @@
{
"compilerOptions": {
"module": "es6",
"moduleResolution": "node",
"strict": true,
"target": "es5",
"sourceMap": true,
"declarationMap": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"forceConsistentCasingInFileNames": true,
"lib": ["es6"],
"declaration": true,
"outDir": "./esm",
"importHelpers": true
},
"include": ["./lib/**/*"],
"exclude": ["node_modules"]
}