Skip to content

TypeScript コンフィギュレーションバージョン情報取得

このメソッドを使用して、コンフィギュレーションのバージョン情報を取得します。

リクエストパラメータ一覧

パラメータタイプ説明
requestConfigurationVersionRequest特定のインターフェースリクエストパラメータを設定してください。詳細は コンフィギュレーションバージョン情報取得 を参照してください。

戻り値一覧

戻り値タイプ説明
resultConfigurationVersionResponseインターフェース戻り値、具体的なインターフェース戻りパラメータは コンフィギュレーションバージョン情報取得 を参照してください。

ユニットテストコードの場所

サンプルコード

コンフィギュレーションのバージョン情報を取得するには、次のコードを使用できます。

typescript
const {
    default: Client,
    Config,
    ConfigurationVersionRequest,
} = require('@toolsetlink/upgradelink-api-typescript');

// コンフィギュレーションバージョン情報の取得テスト
async function testGetConfigurationVersion() {
    try {
        // クライアントを初期化
        const config = new Config({
            accessKey: 'mui2W50H1j-OC4xD6PgQag',
            accessSecret: 'PEbdHFGC0uO_Pch7XWBQTMsFRxKPQAM2565eP8LJ3gc',
        });
        const client = new Client(config);

        // リクエストパラメータを構築
        const request = new ConfigurationVersionRequest({
            configurationKey: 'your-configuration-key'
        });

        // リクエストを送信
        const response = await client.ConfigurationVersion(request);

        // レスポンス結果を出力
        console.log('\nコンフィギュレーションバージョン情報レスポンス:');
        console.log(`code: ${response.code}`);
        console.log(`msg: ${response.msg}`);
        console.log('data:');
        console.log(`  configurationKey: ${response.data.configurationKey}`);
        console.log(`  versions: ${JSON.stringify(response.data.versions)}`);
    } catch (error) {
        console.error('\nコンフィギュレーションバージョン情報の取得に失敗しました:', error);
    }
}

toolsetlink@163.com