MENU
      Create Secret

        Create Secret


        Article summary

        Overview

        Create a secret.

        POST https://secretmanager.apigw.ntruss.com/api/v1/secrets
        HTTP

        Request

        Request body

        {
          "secretName": "string",
          "memo": "string",
          "secretValue": {
            "value": "string",
            "rotationTargets": [
              "string"
            ]
          },
          "secretType": "BASIC",
          "autoRotationYN": "N",
          "autoRotationPeriod": 0,
          "triggerId": "string",
          "protectionKeyType": "DEFAULT",
          "kmsKeyTag": "string"
        }
        JSON
        Parameter nameTypeDescription
        secretNameStringSecret name
        memoStringNotes
        secretValueObjectSecret value object
        secretValue.valueStringSecret value
        secretValue.rotationTargetsString[]List of secret values to rotate
        secretTypeStringSecret type (e.g., BASIC)
        autoRotationYNStringAutomatic rotation status (e.g., N)
        autoRotationPeriodIntegerAutomatic rotation cycle
        triggerIdStringTrigger ID
        protectionKeyTypeStringProtection key type (e.g., DEFAULT, USER_MANAGED_KEY)
        kmsKeyTagStringKMS key tag

        Response

        Response body

        {
          "code": "SUCCESS",
          "data": {
            "secretId": "string",
            "secretName": "string",
            "secretStatus": "ENABLE",
            "secretType": "string",
            "memo": "string",
            "region": "string",
            "registerDate": 0,
            "autoRotationYN": "Y",
            "autoRotationPeriod": 0,
            "nextRotationDate": 0,
            "rotationPhase": "NONE",
            "trigger": {
              "id": "string",
              "name": "string",
              "url": "string",
              "recentlyExecutedAction": "string"
            },
            "protectionKey": {
              "type": "DEFAULT",
              "kmsKeyTag": "string",
              "kmsKeyName": "string"
            }
          }
        }
        JSON
        Parameter nameTypeDescription
        secretIdStringSecret ID
        secretNameStringSecret name
        secretStatusStringSecret status (ENABLE, DISABLE, REVOKE, ROTATING, DESTROYED)
        secretTypeStringSecret type (BASIC)
        memoStringNotes
        regionStringRegion
        registerDateIntegerRegistration date
        autoRotationYNStringAutomatic replacement
        autoRotationPeriodIntegerAutomatic rotation cycle
        nextRotationDateIntegerNext rotation date
        rotationPhaseStringCurrent rotation phase (NONE)
        trigger.idStringTrigger ID
        trigger.nameStringTrigger name
        trigger.urlStringTrigger URL
        trigger.recentlyExecutedActionStringRecently executed action
        protectionKey.typeStringProtection key type (DEFAULT, USER_MANAGED_KEY)
        protectionKey.kmsKeyTagStringKMS key tag
        protectionKey.kmsKeyNameStringKMS key name

        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.