Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: [clouddms] add Oracle to PostgreSQL migration APIs #4285

Merged
merged 3 commits into from
May 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 39 additions & 21 deletions packages/google-cloud-clouddms/README.md

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

10,218 changes: 9,210 additions & 1,008 deletions packages/google-cloud-clouddms/protos/protos.d.ts

Large diffs are not rendered by default.

39,194 changes: 30,099 additions & 9,095 deletions packages/google-cloud-clouddms/protos/protos.js

Large diffs are not rendered by default.

3,639 changes: 2,923 additions & 716 deletions packages/google-cloud-clouddms/protos/protos.json

Large diffs are not rendered by default.

356 changes: 340 additions & 16 deletions packages/google-cloud-clouddms/samples/README.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// ** This file is automatically generated by gapic-generator-typescript. **
// ** https://github.com/googleapis/gapic-generator-typescript **
// ** All changes to this file may be overwritten. **



'use strict';

function main(name) {
// [START datamigration_v1_generated_DataMigrationService_ApplyConversionWorkspace_async]
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the conversion workspace resource for which to apply
* the draft tree. Must be in the form of:
* projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}.
*/
// const name = 'abc123'
/**
* Filter which entities to apply. Leaving this field empty will apply all of
* the entities. Supports Google AIP 160 based filtering.
*/
// const filter = 'abc123'
/**
* Fully qualified (Uri) name of the destination connection profile.
*/
// const connectionProfile = 'abc123'

// Imports the Clouddms library
const {DataMigrationServiceClient} = require('@google-cloud/dms').v1;

// Instantiates a client
const clouddmsClient = new DataMigrationServiceClient();

async function callApplyConversionWorkspace() {
// Construct request
const request = {
name,
};

// Run request
const [operation] = await clouddmsClient.applyConversionWorkspace(request);
const [response] = await operation.promise();
console.log(response);
}

callApplyConversionWorkspace();
// [END datamigration_v1_generated_DataMigrationService_ApplyConversionWorkspace_async]
}

process.on('unhandledRejection', err => {
console.error(err.message);
process.exitCode = 1;
});
main(...process.argv.slice(2));
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// ** This file is automatically generated by gapic-generator-typescript. **
// ** https://github.com/googleapis/gapic-generator-typescript **
// ** All changes to this file may be overwritten. **



'use strict';

function main(name) {
// [START datamigration_v1_generated_DataMigrationService_CommitConversionWorkspace_async]
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Name of the conversion workspace resource to commit.
*/
// const name = 'abc123'
/**
* Optional. Optional name of the commit.
*/
// const commitName = 'abc123'

// Imports the Clouddms library
const {DataMigrationServiceClient} = require('@google-cloud/dms').v1;

// Instantiates a client
const clouddmsClient = new DataMigrationServiceClient();

async function callCommitConversionWorkspace() {
// Construct request
const request = {
name,
};

// Run request
const [operation] = await clouddmsClient.commitConversionWorkspace(request);
const [response] = await operation.promise();
console.log(response);
}

callCommitConversionWorkspace();
// [END datamigration_v1_generated_DataMigrationService_CommitConversionWorkspace_async]
}

process.on('unhandledRejection', err => {
console.error(err.message);
process.exitCode = 1;
});
main(...process.argv.slice(2));
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// ** This file is automatically generated by gapic-generator-typescript. **
// ** https://github.com/googleapis/gapic-generator-typescript **
// ** All changes to this file may be overwritten. **



'use strict';

function main() {
// [START datamigration_v1_generated_DataMigrationService_ConvertConversionWorkspace_async]
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Name of the conversion workspace resource to convert in the form of:
* projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}.
*/
// const name = 'abc123'
/**
* Specifies whether the conversion workspace is to be committed automatically
* after the conversion.
*/
// const autoCommit = true
/**
* Filter the entities to convert. Leaving this field empty will convert all
* of the entities. Supports Google AIP-160 style filtering.
*/
// const filter = 'abc123'

// Imports the Clouddms library
const {DataMigrationServiceClient} = require('@google-cloud/dms').v1;

