createCloudMysqlInstance
    • PDF

    createCloudMysqlInstance

    • PDF

    Article Summary

    VPC環境で利用できます。

    Cloud DB for MySQLのインスタンスを作成します。

    リクエスト

    リクエストパラメータ

    パラメータタイプ要否説明制約事項
    regionCodeStringNCloud DB for MySQLインスタンスを作成するリージョンコード
    - getRegionListアクションを通じて取得可能
    - default: getRegionList照会結果の最初のリージョン
    -
    vpcNoStringYVPC番号
    - getCloudMysqlTargetVpcListアクションを通じて取得可能
    -
    cloudMysqlImageProductCodeStringNCloud DB for MySQLイメージのサービスコード
    - getCloudMysqlImageProductListアクションの productCodeで取得可能
    - 入力しない場合、default値で作成
    -
    cloudMysqlProductCodeStringNCloud DB for MySQLのサービスコード
    - getCloudMysqlProductListアクションの productCodeで取得可能
    - default: 最小仕様に選択され、最小仕様の基準は 1. メモリ 2. CPU
    -
    dataStorageTypeCodeStringNデータストレージのタイプコード
    - インストール後にデータストレージタイプは変更不可
    - options
     - cloudMysqlImageProductCodeの generationCodeが G2の場合: SSD | HDD
     - cloudMysqlImageProductCodeの generationCodeが G3の場合: CB1
    - default
     - cloudMysqlImageProductCodeの generationCodeが G2の場合: SSD
     - cloudMysqlImageProductCodeの generationCodeが G3の場合: CB1
    -
    isHaBooleanN高可用性の有無
    - 高可用性を選択すると、Standby Masterサーバを含めて2台のサーバが作成され、追加料金が発生
    - 高可用性の有無(isHa)が falseであれば isMultiZone、standbyMasterSubnetNoパラメータは使用不可
    - default: true
    -
    isMultiZoneBooleanNマルチゾーンの有無
    - 高可用性の有無(isHa)が trueの場合、マルチゾーンの有無を選択できる
    - マルチゾーンを選択すると、Masterサーバと Standby Masterサーバを異なる Zoneに作成してより高い可用性を提供
    - 高可用性の有無(isHa)が trueである場合、必ず入力
    - default: false
    -
    isStorageEncryptionBooleanNデータストレージ暗号化の適用有無
    - 暗号化適用時 DBデータは暗号化され、ストレージに保存 Cloud DB for MySQLのインスタンスの作成後はストレージ暗号化設定の変更は不可能
    - 高可用性の有無(isHa)が trueである場合のみ暗号化の適用ができる
    - default: false
    -
    isBackupBooleanNバックアップの有無
    - 高可用性の有無(isHa)が trueである場合、バックアップの有無(isBackup)は trueに固定
    - default: true
    -
    backupFileRetentionPeriodIntegerNバックアップファイルの保存期間
    - バックアップは InnoDBエンジンのみサポートし、それ以外のエンジンで作成されたテーブルのバックアップはサポートしない
    - バックアップは毎日行われ、バックアップファイルは別途のバックアップストレージに保存され、料金は使用する容量分だけ課金
    - default: 1(1日)
    -
    backupTimeStringNバックアップ時間
    - バックアップを行う時間を設定、バックアップの有無(isBackup)が trueで、自動バックアップの有無(isAutomaticBackup)が falseであれば必ず入力
    例)
    - 01:15
    -
    isAutomaticBackupBooleanNバックアップ時間の自動有無
    - 自動的にバックアップ時間を設定するかの有無を選択、自動バックアップの有無(isAutomaticBackup)が trueであれば backupTimeの入力不可
    - default: true
    -
    cloudMysqlServiceNameStringYCloud DB for MySQLのサービス名- 英数字、ハイフン(-)、ハングルのみ入力可能
    - min: 3
    - max: 20
    cloudMysqlServerNamePrefixStringYCloud DB for MySQLのサーバ名接頭辞
    - ホスト名の重複を防ぐため、任意の textが追加で含まれ作成される
    - 英小文字、数字、ハイフン(-)でのみ構成
    - 先頭は英字、末尾は英字または数字のみ可能
    - min: 3
    - max: 30
    cloudMysqlUserNameStringYMySQL User ID- 英数字、記号(\ _ , -)のみ許可し、先頭は英字にすること
    - min: 4
    - max: 16
    cloudMysqlUserPasswordStringYMySQL Userパスワード- 英数字、記号の3つの項目を1文字以上含むこと
    - 特定記号(` & + \ " ' / 空白)は使用不可
    - min: 8
    - max: 20
    hostIpStringYMySQL User host
    例)
    - 全体アクセスを許可: %
    - 特定の IPアドレスアクセスを許可: 1.1.1.1
    - IPアドレス帯域のアクセスを許可: 1.1.1.%
    -
    cloudMysqlPortIntegerNCloud DB for MySQLのインスタンスにアクセスするための TCPポート番号
    - default: 3306
    3306
    or
    - min: 10000
    - max: 20000
    cloudMysqlDatabaseNameStringYCloud DB for MySQLのインスタンスに基本的に作成する DB名- 英数字、記号(\ _ , -)のみ許可し、先頭は英字にすること
    - min: 1
    - max: 30
    subnetNoStringYSubnet番号
    - getCloudMysqlTargetSubnetListアクションを通じて取得可能
    - Publicドメインは、Public Subnetに作成された DBサーバでのみご利用の申し込みができる
    - Cloud DB for MySQLのインスタンス作成後に Subnet移動は不可能
    -
    standbyMasterSubnetNoStringNStandby Masterサーバのサブネット番号
    - マルチゾーンの有無(isMultiZone)が falseであれば入力せず、マルチゾーンの有無(isMultiZone)が trueであれば必ず入力
    - standbyMasterSubnetNoは、Masterサーバの Subnetと Zoneが異なる必要があり、同じ Publicか Privateである必要がある
    - getCloudMysqlTargetSubnetListアクションを通じて取得可能
    -
    isPrivateSubDomainBooleanNPrivate Sub Domainの使用有無
    - Private Sub Domainの使用有無(isPrivateSubDomain)が trueの場合、private sub domain prefixの指定ができる
    -
    privateSubDomainPrefixStringNPrivate Sub Domain Prefix
    - Private Domainに Sub Domainを追加
    - Private Sub Domainの使用有無(isPrivateSubDomain)が trueの場合、必ず入力
    - 英小文字、数字、ハイフン(-)でのみ構成
    - 先頭は英字、末尾は英字または数字のみ可能
    - min: 3
    - max: 15
    engineVersionCodeStringNEngine Version
    - getCloudMysqlImageProductListアクションを通じて取得可能
    - cloudMysqlImageProductCodeの generationCodeが G3の場合に入力
    - 入力しない場合、現在提供中の最新バージョンで作成
    -
    responseFormatTypeStringNレスポンス結果のフォーマットタイプ
    - options: xml | json
    - default: xml
    -

    レスポンス

    レスポンスボディ

    レスポンスボディは CloudMysqlInstanceListをご参照ください。

    リクエスト例

    リクエスト構文例は、次の通りです。

    GET {API_URL}/createCloudMysqlInstance
    ?regionCode=KR
    &vpcNo=****83
    &cloudMysqlImageProductCode=SW.VDBAS.DBAAS.LNX64.CNTOS.0708.MYSQL.8025.B050
    &cloudMysqlProductCode=SVR.VDBAS.STAND.C002.M008.NET.HDD.B050.G002
    &dataStorageTypeCode=SSD
    &isHa=true
    &isMultiZone=true
    &isStorageEncryption=true
    &isBackup=true
    &backupFileRetentionPeriod=10
    &backupTime=02:00
    &isAutomaticBackup=false
    &cloudMysqlServiceName=test-****
    &cloudMysqlServerNamePrefix=test-****
    &cloudMysqlUserName=test-****
    &cloudMysqlUserPassword=********
    &hostIp=192.168.0.%
    &cloudMysqlPort=13306
    &cloudMysqlDatabaseName=test-****
    &subnetNo=****91
    &standbyMasterSubnetNo=****93
    

    レスポンス例

    レスポンス構文例は、次の通りです。

    レスポンス結果フォーマットタイプ(responseFormatType)が jsonであるとき

    {
      "createCloudMysqlInstanceResponse": {
        "requestId": "ae758cc2-006c-4df5-8ad2-aeef4ecfa8bf",
        "returnCode": "0",
        "returnMessage": "success",
        "totalRows": 1,
        "cloudMysqlInstanceList": [
          {
            "cloudMysqlInstanceNo": "****890",
            "cloudMysqlServiceName": "test-****",
            "cloudMysqlInstanceStatusName": "creating",
            "cloudMysqlInstanceStatus": {
              "code": "INIT",
              "codeName": "CLOUD DATABASE(VPC) Init State"
            },
            "cloudMysqlInstanceOperation": {
              "code": "CREAT",
              "codeName": "CLOUD DATABASE(VPC) Creat OP"
            },
            "cloudMysqlImageProductCode": "SW.VDBAS.DBAAS.LNX64.CNTOS.0708.MYSQL.8025.B050",
            "engineVersion": "MYSQL8.0.25",
            "license": {
              "code": "GPL",
              "codeName": "General Public License"
            },
            "cloudMysqlPort": 3306,
            "isHa": true,
            "isMultiZone": true,
            "isBackup": true,
            "backupFileRetentionPeriod": 10,
            "backupTime": "02:00",
            "generationCode": "G2",
            "createDate": "2021-05-27T18:00:00+0900",
            "accessControlGroupNoList": [],
            "cloudMysqlConfigList": [],
            "cloudMysqlServerInstanceList": [
              {
                "cloudMysqlServerName": "test-****-001-e04",
                "cloudMysqlServerRole": {
                  "code": "M",
                  "codeName": "Master"
                },
                "cloudMysqlServerInstanceStatusName": "creating",
                "cloudMysqlServerInstanceStatus": {
                  "code": "PEND",
                  "codeName": "CLOUD DATABASE(VPC) Server Pending State"
                },
                "cloudMysqlServerInstanceOperation": {
                  "code": "CREAT",
                  "codeName": "CLOUD DATABASE(VPC) Server Create OP"
                },
                "cloudMysqlProductCode": "SVR.VDBAS.STAND.C002.M008.NET.HDD.B050.G002",
                "regionCode": "KR",
                "zoneCode": "KR-1",
                "vpcNo": "****83",
                "subnetNo": "****91",
                "isPublicSubnet": true,
                "privateIp": "***.***.***.***",
                "dataStorageType": {
                  "code": "SSD",
                  "codeName": "SSD"
                },
                "isStorageEncryption": true,
                "dataStorageSize": 10737418240,
                "cpuCount": 2,
                "memorySize": 8589934592,
                "createDate": "2021-05-27T18:00:00+0900"
              },
              {
                "cloudMysqlServerName": "test-****-002-e05",
                "cloudMysqlServerRole": {
                  "code": "H",
                  "codeName": "Standby Master"
                },
                "cloudMysqlServerInstanceStatusName": "creating",
                "cloudMysqlServerInstanceStatus": {
                  "code": "PEND",
                  "codeName": "CLOUD DATABASE(VPC) Server Pending State"
                },
                "cloudMysqlServerInstanceOperation": {
                  "code": "CREAT",
                  "codeName": "CLOUD DATABASE(VPC) Server Create OP"
                },
                "cloudMysqlProductCode": "SVR.VDBAS.STAND.C002.M008.NET.HDD.B050.G002",
                "regionCode": "KR",
                "zoneCode": "KR-2",
                "vpcNo": "****83",
                "subnetNo": "****93",
                "isPublicSubnet": true,
                "privateIp": "***.***.***.***",
                "dataStorageType": {
                  "code": "SSD",
                  "codeName": "SSD"
                },
                "isStorageEncryption": true,
                "dataStorageSize": 10737418240,
                "cpuCount": 2,
                "memorySize": 8589934592,
                "createDate": "2021-05-27T18:00:00+0900"
              }
            ]
          }
        ]
      }
    }
    

    レスポンス結果フォーマットタイプ(responseFormatType)が xmlの場合

    
    <createCloudMysqlInstanceResponse>
        <requestId>c04bfdd1-e27e-4006-9bc3-bc37840ce1dd</requestId>
        <returnCode>0</returnCode>
        <returnMessage>success</returnMessage>
        <totalRows>1</totalRows>
        <cloudMysqlInstanceList>
            <cloudMysqlInstance>
                <cloudMysqlInstanceNo>****890</cloudMysqlInstanceNo>
                <cloudMysqlServiceName>test-****</cloudMysqlServiceName>
                <cloudMysqlInstanceStatusName>creating</cloudMysqlInstanceStatusName>
                <cloudMysqlInstanceStatus>
                    <code>INIT</code>
                    <codeName>CLOUD DATABASE(VPC) Init State</codeName>
                </cloudMysqlInstanceStatus>
                <cloudMysqlInstanceOperation>
                    <code>CREAT</code>
                    <codeName>CLOUD DATABASE(VPC) Creat OP</codeName>
                </cloudMysqlInstanceOperation>
                <cloudMysqlImageProductCode>SW.VDBAS.DBAAS.LNX64.CNTOS.0708.MYSQL.8025.B050</cloudMysqlImageProductCode>
                <engineVersion>MYSQL5.7.32</engineVersion>
                <license>
                    <code>GPL</code>
                    <codeName>General Public License</codeName>
                </license>
                <cloudMysqlPort>13306</cloudMysqlPort>
                <isHa>true</isHa>
                <isMultiZone>true</isMultiZone>
                <isBackup>true</isBackup>
                <generationCode>G2</generationCode>
                <createDate>2021-05-27T18:00:00+0900</createDate>
                <accessControlGroupNoList/>
                <cloudMysqlConfigList/>
                <cloudMysqlServerInstanceList>
                    <cloudMysqlServerInstance>
                        <cloudMysqlServerName>test-****-001-e04</cloudMysqlServerName>
                        <cloudMysqlServerRole>
                            <code>M</code>
                            <codeName>Master</codeName>
                        </cloudMysqlServerRole>
                        <cloudMysqlServerInstanceStatusName>creating</cloudMysqlServerInstanceStatusName>
                        <cloudMysqlServerInstanceStatus>
                            <code>PEND</code>
                            <codeName>CLOUD DATABASE(VPC) Server Pending State</codeName>
                        </cloudMysqlServerInstanceStatus>
                        <cloudMysqlServerInstanceOperation>
                            <code>CREAT</code>
                            <codeName>CLOUD DATABASE(VPC) Server Create OP</codeName>
                        </cloudMysqlServerInstanceOperation>
                        <cloudMysqlProductCode>SVR.VDBAS.STAND.C002.M008.NET.HDD.B050.G002</cloudMysqlProductCode>
                        <regionCode>KR</regionCode>
                        <zoneCode>KR-1</zoneCode>
                        <vpcNo>****83</vpcNo>
                        <subnetNo>****91</subnetNo>
                        <isPublicSubnet>true</isPublicSubnet>
                        <privateIp>***.***.***.***</privateIp>
                        <dataStorageType>
                            <code>SSD</code>
                            <codeName>SSD</codeName>
                        </dataStorageType>
                        <isStorageEncryption>true</isStorageEncryption>
                        <dataStorageSize>10737418240</dataStorageSize>
                        <cpuCount>2</cpuCount>
                        <memorySize>8589934592</memorySize>
                        <createDate>2021-05-27T18:00:00+0900</createDate>
                    </cloudMysqlServerInstance>
                    <cloudMysqlServerInstance>
                        <cloudMysqlServerName>test-****-002-e05</cloudMysqlServerName>
                        <cloudMysqlServerRole>
                            <code>H</code>
                            <codeName>Standby Master</codeName>
                        </cloudMysqlServerRole>
                        <cloudMysqlServerInstanceStatusName>creating</cloudMysqlServerInstanceStatusName>
                        <cloudMysqlServerInstanceStatus>
                            <code>PEND</code>
                            <codeName>CLOUD DATABASE(VPC) Server Pending State</codeName>
                        </cloudMysqlServerInstanceStatus>
                        <cloudMysqlServerInstanceOperation>
                            <code>CREAT</code>
                            <codeName>CLOUD DATABASE(VPC) Server Create OP</codeName>
                        </cloudMysqlServerInstanceOperation>
                        <cloudMysqlProductCode>SVR.VDBAS.STAND.C002.M008.NET.HDD.B050.G002</cloudMysqlProductCode>
                        <regionCode>KR</regionCode>
                        <zoneCode>KR-2</zoneCode>
                        <vpcNo>****83</vpcNo>
                        <subnetNo>****93</subnetNo>
                        <isPublicSubnet>true</isPublicSubnet>
                        <privateIp>***.***.***.***</privateIp>
                        <dataStorageType>
                            <code>SSD</code>
                            <codeName>SSD</codeName>
                        </dataStorageType>
                        <isStorageEncryption>true</isStorageEncryption>
                        <dataStorageSize>10737418240</dataStorageSize>
                        <cpuCount>2</cpuCount>
                        <memorySize>8589934592</memorySize>
                        <createDate>2021-05-27T18:00:00+0900</createDate>
                    </cloudMysqlServerInstance>
                </cloudMysqlServerInstanceList>
            </cloudMysqlInstance>
        </cloudMysqlInstanceList>
    </createCloudMysqlInstanceResponse>
    

    この記事は役に立ちましたか?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.