ロール移行
    • PDF

    ロール移行

    • PDF

    Article Summary

    対象ロールの権限を持つ Secure Token Serviceを作成します。

    API

    POST /switch-role
    
    Content-Type: application/json; charset=utf-8
    x-ncp-apigw-timestamp: {Timestamp}
    x-ncp-iam-access-key: {Sub Account Access Key}
    x-ncp-apigw-signature-v2: {API Gateway Signature}
    

    API Header

    項目説明
    Content-Typeリクエスト Body Content Typeを application/jsonに指定(POST)
    x-ncp-apigw-timestamp1970年1月1日00:00:00協定世界時(UTC)からの経過時間をミリ秒(Millisecond)で表示
    API Gatewayサーバとの時間差が5分以上の場合は無効なリクエストとみなす
    x-ncp-apigw-timestamp:{Timestamp}
    x-ncp-iam-access-keyIAMコンソールで発行した SubAccount Access Keyまたは作成した STS accessKey
    x-ncp-iam-access-key:{Sub Account Access Key or STS Access Key}
    x-ncp-apigw-signature-v2Access Key ID値と Secret Keyで暗号化した署名
    x-ncp-apigw-signature-v2:{API Gateway Signature}
    参考

    NAVERクラウドプラットフォーム認証キーと Signatureの作成方法についての説明は、Ncloud APIをご参照ください。

    リクエスト

    {
        "roleNrn": "string",
        "durationSec": "integer",
        "serialNumber": "string",
        "tokenCode": "integer"
    }
    
    パラメータ必須有無タイプ制限事項説明
    roleNrnYstring移行するロールの NRN
    durationSecNinteger- accessKeyの持続時間(秒)
    default: 3600
    min: 600
    max: 43200
    serialNumberNstringOTPデバイス NRNまたはシリアル番号
    tokenCodeNintegerOTP認証番号
    参考

    「MFA serialNumber」は、ポータル > マイページ > アカウント管理 > 2段階認証管理 メニューで確認できます。

    レスポンス

    {
      "switchedRole": "string",
      "credentials": {
        "accessKey": "string",
        "keySecret": "string",
        "useMfa": "string",
        "createTime": "string",
        "expireTime": "string"
      }
    }
    
    項目タイプ説明備考
    switchedRolestring移行されたロールの NRN
    accessKeystringaccessKey
    keySecretstringsecretKey
    createTimestring作成日
    expireTimestring終了日
    useMfabooleanMFA認証の有無

    エラー

    以下のエラーコードは、このアクション(Action)で発生する特徴的なエラーです。よく発生するエラーに関する詳細説明は、NAVERクラウドプラットフォーム APIをご参照ください。

    HTTP status codeエラーコードエラーメッセージ
    400400durationSecは、以下のような範囲でのみ使用可能
    valid range: 600 - 43200 : [durationSec]

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

    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.