// Instantiates a client
const clouddmsClient = new DataMigrationServiceClient();

async function callConvertConversionWorkspace() {
// Construct request
const request = {
};

// Run request
const [operation] = await clouddmsClient.convertConversionWorkspace(request);
const [response] = await operation.promise();
console.log(response);
}

callConvertConversionWorkspace();
// [END datamigration_v1_generated_DataMigrationService_ConvertConversionWorkspace_async]
}

process.on('unhandledRejection', err => {
console.error(err.message);
process.exitCode = 1;
});
main(...process.argv.slice(2));
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function main(parent, connectionProfileId, connectionProfile) {
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The parent, which owns this collection of connection profiles.
* Required. The parent which owns this collection of connection profiles.
*/
// const parent = 'abc123'
/**
Expand All @@ -41,13 +41,25 @@ function main(parent, connectionProfileId, connectionProfile) {
*/
// const connectionProfile = {}
/**
* A unique id used to identify the request. If the server receives two
* requests with the same id, then the second request will be ignored.
* Optional. A unique ID used to identify the request. If the server receives
* two requests with the same ID, then the second request is ignored.
* It is recommended to always set this value to a UUID.
* The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
* The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores
* (_), and hyphens (-). The maximum length is 40 characters.
*/
// const requestId = 'abc123'
/**
* Optional. Only validate the connection profile, but don't create any
* resources. The default is false. Only supported for Oracle connection
* profiles.
*/
// const validateOnly = true
/**
* Optional. Create the connection profile without validating it.
* The default is false.
* Only supported for Oracle connection profiles.
*/
// const skipValidation = true

// Imports the Clouddms library
const {DataMigrationServiceClient} = require('@google-cloud/dms').v1;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// ** This file is automatically generated by gapic-generator-typescript. **
// ** https://github.com/googleapis/gapic-generator-typescript **
// ** All changes to this file may be overwritten. **



'use strict';

function main(parent, conversionWorkspaceId, conversionWorkspace) {
// [START datamigration_v1_generated_DataMigrationService_CreateConversionWorkspace_async]
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The parent which owns this collection of conversion workspaces.
*/
// const parent = 'abc123'
/**
* Required. The ID of the conversion workspace to create.
*/
// const conversionWorkspaceId = 'abc123'
/**
* Required. Represents a conversion workspace object.
*/
// const conversionWorkspace = {}
/**
* A unique ID used to identify the request. If the server receives two
* requests with the same ID, then the second request is ignored.
* It is recommended to always set this value to a UUID.
* The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores
* (_), and hyphens (-). The maximum length is 40 characters.
*/
// const requestId = 'abc123'

// Imports the Clouddms library
const {DataMigrationServiceClient} = require('@google-cloud/dms').v1;

// Instantiates a client
const clouddmsClient = new DataMigrationServiceClient();

async function callCreateConversionWorkspace() {
// Construct request
const request = {
parent,
conversionWorkspaceId,
conversionWorkspace,
};

// Run request
const [operation] = await clouddmsClient.createConversionWorkspace(request);
const [response] = await operation.promise();
console.log(response);
}

callCreateConversionWorkspace();
// [END datamigration_v1_generated_DataMigrationService_CreateConversionWorkspace_async]
}

process.on('unhandledRejection', err => {
console.error(err.message);
process.exitCode = 1;
});
main(...process.argv.slice(2));
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function main(parent, migrationJobId, migrationJob) {
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The parent, which owns this collection of migration jobs.
* Required. The parent which owns this collection of migration jobs.
*/
// const parent = 'abc123'
/**
Expand All @@ -43,10 +43,10 @@ function main(parent, migrationJobId, migrationJob) {
*/
// const migrationJob = {}
/**
* A unique id used to identify the request. If the server receives two
* requests with the same id, then the second request will be ignored.
* A unique ID used to identify the request. If the server receives two
* requests with the same ID, then the second request is ignored.
* It is recommended to always set this value to a UUID.
* The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
* The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores
* (_), and hyphens (-). The maximum length is 40 characters.
*/
// const requestId = 'abc123'
Expand Down
Loading