이 페이지에서는 Database Migration Service API를 사용하여 PostgreSQL 소스 데이터베이스와 AlloyDB 대상의 연결 프로필을 관리하는 방법을 알아봅니다.
Database Migration Service API를 사용하는 방법에는 두 가지가 있습니다. REST API 호출을 수행하거나 Google Cloud CLI(CLI)를 사용할 수 있습니다.
gcloud를 사용하여 Database Migration Service 연결 프로필을 관리하는 방법에 대한 대략적인 정보를 보려면 여기를 클릭하세요.
PostgreSQL 소스 데이터베이스의 연결 프로필 만들기
다음은 PostgreSQL 소스 데이터베이스의 연결 프로필을 만드는 요청을 보여줍니다.
REST
요청 데이터를 사용하기 전에 다음을 바꿉니다.
project-id: 프로젝트 ID
region: 프로젝트 리전
connection-profile-id: 연결 프로필 ID
connection-profile-display-name: 연결 프로필 표시 이름
host-ip-address: 소스 IP 주소
username: 데이터베이스 사용자 이름
password: 데이터베이스 사용자 비밀번호
HTTP 메서드 및 URL:
POST https://datamigration.googleapis.com/v1/projects/project-id/locations/region/connectionProfiles?connectionProfileId=connection-profile-id
GET https://datamigration.googleapis.com/v1/projects/project-id/locations/region/connectionProfiles/connection-profile-id
gcloud를 사용하여 연결 프로필에 대한 정보를 검색하는 방법에 대한 자세한 내용은 여기를 클릭하세요.
PostgreSQL용 Cloud SQL 소스 데이터베이스의 연결 프로필 만들기
다음은 PostgreSQL용 Cloud SQL 소스 데이터베이스의 연결 프로필을 만드는 요청을 보여줍니다. 이 예에서는 Cloud SQL 관리 레이어가 아닌 PostgreSQL 데이터베이스 엔진에 연결하므로 PostgreSQL 연결 프로필을 사용합니다.
Cloud SQL을 사용하여 소스와 복제본 간에 페어링을 만들려면 Cloud SQL 데이터베이스의 인스턴스 ID를 제공해야 합니다. Cloud SQL Admin API의 databases/list 메서드를 사용하여 인스턴스 ID 값을 찾을 수 있습니다.
REST
요청 데이터를 사용하기 전에 다음을 바꿉니다.
project-id: 프로젝트 ID
region: 프로젝트 리전
connection-profile-id: 연결 프로필 ID
connection-profile-display-name: 연결 프로필 표시 이름
host-ip-address: 소스 IP 주소
username: 데이터베이스 사용자 이름
password: 데이터베이스 사용자 비밀번호
cloud-sql-instance-id: Cloud SQL 인스턴스 ID
HTTP 메서드 및 URL:
POST https://datamigration.googleapis.com/v1/projects/project-id/locations/region/connectionProfiles?connectionProfileId=connection-profile-id
gcloud를 사용하여 Database Migration Service 연결 프로필을 만드는 방법에 대한 대략적인 정보를 보려면 여기를 클릭하세요.
PostgreSQL용 AlloyDB 대상의 연결 프로필 만들기
다음은 PostgreSQL용 AlloyDB 대상의 연결 프로필을 만드는 요청을 보여줍니다.
Database Migration Service는 이 요청의 정보를 사용하여 새 AlloyDB 인스턴스를 만듭니다.
REST
요청 데이터를 사용하기 전에 다음을 바꿉니다.
project-id: 프로젝트 ID
region: 프로젝트 리전
connection-profile-id: 연결 프로필 ID
connection-profile-display-name: 연결 프로필 표시 이름
cluster-id: 만들려는 AlloyDB 클러스터 ID입니다.
user: 초기 사용자에게 제공할 사용자 이름
password: 초기 사용자에게 제공할 비밀번호
vpc-network: AlloyDB 클러스터가 연결될 VPC 네트워크
instance-id: 만들 AlloyDB 인스턴스 ID
cpu-count: 인스턴스를 구성할 CPU 수입니다.
Google Cloud 내에 저장된 모든 데이터는 Google이 암호화된 자체 데이터에 사용하는 것과 동일한 강화 키 관리 시스템을 사용하여 저장 상태에서 암호화됩니다. 이러한 키 관리 시스템은 엄격한 키 액세스 제어 및 감사 기능을 제공하며 AES-256 암호화 표준을 사용하여 사용자 저장 데이터를 암호화합니다. 설정, 구성 또는 관리가 필요하지 않습니다. Google Cloud의 기본 저장 데이터 암호화는 암호화 자료의 규정 준수 또는 지역과 관련된 특정 요구사항이 없는 사용자에게 가장 적합합니다.
HTTP 메서드 및 URL:
POST https://datamigration.googleapis.com/v1/projects/project-id/locations/region/connectionProfiles?connectionProfileId=connection-profile-id
gcloud를 사용하여 Database Migration Service 연결 프로필을 만드는 방법에 대한 대략적인 정보를 보려면 여기를 클릭하세요.
연결 프로필 정보 가져오기
REST
요청 데이터를 사용하기 전에 다음을 바꿉니다.
project-id: 프로젝트 ID
region: 프로젝트 리전
connection-profile-id: 연결 프로필 ID
HTTP 메서드 및 URL:
GET https://datamigration.googleapis.com/v1/projects/project-id/locations/region/connectionProfiles/connection-profile-id
gcloud를 사용하여 연결 프로필에 대한 정보를 검색하는 방법에 대한 자세한 내용은 여기를 클릭하세요.
연결 프로필 나열
다음은 모든 연결 프로필에 대한 정보를 검색하는 요청을 보여줍니다.
REST
요청 데이터를 사용하기 전에 다음을 바꿉니다.
project-id: 프로젝트 ID
region: 프로젝트 리전
다음과 같이 Database Migration Service에서 가져오는 연결 프로필 목록을 필터링할 수도 있습니다.
orderBy: 이 필터를 사용하면 특정 리전의 모든 연결 프로필 목록을 알파벳순으로 가져올 수 있습니다. 예를 들어 orderBy=name 필터는 모든 연결 프로필을 이름순으로 알파벳순으로 반환합니다.
pageSize: 이 필터를 사용하여 Database Migration Service가 페이지에서 가져와 표시하는 최대 연결 프로필 수를 지정합니다. 예를 들어 pageSize=10를 설정하면 Database Migration Service는 페이지에 대해 최대 10개의 연결 프로필을 반환합니다.
연결 프로필이 10개를 초과하면 다른 페이지에 표시됩니다. 각 페이지 끝에 nextPageToken 매개변수와 고유 식별자가 표시됩니다. 식별자를 사용하여 다음 페이지의 연결 프로필 목록을 가져옵니다.
HTTP 메서드 및 URL:
GET https://datamigration.googleapis.com/v1/projects/project-id/locations/region/connectionProfiles
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-04-22(UTC)"],[[["This page explains how to manage connection profiles for PostgreSQL source databases and AlloyDB destinations using the Database Migration Service API, which can be accessed through REST API calls or the Google Cloud CLI."],["You can create connection profiles for PostgreSQL source databases, including Cloud SQL for PostgreSQL, by using provided request examples and specific parameters such as project ID, region, and connection profile details."],["AlloyDB destination connection profiles can be created, and they support the creation of new AlloyDB instances, with options to specify cluster ID, user credentials, VPC network, instance ID, and CPU configuration."],["Connection profile information can be viewed, updated, and listed using the API, and it includes filtering and ordering options for efficient retrieval of information."],["Connection profiles can be deleted, but if there are active migration jobs associated with it, they must be promoted or deleted first, and if it's an AlloyDB instance it can also be cascade-deleted using the API."]]],[]]