mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-20 09:20:16 +00:00
Partition Key Change with Container Copy (#1734)
* initial commit * Add change partition key logic * Update snapshot * Update snapshot * Update snapshot * Update snapshot * Cleanup code * Disable Change on progress job * add the database information in the panel * add the database information in the panel * clear in progress message and remove large partition key row * hide from national cloud * hide from national cloud * Add check for public cloud
This commit is contained in:
@@ -0,0 +1,78 @@
|
||||
/*
|
||||
AUTOGENERATED FILE
|
||||
Run "npm run generateARMClients" to regenerate
|
||||
Edting this file directly should be done with extreme caution as not to diverge from ARM REST specs
|
||||
|
||||
Generated from: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2023-11-15-preview/dataTransferService.json
|
||||
*/
|
||||
|
||||
import { configContext } from "../../../../ConfigContext";
|
||||
import { armRequest } from "../../request";
|
||||
import * as Types from "./types";
|
||||
const apiVersion = "2023-11-15-preview";
|
||||
|
||||
/* Creates a Data Transfer Job. */
|
||||
export async function create(
|
||||
subscriptionId: string,
|
||||
resourceGroupName: string,
|
||||
accountName: string,
|
||||
jobName: string,
|
||||
body: Types.CreateJobRequest,
|
||||
): Promise<Types.DataTransferJobGetResults> {
|
||||
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/dataTransferJobs/${jobName}`;
|
||||
return armRequest({ host: configContext.ARM_ENDPOINT, path, method: "PUT", apiVersion, body });
|
||||
}
|
||||
|
||||
/* Get a Data Transfer Job. */
|
||||
export async function get(
|
||||
subscriptionId: string,
|
||||
resourceGroupName: string,
|
||||
accountName: string,
|
||||
jobName: string,
|
||||
): Promise<Types.DataTransferJobGetResults> {
|
||||
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/dataTransferJobs/${jobName}`;
|
||||
return armRequest({ host: configContext.ARM_ENDPOINT, path, method: "GET", apiVersion });
|
||||
}
|
||||
|
||||
/* Pause a Data Transfer Job. */
|
||||
export async function pause(
|
||||
subscriptionId: string,
|
||||
resourceGroupName: string,
|
||||
accountName: string,
|
||||
jobName: string,
|
||||
): Promise<Types.DataTransferJobGetResults> {
|
||||
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/dataTransferJobs/${jobName}/pause`;
|
||||
return armRequest({ host: configContext.ARM_ENDPOINT, path, method: "POST", apiVersion });
|
||||
}
|
||||
|
||||
/* Resumes a Data Transfer Job. */
|
||||
export async function resume(
|
||||
subscriptionId: string,
|
||||
resourceGroupName: string,
|
||||
accountName: string,
|
||||
jobName: string,
|
||||
): Promise<Types.DataTransferJobGetResults> {
|
||||
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/dataTransferJobs/${jobName}/resume`;
|
||||
return armRequest({ host: configContext.ARM_ENDPOINT, path, method: "POST", apiVersion });
|
||||
}
|
||||
|
||||
/* Cancels a Data Transfer Job. */
|
||||
export async function cancel(
|
||||
subscriptionId: string,
|
||||
resourceGroupName: string,
|
||||
accountName: string,
|
||||
jobName: string,
|
||||
): Promise<Types.DataTransferJobGetResults> {
|
||||
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/dataTransferJobs/${jobName}/cancel`;
|
||||
return armRequest({ host: configContext.ARM_ENDPOINT, path, method: "POST", apiVersion });
|
||||
}
|
||||
|
||||
/* Get a list of Data Transfer jobs. */
|
||||
export async function listByDatabaseAccount(
|
||||
subscriptionId: string,
|
||||
resourceGroupName: string,
|
||||
accountName: string,
|
||||
): Promise<Types.DataTransferJobFeedResults> {
|
||||
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/dataTransferJobs`;
|
||||
return armRequest({ host: configContext.ARM_ENDPOINT, path, method: "GET", apiVersion });
|
||||
}
|
||||
101
src/Utils/arm/generatedClients/dataTransferService/types.ts
Normal file
101
src/Utils/arm/generatedClients/dataTransferService/types.ts
Normal file
@@ -0,0 +1,101 @@
|
||||
/*
|
||||
AUTOGENERATED FILE
|
||||
Run "npm run generateARMClients" to regenerate
|
||||
Edting this file directly should be done with extreme caution as not to diverge from ARM REST specs
|
||||
|
||||
Generated from: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2023-11-15-preview/dataTransferService.json
|
||||
*/
|
||||
|
||||
/* Base class for all DataTransfer source/sink */
|
||||
export interface DataTransferDataSourceSink {
|
||||
/* undocumented */
|
||||
component: "CosmosDBCassandra" | "CosmosDBMongo" | "CosmosDBSql" | "AzureBlobStorage";
|
||||
}
|
||||
|
||||
/* A base CosmosDB data source/sink */
|
||||
export type BaseCosmosDataTransferDataSourceSink = DataTransferDataSourceSink & {
|
||||
/* undocumented */
|
||||
remoteAccountName?: string;
|
||||
};
|
||||
|
||||
/* A CosmosDB Cassandra API data source/sink */
|
||||
export type CosmosCassandraDataTransferDataSourceSink = BaseCosmosDataTransferDataSourceSink & {
|
||||
/* undocumented */
|
||||
keyspaceName: string;
|
||||
/* undocumented */
|
||||
tableName: string;
|
||||
};
|
||||
|
||||
/* A CosmosDB Mongo API data source/sink */
|
||||
export type CosmosMongoDataTransferDataSourceSink = BaseCosmosDataTransferDataSourceSink & {
|
||||
/* undocumented */
|
||||
databaseName: string;
|
||||
/* undocumented */
|
||||
collectionName: string;
|
||||
};
|
||||
|
||||
/* A CosmosDB No Sql API data source/sink */
|
||||
export type CosmosSqlDataTransferDataSourceSink = BaseCosmosDataTransferDataSourceSink & {
|
||||
/* undocumented */
|
||||
databaseName: string;
|
||||
/* undocumented */
|
||||
containerName: string;
|
||||
};
|
||||
|
||||
/* An Azure Blob Storage data source/sink */
|
||||
export type AzureBlobDataTransferDataSourceSink = DataTransferDataSourceSink & {
|
||||
/* undocumented */
|
||||
containerName: string;
|
||||
/* undocumented */
|
||||
endpointUrl?: string;
|
||||
};
|
||||
|
||||
/* The properties of a DataTransfer Job */
|
||||
export interface DataTransferJobProperties {
|
||||
/* Job Name */
|
||||
readonly jobName?: string;
|
||||
/* Source DataStore details */
|
||||
source: DataTransferDataSourceSink;
|
||||
|
||||
/* Destination DataStore details */
|
||||
destination: DataTransferDataSourceSink;
|
||||
|
||||
/* Job Status */
|
||||
readonly status?: string;
|
||||
/* Processed Count. */
|
||||
readonly processedCount?: number;
|
||||
/* Total Count. */
|
||||
readonly totalCount?: number;
|
||||
/* Last Updated Time (ISO-8601 format). */
|
||||
readonly lastUpdatedUtcTime?: string;
|
||||
/* Worker count */
|
||||
workerCount?: number;
|
||||
/* Error response for Faulted job */
|
||||
readonly error?: unknown;
|
||||
|
||||
/* Total Duration of Job */
|
||||
readonly duration?: string;
|
||||
/* Mode of job execution */
|
||||
mode?: "Offline" | "Online";
|
||||
}
|
||||
|
||||
/* Parameters to create Data Transfer Job */
|
||||
export type CreateJobRequest = unknown & {
|
||||
/* Data Transfer Create Job Properties */
|
||||
properties: DataTransferJobProperties;
|
||||
};
|
||||
|
||||
/* A Cosmos DB Data Transfer Job */
|
||||
export type DataTransferJobGetResults = unknown & {
|
||||
/* undocumented */
|
||||
properties?: DataTransferJobProperties;
|
||||
};
|
||||
|
||||
/* The List operation response, that contains the Data Transfer jobs and their properties. */
|
||||
export interface DataTransferJobFeedResults {
|
||||
/* List of Data Transfer jobs and their properties. */
|
||||
readonly value?: DataTransferJobGetResults[];
|
||||
|
||||
/* URL to get the next set of Data Transfer job list results if there are any. */
|
||||
readonly nextLink?: string;
|
||||
}
|
||||
Reference in New Issue
Block a user