CreateCustomResource
    • PDF

    CreateCustomResource

    • PDF

    Article summary

    Overview

    Create a custom resource.

    Requests

    API URL

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

    Request Headers

    The request headers specified in common settings are required.

    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}
    

    Request Bodies

    Usage

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

    Field

    Parameter nameRequirement statusTypeRestrictionsDescription
    resourceIdNoStringWhen resourceId is provided, a custom resource is created with that resourceId
    If not, Cloud Insight generates a resourceId and returns it
    resourceId cannot have duplicates
    Returns error when attempting to create a custom resource with a duplicate resourceId
    resourceNameYesStringSpecify resource name
    resourceTypeIdNoStringresourceTypeId is a value used to format validate a resourceData
    resourceData can be transferred in the data format defined in resourceType
    Currently set as DEFAULT to be used without it
    resourceDataYesMap<String, Object>Available to input data suitable for resourceType
    Save only matched fields

    Examples

    Request examples

    The example below registers a server with resourceId 123456 as a resource.

    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"
      }
    }
    

    Response examples

    If created successfully, HTTP code 200 and the generated Custom Resource Id are returned as a result.

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

    Was this article helpful?

    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.