CreateCustomResource
    • PDF

    CreateCustomResource

    • PDF

    Article Summary

    概要

    Custom Resourceを作成します。

    リクエスト

    API URL

    URL: https://cw.apigw.ntruss.com/cw_fea/real/cw/api/custom/resource
    Method: POST
    

    リクエストヘッダ

    共通設定に明示されたリクエストヘッダが必要です。

    Content-Type: application/json
    x-ncp-apigw-signature-v2: {generated signature}
    x-ncp-apigw-timestamp: {current timestamp}
    x-ncp-iam-access-key: {your iam access key}
    

    リクエストボディ

    構文

    private String resourceId;
    private String resourceName;
    private String resourceTypeId;
    private Map<String, Object> resourceData;
    

    フィールド

    パラメータ名要否タイプ制約事項説明
    resourceIdNoStringresourceIdを入力すると、当該 resourceIdに custom resourceを作成
    入力しないと、Cloud Insightで resourceIdを作成して返す
    resourceIdは重複できない
    重複した resourceIdで custom resourceの作成を試みるとエラーを返す
    resourceNameYesStringResource名の指定
    resourceTypeIdNoStringresourceTypeIdは resourceDataの format validateに使用する値
    resourceTypeに定義されたデータ形式で resourceDataを送信可能
    現在は入力しなくても使用できるように DEFAULTに指定
    resourceDataYesMap<String, Object>resourceTypeに適合したデータを入力可能
    一致するフィールドのみ保存

    リクエスト例

    以下の例は、resourceIdが123456のサーバをリソースとして登録する例です

    POST /cw_fea/real/cw/api/custom/resource
    Host: cw.apigw.ntruss.com
    Content-Type: application/json
    x-ncp-apigw-signature-v2: {generated signature}
    x-ncp-apigw-timestamp: {current timestamp}
    x-ncp-iam-access-key: {your iam access key}
    
    Payload:
    {
      "resourceId": "123456",
      "resourceName": "insight-test001",
      "resourceData": {
        "organizationCode": "NCC",
        "projectId": "PPP",
        "serverIp": "10.0.0.1",
        "serverType": "HighCPU"
      }
    }
    

    レスポンス例

    エラーなしに作成が完了すると、HTTP code 200と作成された Custom Resource Idがレスポンスとして返されます。

    {"resourceId" : "f201a196-df5a-4e8b-9f4c-26479a89cb41"}
    

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

    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.