{
  "openapi" : "3.1.0",
  "info" : {
    "title" : "KMS Service",
    "description" : "Key Management Service (KMS) is a managed service that makes it easy for you to create and control the cryptographic keys that are used to protect your data.",
    "version" : "1.0"
  },
  "servers" : [ {
    "url" : "http://kms-service/"
  } ],
  "tags" : [ {
    "name" : "crypto",
    "description" : "Encryption apis.\n  - encrypt, decrypt, and re-encrypt data with symmetric or asymmetric keys.\n  - generate random numbers suitable for cryptographic applications.\n  - support third-party KMS services:\n    + [AWS KMS service](https://aws.amazon.com/kms)"
  }, {
    "name" : "key-management",
    "description" : "Management the keys in kms service.\n - create, edit, and view keys.\n - enable and disable keys.\n - delete keys."
  }, {
    "name" : "alias",
    "description" : "Management aliases associated with keys, secrets and third-party KMS services.\n  - for keys, an alias is a friendly name. For example, an alias lets you refer to a key as *`test-key`* instead of **1234abcd-12ab-34cd-56ef-1234567890ab**.\n  - for secrets, an alias is a static name when it was rotated.\n  - for third-party KMS services, an alias is the connection information associated with\n    + [AWS KMS service](https://aws.amazon.com/kms)\n    + ~~[aliyun KMS service](https://www.alibabacloud.com/product/kms)~~coming soon"
  } ],
  "paths" : {
    "/kms/v2/alias/add-one" : {
      "post" : {
        "tags" : [ "alias" ],
        "summary" : "CreateAlias",
        "description" : "Creates a friendly name for a destination resource. Each alias is associated with only one resource at a time, but a resource can have multiple aliases. A valid resource is required. You can't create an alias without resource.\nThe alias name must be unique in the tenant.\nSupports below destination types:\n- **`key`** associated with a kms key, destination resource is the key id or key irn like *`1234abcd-12ab-34cd-56ef-1234567890ab`* or *`res:mytenant:key/1234abcd-12ab-34cd-56ef-1234567890ab`*\n- **`secret`** associated with a kms secret, destination resource is the secret name like *`secret-example-name`* or *`res:mytenant:secret/secret-example-name`*\n- **`aws-kms`** associated with an aws kms key, destination resource can be aws arn, key or alias like *`1234abcd-12ab-34cd-56ef-1234567890ab`* or *`alias/ExampleAlias`*",
        "operationId" : "CreateAlias",
        "requestBody" : {
          "description" : "create alias request",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/CreateAliasRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "the created alias",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DataResponseModel-Alias"
                }
              }
            }
          },
          "499" : {
            "description" : "client error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          },
          "599" : {
            "description" : "server error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          }
        },
        "x-mo-gateway-authorization-url" : "platform_urp_v2",
        "x-codegen-request-body-name" : "request"
      }
    },
    "/kms/v2/alias/delete-one" : {
      "post" : {
        "tags" : [ "alias" ],
        "summary" : "DeleteAlias",
        "description" : "Deletes the specified alias.\nThis api does not return a response. To confirm the alias that you deleted, use the List Aliases api.",
        "operationId" : "DeleteAlias",
        "requestBody" : {
          "description" : "delete alias request",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/DeleteAliasRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "the deleted alias",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DataResponseModel-Alias"
                }
              }
            }
          },
          "499" : {
            "description" : "client error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          },
          "599" : {
            "description" : "server error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          }
        },
        "x-mo-gateway-authorization-url" : "platform_urp_v2",
        "x-codegen-request-body-name" : "request"
      }
    },
    "/kms/v2/alias/dest-types" : {
      "get" : {
        "tags" : [ "alias" ],
        "summary" : "GetDestTypes",
        "description" : "Returns the list of supported cloud KMS destination types and their configuration field definitions. The frontend uses this to render the alias creation form dynamically.",
        "operationId" : "GetDestTypes",
        "responses" : {
          "200" : {
            "description" : "the supported destination types",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/KmsWebType"
                  }
                }
              }
            }
          },
          "499" : {
            "description" : "client error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          },
          "599" : {
            "description" : "server error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          }
        },
        "x-mo-gateway-authorization-url" : "platform_urp_v2"
      }
    },
    "/kms/v2/alias/query-many" : {
      "get" : {
        "tags" : [ "alias" ],
        "summary" : "PagedQueryAliases",
        "description" : "Gets a list of aliases in the caller's tenant, and does not return aliases in other tenants.\nBy default, returns all aliases in the tenant. To get only the aliases associated with a particular destination resource like a key or a secret, use the dest_type and dest_resource parameter.",
        "operationId" : "PagedQueryAliases",
        "parameters" : [ {
          "name" : "alias_name_filter",
          "in" : "query",
          "required" : false,
          "style" : "form",
          "explode" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "current_page",
          "in" : "query",
          "required" : false,
          "style" : "form",
          "explode" : true,
          "schema" : {
            "type" : "integer",
            "default" : 1
          }
        }, {
          "name" : "dest_resource",
          "in" : "query",
          "required" : false,
          "style" : "form",
          "explode" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "dest_type",
          "in" : "query",
          "required" : false,
          "style" : "form",
          "explode" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "page_size",
          "in" : "query",
          "required" : false,
          "style" : "form",
          "explode" : true,
          "schema" : {
            "type" : "integer",
            "default" : 10,
            "maximum" : 200
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "paged list aliases result",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PagedResponseModel-Alias"
                }
              }
            }
          },
          "499" : {
            "description" : "client error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          },
          "599" : {
            "description" : "server error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          }
        },
        "x-mo-gateway-authorization-url" : "platform_urp_v2"
      }
    },
    "/kms/v2/alias/query-one" : {
      "get" : {
        "tags" : [ "alias" ],
        "summary" : "GetAlias",
        "description" : "Gets an alias in the caller's tenant.",
        "operationId" : "GetAlias",
        "parameters" : [ {
          "name" : "alias_name",
          "in" : "query",
          "description" : "the alias name",
          "required" : true,
          "style" : "form",
          "explode" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "the alias result",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DataResponseModel-Alias"
                }
              }
            }
          },
          "499" : {
            "description" : "client error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          },
          "599" : {
            "description" : "server error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          }
        },
        "x-mo-gateway-authorization-url" : "platform_urp_v2"
      }
    },
    "/kms/v2/alias/update-one" : {
      "post" : {
        "tags" : [ "alias" ],
        "summary" : "UpdateAlias",
        "description" : "Associates an existing alias with a different destination resource or extend options.\nThe current and new resource must be the same type.\nYou cannot use Update Alias to change an alias name.\nTo change an alias name or resource, use Delete Alias to delete the old alias and Create Alias to create a new alias.",
        "operationId" : "UpdateAlias",
        "requestBody" : {
          "description" : "create update request",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/UpdateAliasRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "the updated alias",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DataResponseModel-Alias"
                }
              }
            }
          },
          "499" : {
            "description" : "client error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          },
          "599" : {
            "description" : "server error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          }
        },
        "x-mo-gateway-authorization-url" : "platform_urp_v2",
        "x-codegen-request-body-name" : "request"
      }
    },
    "/kms/v2/key/exec/decrypt" : {
      "post" : {
        "tags" : [ "crypto" ],
        "summary" : "DecryptData",
        "description" : "Decrypts cipher data that was encrypted by a key using encrypt or generate-data-key.\nThe parameter CipherText in request body and PlainText in response body are both base64-encoded string. Otherwise, it fails.\nIf the cipher data was encrypted under a symmetric encryption key of your tenant, the KeyId parameter is optional. Kms service can get this information from metadata that it adds to the symmetric cipher data.",
        "operationId" : "DecryptData",
        "requestBody" : {
          "description" : "decrypt data request",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/DecryptRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "the decryption result",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DataResponseModel-DecryptResponse"
                }
              }
            }
          },
          "499" : {
            "description" : "client error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          },
          "599" : {
            "description" : "server error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          }
        },
        "x-mo-gateway-authorization-url" : "platform_urp_v2",
        "x-codegen-request-body-name" : "request"
      }
    },
    "/kms/v2/key/exec/describe" : {
      "post" : {
        "tags" : [ "crypto" ],
        "summary" : "DescribeKey",
        "description" : "Describe key",
        "operationId" : "DescribeKey",
        "requestBody" : {
          "description" : "describe key request",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/DescribeRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "the describe result",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DataResponseModel-DescribeResponse"
                }
              }
            }
          },
          "499" : {
            "description" : "client error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          },
          "599" : {
            "description" : "server error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          }
        },
        "x-mo-gateway-authorization-url" : "platform_urp_v2",
        "x-codegen-request-body-name" : "request"
      }
    },
    "/kms/v2/key/exec/encrypt" : {
      "post" : {
        "tags" : [ "crypto" ],
        "summary" : "EncryptData",
        "description" : "Encrypts plain data of up to 2048 bytes using a key or an alias, include the alias associated with aws KMS key.\nYou can use this operation to encrypt small amounts of arbitrary data, such as a personal identifier or database password, or other sensitive information.\nThe parameter PlainText in request body and CipherText in response body are both base64-encoded string. Otherwise, it fails.\nYou don't need to use the Encrypt operation to encrypt a data key. The Generate Data Key api return a plain data key and an encrypted copy of that data key.\nYou can use an encryption context to add additional security to your encryption operation. If you specify a Context string when encrypting data, you must specify the same encryption context (a case-sensitive exact match) when decrypting the data. Otherwise, the request to decrypt fails.",
        "operationId" : "EncryptData",
        "requestBody" : {
          "description" : "encrypt data request",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/EncryptRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "the encryption result",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DataResponseModel-EncryptResponse"
                }
              }
            }
          },
          "499" : {
            "description" : "client error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          },
          "599" : {
            "description" : "server error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          }
        },
        "x-mo-gateway-authorization-url" : "platform_urp_v2",
        "x-codegen-request-body-name" : "request"
      }
    },
    "/kms/v2/key/exec/generate-data-key" : {
      "post" : {
        "tags" : [ "crypto" ],
        "summary" : "GenerateDataKey",
        "description" : "Returns a unique symmetric data key for use outside the kms service.\nThis operation returns a plain copy of the data key and a copy that is encrypted under a symmetric encryption key that you specify.\nThe bytes in the plaintext key are random; they are not related to the caller or the key. You can use the plain key to encrypt your data outside kms service and store the encrypted data key with the encrypted data.\nYou must also specify the length of the data key. To generate an AES_256 data key, specify a Length value of 32 (256 / 8).",
        "operationId" : "GenerateDataKey",
        "requestBody" : {
          "description" : "generate data key request",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/GenerateDataKeyRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "the generate data key result",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DataResponseModel-GenerateDataKeyResponse"
                }
              }
            }
          },
          "499" : {
            "description" : "client error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          },
          "599" : {
            "description" : "server error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          }
        },
        "x-mo-gateway-authorization-url" : "platform_urp_v2",
        "x-codegen-request-body-name" : "request"
      }
    },
    "/kms/v2/key/exec/generate-data-key-pair" : {
      "post" : {
        "tags" : [ "crypto" ],
        "summary" : "GenerateDataKeyPair",
        "description" : "Returns a unique asymmetric data key pair for use outside the kms service.\nThis operation returns a plaintext public key, a plaintext private key, and a copy of the private key that is encrypted under a symmetric encryption key that you specify.\nthey are not related to the caller or the key. You can use the data key pair to perform asymmetric cryptography and implement digital signatures outside kms service and store the encrypted data key with the encrypted data.\nThe bytes in the keys are random; they are not related to the caller or to the KMS key that is used to encrypt the private key.",
        "operationId" : "GenerateDataKeyPair",
        "requestBody" : {
          "description" : "generate data key pair request",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/GenerateDataKeyPairRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "the generate data key pair result",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DataResponseModel-GenerateDataKeyPairResponse"
                }
              }
            }
          },
          "499" : {
            "description" : "client error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          },
          "599" : {
            "description" : "server error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          }
        },
        "x-mo-gateway-authorization-url" : "platform_urp_v2",
        "x-codegen-request-body-name" : "request"
      }
    },
    "/kms/v2/key/exec/generate-mac" : {
      "post" : {
        "tags" : [ "crypto" ],
        "summary" : "GenerateMAC",
        "description" : "Generates a hash-based message authentication code (HMAC) for a message using an HMAC KMS key and a MAC algorithm that the key supports.\nYou can use value that GenerateMac returns in the VerifyMac API to demonstrate that the original message has not changed.\nAlso, because a secret key is used to create the hash, you can verify that the party that generated the hash has the required secret key. You can also use the raw result to implement HMAC-based algorithms such as key derivation functions.",
        "operationId" : "GenerateMAC",
        "requestBody" : {
          "description" : "generate mac request",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/GenerateMacRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "the generate mac result",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DataResponseModel-GenerateMacResponse"
                }
              }
            }
          },
          "499" : {
            "description" : "client error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          },
          "599" : {
            "description" : "server error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          }
        },
        "x-mo-gateway-authorization-url" : "platform_urp_v2",
        "x-codegen-request-body-name" : "request"
      }
    },
    "/kms/v2/key/exec/get-public-key" : {
      "post" : {
        "tags" : [ "crypto" ],
        "summary" : "GetPublicKey",
        "description" : "Returns the public key of an asymmetric KMS key.\nUnlike the private key of a asymmetric KMS key, which never leaves InsureMO KMS unencrypted. You can share the public key to allow others to encrypt messages and verify signatures outside InsureMO KMS.",
        "operationId" : "GetPublicKey",
        "requestBody" : {
          "description" : "get public key request",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/GetPublicKeyRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "the public key result",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DataResponseModel-GetPublicKeyResponse"
                }
              }
            }
          },
          "499" : {
            "description" : "client error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          },
          "599" : {
            "description" : "server error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          }
        },
        "x-mo-gateway-authorization-url" : "platform_urp_v2",
        "x-codegen-request-body-name" : "request"
      }
    },
    "/kms/v2/key/exec/re-encrypt" : {
      "post" : {
        "tags" : [ "crypto" ],
        "summary" : "ReEncryptData",
        "description" : "Decrypts cipher data and then re-encrypts it entirely within kms service.\nYou can use this operation to change the key under which data is encrypted. You can also use it to re-encrypt ciphertext under the same key, such as to change the encryption context of a ciphertext.",
        "operationId" : "ReEncryptData",
        "requestBody" : {
          "description" : "re-encrypt data request",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/ReEncryptRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "the re-encrypted result",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DataResponseModel-ReEncryptResponse"
                }
              }
            }
          },
          "499" : {
            "description" : "client error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          },
          "599" : {
            "description" : "server error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          }
        },
        "x-mo-gateway-authorization-url" : "platform_urp_v2",
        "x-codegen-request-body-name" : "request"
      }
    },
    "/kms/v2/key/exec/sign" : {
      "post" : {
        "tags" : [ "crypto" ],
        "summary" : "Sign",
        "description" : "Creates a digital signature for a message or message digest by using the private key in an asymmetric signing KMS key.\nTo verify the signature, use the Verify operation, or use the public key in the same asymmetric KMS key outside InsureMO KMS.\nDigital signatures are generated and verified by using asymmetric key pair, such as an RSA or SM2 pair that is represented by an asymmetric KMS key. The key owner (or an authorized user) uses their private key to sign a message. Anyone with the public key can verify that the message was signed with that particular private key and that the message hasn't changed since it was signed.",
        "operationId" : "Sign",
        "requestBody" : {
          "description" : "sign request",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/SignRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "the signed result",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DataResponseModel-SignResponse"
                }
              }
            }
          },
          "499" : {
            "description" : "client error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          },
          "599" : {
            "description" : "server error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          }
        },
        "x-mo-gateway-authorization-url" : "platform_urp_v2",
        "x-codegen-request-body-name" : "request"
      }
    },
    "/kms/v2/key/exec/verify" : {
      "post" : {
        "tags" : [ "crypto" ],
        "summary" : "Verify",
        "description" : "Verifies a digital signature that was generated by the Sign operation.\nVerification confirms that an authorized user signed the message with the specified KMS key and signing algorithm, and the message hasn't changed since it was signed. If the signature is verified, the value of the SignatureValid field in the response is true.",
        "operationId" : "Verify",
        "requestBody" : {
          "description" : "verify request",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/VerifyRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "the verified result",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DataResponseModel-VerifyResponse"
                }
              }
            }
          },
          "499" : {
            "description" : "client error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          },
          "599" : {
            "description" : "server error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          }
        },
        "x-mo-gateway-authorization-url" : "platform_urp_v2",
        "x-codegen-request-body-name" : "request"
      }
    },
    "/kms/v2/key/exec/verify-mac" : {
      "post" : {
        "tags" : [ "crypto" ],
        "summary" : "VerifyMAC",
        "description" : "Verifies the hash-based message authentication code (HMAC) for a specified message, HMAC KMS key, and MAC algorithm.",
        "operationId" : "VerifyMAC",
        "requestBody" : {
          "description" : "verify mac request",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/VerifyMacRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "the verify mac result",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DataResponseModel-VerifyMacResponse"
                }
              }
            }
          },
          "499" : {
            "description" : "client error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          },
          "599" : {
            "description" : "server error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          }
        },
        "x-mo-gateway-authorization-url" : "platform_urp_v2",
        "x-codegen-request-body-name" : "request"
      }
    },
    "/kms/v2/key/mgmt/add-one" : {
      "post" : {
        "tags" : [ "key-management" ],
        "summary" : "CreateKey",
        "description" : "Creates a unique KMS key in your tenant. You can use the KMS key in cryptographic operations, such as encryption, decryption and data key generation.\nYou can create an alias when create the key. To create an alias for existing key or aws KMS key, use the Create Alias api.",
        "operationId" : "CreateKey",
        "requestBody" : {
          "description" : "create key request",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/CreateKeyRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "created key result",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DataResponseModel-Key"
                }
              }
            }
          },
          "499" : {
            "description" : "client error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          },
          "599" : {
            "description" : "server error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          }
        },
        "x-mo-gateway-authorization-url" : "platform_urp_v2",
        "x-codegen-request-body-name" : "request"
      }
    },
    "/kms/v2/key/mgmt/delete-one" : {
      "post" : {
        "tags" : [ "key-management" ],
        "summary" : "DeleteKey",
        "description" : "Deletes the key.\nAll aliases associated with the key will be deleted.",
        "operationId" : "DeleteKey",
        "requestBody" : {
          "description" : "delete key request",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/DeleteKeyRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "the deleted key",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DataResponseModel-Key"
                }
              }
            }
          },
          "499" : {
            "description" : "client error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          },
          "599" : {
            "description" : "server error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          }
        },
        "x-mo-gateway-authorization-url" : "platform_urp_v2",
        "x-codegen-request-body-name" : "request"
      }
    },
    "/kms/v2/key/mgmt/query-many" : {
      "get" : {
        "tags" : [ "key-management" ],
        "summary" : "PagedQueryKeys",
        "description" : "Gets a list of keys in the caller's tenant, and does not return keys in other tenants.",
        "operationId" : "PagedQueryKeys",
        "parameters" : [ {
          "name" : "current_page",
          "in" : "query",
          "required" : false,
          "style" : "form",
          "explode" : true,
          "schema" : {
            "type" : "integer",
            "default" : 1
          }
        }, {
          "name" : "default_algorithm",
          "in" : "query",
          "required" : false,
          "style" : "form",
          "explode" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "key_spec",
          "in" : "query",
          "description" : "Type Describes the type of key material in the key.\n- *`AES_256`*: default value, a symmetric encryption key.\n- ~~RSA_xxxx~~: coming soon",
          "required" : false,
          "style" : "form",
          "explode" : true,
          "schema" : {
            "type" : "string",
            "default" : "AES_256"
          }
        }, {
          "name" : "key_usage",
          "in" : "query",
          "description" : "Usage The cryptographic operations for which you can use the key.",
          "required" : false,
          "style" : "form",
          "explode" : true,
          "schema" : {
            "type" : "string",
            "default" : "ENCRYPT_DECRYPT"
          }
        }, {
          "name" : "page_size",
          "in" : "query",
          "required" : false,
          "style" : "form",
          "explode" : true,
          "schema" : {
            "type" : "integer",
            "default" : 10,
            "maximum" : 200
          }
        }, {
          "name" : "status",
          "in" : "query",
          "required" : false,
          "style" : "form",
          "explode" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "paged list keys result",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PagedResponseModel-Key"
                }
              }
            }
          },
          "499" : {
            "description" : "client error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          },
          "599" : {
            "description" : "server error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          }
        },
        "x-mo-gateway-authorization-url" : "platform_urp_v2"
      }
    },
    "/kms/v2/key/mgmt/query-one" : {
      "get" : {
        "tags" : [ "key-management" ],
        "summary" : "GetKey",
        "description" : "Provides detailed information about a KMS key.",
        "operationId" : "GetKey",
        "parameters" : [ {
          "name" : "key_id",
          "in" : "query",
          "description" : "the key id",
          "required" : true,
          "style" : "form",
          "explode" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "the key result",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DataResponseModel-Key"
                }
              }
            }
          },
          "499" : {
            "description" : "client error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          },
          "599" : {
            "description" : "server error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          }
        },
        "x-mo-gateway-authorization-url" : "platform_urp_v2"
      }
    },
    "/kms/v2/key/mgmt/update-one" : {
      "post" : {
        "tags" : [ "key-management" ],
        "summary" : "UpdateKey",
        "description" : "Updates key description",
        "operationId" : "UpdateKey",
        "requestBody" : {
          "description" : "update key request",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/UpdateKeyRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "the updated key",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DataResponseModel-Key"
                }
              }
            }
          },
          "499" : {
            "description" : "client error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          },
          "599" : {
            "description" : "server error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          }
        },
        "x-mo-gateway-authorization-url" : "platform_urp_v2",
        "x-codegen-request-body-name" : "request"
      }
    },
    "/kms/v2/key/mgmt/update-one/disable" : {
      "post" : {
        "tags" : [ "key-management" ],
        "summary" : "DisableKey",
        "description" : "Sets the state of a KMS key to *`disabled`*. This change temporarily prevents use of the key for cryptographic operations.",
        "operationId" : "DisableKey",
        "requestBody" : {
          "description" : "disable key request",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/DisableKeyRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "the updated key",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DataResponseModel-Key"
                }
              }
            }
          },
          "499" : {
            "description" : "client error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          },
          "599" : {
            "description" : "server error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          }
        },
        "x-mo-gateway-authorization-url" : "platform_urp_v2",
        "x-codegen-request-body-name" : "request"
      }
    },
    "/kms/v2/key/mgmt/update-one/enable" : {
      "post" : {
        "tags" : [ "key-management" ],
        "summary" : "EnableKey",
        "description" : "Sets the key state of a KMS key to *`enabled`*. This allows you to use the key for cryptographic operations.",
        "operationId" : "EnableKey",
        "requestBody" : {
          "description" : "enable key request",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/EnableKeyRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "the updated key",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DataResponseModel-Key"
                }
              }
            }
          },
          "499" : {
            "description" : "client error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          },
          "599" : {
            "description" : "server error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          }
        },
        "x-mo-gateway-authorization-url" : "platform_urp_v2",
        "x-codegen-request-body-name" : "request"
      }
    }
  },
  "components" : {
    "schemas" : {
      "Alias" : {
        "type" : "object",
        "properties" : {
          "alias_irn" : {
            "type" : "string",
            "description" : "IRN The alias IRN(InsureMO Resource Name)\n- formatted as res:{tenant-code}:alias/{alias-name}",
            "example" : "res:mytenant:alias/alias-example-name"
          },
          "alias_name" : {
            "type" : "string",
            "description" : "Name The alias name, unique in the tenant.",
            "example" : "alias-example-name"
          },
          "aws_kms_options" : {
            "allOf" : [ {
              "$ref" : "#/components/schemas/AwsKmsOptions"
            } ],
            "description" : "AwsKmsOptions required if destination type is aws-kms"
          },
          "create_time" : {
            "type" : "string",
            "format" : "date-time",
            "description" : "CreateTime The date and time that alias was most recently created\n- formatted as [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) with UTC timezone",
            "example" : "2023-01-01T23:01:01Z"
          },
          "creator" : {
            "type" : "string",
            "description" : "Creator The creator that alias was most recently created by\n- formatted as {tenant-code}/{user-name}",
            "example" : "mytenant/myname"
          },
          "dest_resource" : {
            "type" : "string",
            "description" : "DestResource The dest resource\n- the key id if destination type is **`key`**, such as *`1234abcd-12ab-34cd-56ef-1234567890ab`*\n- the secret name if destination type is **`secret`**, such as *`secret-example-name`*\n- the aws arn, key or alias if destination type is **`aws-kms`**, such as *`1234abcd-12ab-34cd-56ef-1234567890ab`* or *`alias/ExampleAlias`*",
            "example" : "1234abcd-12ab-34cd-56ef-1234567890ab"
          },
          "dest_type" : {
            "type" : "string",
            "description" : "DestType The destination type\n- enums: *`key`*, *`secret`* and *`aws-kms`*",
            "example" : "key"
          },
          "modifier" : {
            "type" : "string",
            "description" : "Modifier The creator that alias was most recently modified by\n- formatted as {tenant-code}/{user-name}",
            "example" : "mytenant/myname"
          },
          "modify_time" : {
            "type" : "string",
            "format" : "date-time",
            "description" : "ModifyTime The date and time that alias was most recently modified\n- formatted as [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) with UTC timezone",
            "example" : "2023-01-01T23:01:01Z"
          },
          "tenant" : {
            "type" : "string",
            "description" : "Tenant The owner tenant of the alias.",
            "example" : "mytenant"
          }
        }
      },
      "AwsKmsOptions" : {
        "type" : "object",
        "properties" : {
          "access_key" : {
            "type" : "string",
            "description" : "AccessKey The access key of the kms key id"
          },
          "check_action" : {
            "type" : "string",
            "description" : "CheckAction Check connection with aws kms when creating or updating the alias\n- enum: *`describe`*, *`encrypt`*"
          },
          "decrypt_without_key_id" : {
            "type" : "string",
            "description" : "DecryptWithoutKeyId Decrypt cipher data without key id parameter, refer to [API_Decrypt.html#KMS-Decrypt-request-KeyId](https://docs.aws.amazon.com/kms/latest/APIReference/API_Decrypt.html#KMS-Decrypt-request-KeyId)"
          },
          "endpoint" : {
            "type" : "string",
            "description" : "Endpoint The endpoint if it is provided"
          },
          "key_algorithm" : {
            "type" : "string",
            "description" : "KeyAlgorithm AWS KMS algorithms\n- required for asymmetric AWS KMS keys\n- for usage *`ENCRYPT_DECRYPT`* the keyAlgorithm is a reference to [Encryption Algorithm](https://docs.aws.amazon.com/kms/latest/APIReference/API_Encrypt.html#API_Encrypt_RequestSyntax),\n\t+ enums: *`RSAES_OAEP_SHA_1`*, *`RSAES_OAEP_SHA_256`*, *`SM2PKE`*\n- for usage *`SIGN_VERIFY`* the keyAlgorithm is a reference to [Signing Algorithm](https://docs.aws.amazon.com/kms/latest/APIReference/API_Sign.html#KMS-Sign-request-SigningAlgorithm),\n\t+ enums: *`RSASSA_PSS_SHA_256`*, *`RSASSA_PSS_SHA_384`*, *`RSASSA_PSS_SHA_512`*, *`RSASSA_PKCS1_V1_5_SHA_256`*, *`RSASSA_PKCS1_V1_5_SHA_384`*, *`RSASSA_PKCS1_V1_5_SHA_512`*, *`ECDSA_SHA_256`*, *`ECDSA_SHA_384`*, *`ECDSA_SHA_512`*, *`SM2DSA`*"
          },
          "output_aws_key_id" : {
            "type" : "string",
            "description" : "OutputAWSKeyId Output aws key id when calling cryptographic apis, instead of parameter key id in the request"
          },
          "output_aws_result" : {
            "type" : "string",
            "description" : "OutputAWSResult Output result of aws response calling cryptographic apis"
          },
          "profile" : {
            "type" : "string",
            "description" : "Profile Specify the profile."
          },
          "region" : {
            "type" : "string",
            "description" : "Region The region of the kms key id"
          },
          "role_name" : {
            "type" : "string",
            "description" : "RoleName The aws role name of the kms key id."
          },
          "role_profile" : {
            "type" : "string",
            "description" : "RoleProfile The profile for role."
          },
          "role_region" : {
            "type" : "string",
            "description" : "RoleRegion The aws role region of the kms key id."
          },
          "secret_key" : {
            "type" : "string",
            "description" : "SecretKey The access secret key of the kms key id"
          },
          "secret_key_checksum" : {
            "type" : "string",
            "description" : "SecretKeyChecksum The checksum for access secret key of the kms key id"
          }
        }
      },
      "CodeWithParams" : {
        "type" : "object",
        "properties" : {
          "code" : {
            "type" : "string"
          },
          "message" : {
            "type" : "string"
          },
          "message_params" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          }
        }
      },
      "CreateAliasRequest" : {
        "type" : "object",
        "properties" : {
          "alias_name" : {
            "type" : "string",
            "description" : "Name The alias name, unique in the tenant\n- required\n- minimum length of 1. Maximum length of 256.\n- can contain only alphanumeric characters(0-9,a-z,A-Z), underscores (_), and dashes (-)\n- can not start with mo-/_",
            "example" : "alias-example-name",
            "maxLength" : 256,
            "minLength" : 1
          },
          "aws_kms_options" : {
            "allOf" : [ {
              "$ref" : "#/components/schemas/AwsKmsOptions"
            } ],
            "description" : "AwsKmsOptions required if destination type is aws-kms"
          },
          "dest_resource" : {
            "type" : "string",
            "description" : "DestResource The dest resource\n- required\n- the key id or key irn if destination type is **`key`**, such as *`1234abcd-12ab-34cd-56ef-1234567890ab`* or *`res:mytenant:key/1234abcd-12ab-34cd-56ef-1234567890ab`*\n- the aws arn, key or alias if destination type is **`aws-kms`**, such as *`1234abcd-12ab-34cd-56ef-1234567890ab`* or *`alias/ExampleAlias`*",
            "example" : "1234abcd-12ab-34cd-56ef-1234567890ab"
          },
          "dest_type" : {
            "type" : "string",
            "description" : "DestType The destination type\n- required\n- enums: *`key`*, *`aws-kms` and *`aliyun-kms`**",
            "example" : "key"
          }
        },
        "required" : [ "alias_name", "dest_resource" ]
      },
      "CreateKeyRequest" : {
        "type" : "object",
        "properties" : {
          "alias_name" : {
            "type" : "string",
            "description" : "Alias The alias name, unique in the tenant\n- minimum length of 1. Maximum length of 256.\n- can contain only alphanumeric characters(0-9,a-z,A-Z), underscores (_), and dashes (-)\n- can not start with mo-/_",
            "example" : "alias-example-name",
            "maxLength" : 256,
            "minLength" : 1
          },
          "default_algorithm" : {
            "type" : "string",
            "description" : "DefaultAlgorithm Default Algorithm, AES_256_GCM",
            "example" : "AES_256_GCM"
          },
          "description" : {
            "type" : "string",
            "description" : "Description The description of the key."
          },
          "key_spec" : {
            "type" : "string",
            "default" : "AES_256",
            "description" : "Spec Specifies the type of key to create. You can't change the keySpec after the key is created.\n- *`AES_256`*: default value, a symmetric encryption key.\n- ~~RSA_xxxx~~: coming soon",
            "example" : "AES_256"
          },
          "key_usage" : {
            "type" : "string",
            "default" : "ENCRYPT_DECRYPT",
            "description" : "Usage Determines the cryptographic operations for which you can use the key. The default value is ENCRYPT_DECRYPT. You can't change the KeyUsage value after the key is created.",
            "example" : "ENCRYPT_DECRYPT"
          }
        }
      },
      "DataResponseModel-Alias" : {
        "type" : "object",
        "properties" : {
          "code" : {
            "type" : "string"
          },
          "data" : {
            "$ref" : "#/components/schemas/Alias"
          },
          "date" : {
            "type" : "string"
          },
          "env_name" : {
            "type" : "string"
          },
          "message" : {
            "type" : "string"
          },
          "message_params" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "trace_id" : {
            "type" : "string"
          }
        }
      },
      "DataResponseModel-DecryptResponse" : {
        "type" : "object",
        "properties" : {
          "code" : {
            "type" : "string"
          },
          "data" : {
            "$ref" : "#/components/schemas/DecryptResponse"
          },
          "date" : {
            "type" : "string"
          },
          "env_name" : {
            "type" : "string"
          },
          "message" : {
            "type" : "string"
          },
          "message_params" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "trace_id" : {
            "type" : "string"
          }
        }
      },
      "DataResponseModel-DescribeResponse" : {
        "type" : "object",
        "properties" : {
          "code" : {
            "type" : "string"
          },
          "data" : {
            "$ref" : "#/components/schemas/DescribeResponse"
          },
          "date" : {
            "type" : "string"
          },
          "env_name" : {
            "type" : "string"
          },
          "message" : {
            "type" : "string"
          },
          "message_params" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "trace_id" : {
            "type" : "string"
          }
        }
      },
      "DataResponseModel-EncryptResponse" : {
        "type" : "object",
        "properties" : {
          "code" : {
            "type" : "string"
          },
          "data" : {
            "$ref" : "#/components/schemas/EncryptResponse"
          },
          "date" : {
            "type" : "string"
          },
          "env_name" : {
            "type" : "string"
          },
          "message" : {
            "type" : "string"
          },
          "message_params" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "trace_id" : {
            "type" : "string"
          }
        }
      },
      "DataResponseModel-GenerateDataKeyPairResponse" : {
        "type" : "object",
        "properties" : {
          "code" : {
            "type" : "string"
          },
          "data" : {
            "$ref" : "#/components/schemas/GenerateDataKeyPairResponse"
          },
          "date" : {
            "type" : "string"
          },
          "env_name" : {
            "type" : "string"
          },
          "message" : {
            "type" : "string"
          },
          "message_params" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "trace_id" : {
            "type" : "string"
          }
        }
      },
      "DataResponseModel-GenerateDataKeyResponse" : {
        "type" : "object",
        "properties" : {
          "code" : {
            "type" : "string"
          },
          "data" : {
            "$ref" : "#/components/schemas/GenerateDataKeyResponse"
          },
          "date" : {
            "type" : "string"
          },
          "env_name" : {
            "type" : "string"
          },
          "message" : {
            "type" : "string"
          },
          "message_params" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "trace_id" : {
            "type" : "string"
          }
        }
      },
      "DataResponseModel-GenerateMacResponse" : {
        "type" : "object",
        "properties" : {
          "code" : {
            "type" : "string"
          },
          "data" : {
            "$ref" : "#/components/schemas/GenerateMacResponse"
          },
          "date" : {
            "type" : "string"
          },
          "env_name" : {
            "type" : "string"
          },
          "message" : {
            "type" : "string"
          },
          "message_params" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "trace_id" : {
            "type" : "string"
          }
        }
      },
      "DataResponseModel-GetPublicKeyResponse" : {
        "type" : "object",
        "properties" : {
          "code" : {
            "type" : "string"
          },
          "data" : {
            "$ref" : "#/components/schemas/GetPublicKeyResponse"
          },
          "date" : {
            "type" : "string"
          },
          "env_name" : {
            "type" : "string"
          },
          "message" : {
            "type" : "string"
          },
          "message_params" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "trace_id" : {
            "type" : "string"
          }
        }
      },
      "DataResponseModel-Key" : {
        "type" : "object",
        "properties" : {
          "code" : {
            "type" : "string"
          },
          "data" : {
            "$ref" : "#/components/schemas/Key"
          },
          "date" : {
            "type" : "string"
          },
          "env_name" : {
            "type" : "string"
          },
          "message" : {
            "type" : "string"
          },
          "message_params" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "trace_id" : {
            "type" : "string"
          }
        }
      },
      "DataResponseModel-ReEncryptResponse" : {
        "type" : "object",
        "properties" : {
          "code" : {
            "type" : "string"
          },
          "data" : {
            "$ref" : "#/components/schemas/ReEncryptResponse"
          },
          "date" : {
            "type" : "string"
          },
          "env_name" : {
            "type" : "string"
          },
          "message" : {
            "type" : "string"
          },
          "message_params" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "trace_id" : {
            "type" : "string"
          }
        }
      },
      "DataResponseModel-SignResponse" : {
        "type" : "object",
        "properties" : {
          "code" : {
            "type" : "string"
          },
          "data" : {
            "$ref" : "#/components/schemas/SignResponse"
          },
          "date" : {
            "type" : "string"
          },
          "env_name" : {
            "type" : "string"
          },
          "message" : {
            "type" : "string"
          },
          "message_params" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "trace_id" : {
            "type" : "string"
          }
        }
      },
      "DataResponseModel-VerifyMacResponse" : {
        "type" : "object",
        "properties" : {
          "code" : {
            "type" : "string"
          },
          "data" : {
            "$ref" : "#/components/schemas/VerifyMacResponse"
          },
          "date" : {
            "type" : "string"
          },
          "env_name" : {
            "type" : "string"
          },
          "message" : {
            "type" : "string"
          },
          "message_params" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "trace_id" : {
            "type" : "string"
          }
        }
      },
      "DataResponseModel-VerifyResponse" : {
        "type" : "object",
        "properties" : {
          "code" : {
            "type" : "string"
          },
          "data" : {
            "$ref" : "#/components/schemas/VerifyResponse"
          },
          "date" : {
            "type" : "string"
          },
          "env_name" : {
            "type" : "string"
          },
          "message" : {
            "type" : "string"
          },
          "message_params" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "trace_id" : {
            "type" : "string"
          }
        }
      },
      "DecryptRequest" : {
        "type" : "object",
        "properties" : {
          "ciphertext" : {
            "type" : "string",
            "description" : "Ciphertext Cipher text to be decrypted. The blob includes metadata.\n- required\n- base64-encoded binary data object",
            "example" : "U3dhZ2dlciByb2Nrcw=="
          },
          "encryption_algorithm" : {
            "type" : "string",
            "description" : "EncryptionAlgorithm encrypt algorithm",
            "example" : "AES_256_GCM"
          },
          "encryption_context" : {
            "type" : "object",
            "additionalProperties" : {
              "type" : "string"
            },
            "description" : "EncryptionContext Specifies the encryption context that will be used to encrypt the data.\nWhen you use an encryption context to encrypt data, you must specify the same (an exact case-sensitive match) encryption context to decrypt the data."
          },
          "key_id" : {
            "type" : "string",
            "description" : "KeyId Identifies the key to use in the encryption operation.\nTo specify a key, use its key ID, key IRN, alias name, or alias IRN. When using an alias name, prefix it with \"alias/\".\n- required when to specify a key in a tenant.\n- required when to specify an AWS KMS key(as alias).\n- required when the ciphertext was encrypted under an asymmetric key.\n- not required when the ciphertext was encrypted under a symmetric key owned by your tenant, kms service can get the key from metadata that it adds to the symmetric ciphertext blob.",
            "example" : "1234abcd-12ab-34cd-56ef-1234567890ab"
          }
        },
        "required" : [ "ciphertext" ]
      },
      "DecryptResponse" : {
        "type" : "object",
        "properties" : {
          "encryption_algorithm" : {
            "type" : "string",
            "description" : "EncryptionAlgorithm encrypt algorithm",
            "example" : "AES_256_GCM"
          },
          "key_id" : {
            "type" : "string",
            "description" : "KeyId The key IRN or alias IRN that was used to decrypt the ciphertext.\n- if the request key is a kms service key, it will output the key IRN, like **res:mytenat:key/1234abcd-12ab-34cd-56ef-1234567890ab**\n- if the request key is an alias associated with a kms service key, it will output the key IRN, like **res:mytenat:key/1234abcd-12ab-34cd-56ef-1234567890ab**\n- if the request key is an alias associated with an AWS KMS key and the options OutputAwsKeyId is false, it will output the alias IRN, like **res:mytenant:alias/alias-example-name**\n- if the request key is an alias associated with an AWS KMS key and the options OutputAwsKeyId is true, it will output the AWS KMS key arn, like **arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab**"
          },
          "plain_bytes" : {
            "type" : "string",
            "format" : "byte",
            "description" : "PlainBytes Decrypted plaintext data.\n- base64-encoded binary data object",
            "example" : "U3dhZ2dlciByb2Nrcw==",
            "pattern" : "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$"
          },
          "raw_key_id" : {
            "type" : "string"
          },
          "raw_response" : {
            "type" : "object"
          }
        }
      },
      "DeleteAliasRequest" : {
        "type" : "object",
        "properties" : {
          "alias_name" : {
            "type" : "string",
            "description" : "Name The alias name, unique in the tenant. Identifies the alias that is deleted\n- required\n- minimum length of 1. Maximum length of 256.\n- can contain only alphanumeric characters(0-9,a-z,A-Z), underscores (_), and dashes (-)\n- can not start with mo-/_",
            "example" : "alias-example-name",
            "maxLength" : 256,
            "minLength" : 1
          }
        },
        "required" : [ "alias_name" ]
      },
      "DeleteKeyRequest" : {
        "type" : "object",
        "properties" : {
          "key_id" : {
            "type" : "string",
            "description" : "KeyId The unique identifier for the key.",
            "example" : "1234abcd-12ab-34cd-56ef-1234567890ab"
          }
        },
        "required" : [ "key_id" ]
      },
      "DescribeRequest" : {
        "type" : "object",
        "properties" : {
          "key_id" : {
            "type" : "string",
            "description" : "KeyId Identifies the key to use in the encryption operation.\nTo specify a key, use its key ID, key IRN, alias name, or alias IRN. When using an alias name, prefix it with \"alias/\".\n- required\n- to specify a key in a tenant, you must use the key IRN or alias IRN.\n- to specify a AWS KMS key, use the alias name or alias IRN.\n- for example:\n  + *`KeyId`*: **1234abcd-12ab-34cd-56ef-1234567890ab**\n  + *`Key IRN`*: **res:mytenat:key/1234abcd-12ab-34cd-56ef-1234567890ab**\n  + *`alias name`*: **alias/alias-example-name**\n  + *`alias IRN`*: **res:mytenant:alias/alias-example-name**",
            "example" : "1234abcd-12ab-34cd-56ef-1234567890ab"
          }
        },
        "required" : [ "key_id" ]
      },
      "DescribeResponse" : {
        "type" : "object",
        "properties" : {
          "algorithms" : {
            "type" : "array",
            "example" : [ "AES_256_GCM" ],
            "items" : {
              "type" : "string"
            }
          },
          "create_time" : {
            "type" : "string",
            "format" : "date-time",
            "description" : "CreateTime The date and time that key was most recently created\n- formatted as [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) with UTC timezone",
            "example" : "2023-01-01T23:01:01Z"
          },
          "creator" : {
            "type" : "string",
            "description" : "Creator The creator that key was most recently created by\n- formatted as {tenant-code}/{user-name}",
            "example" : "mytenant/myname"
          },
          "default_algorithm" : {
            "type" : "string",
            "example" : "AES_256_GCM"
          },
          "description" : {
            "type" : "string",
            "description" : "Description The description of the key."
          },
          "key_id" : {
            "type" : "string",
            "description" : "KeyID The unique identifier for the key.",
            "example" : "1234abcd-12ab-34cd-56ef-1234567890ab"
          },
          "key_irn" : {
            "type" : "string",
            "description" : "IRN The key IRN(InsureMO Resource Name)\n- formatted as res:{tenant-code}:key/{key-id}",
            "example" : "res:mytenat:key/1234abcd-12ab-34cd-56ef-1234567890ab"
          },
          "key_manager" : {
            "type" : "string",
            "example" : "false"
          },
          "key_spec" : {
            "type" : "string",
            "default" : "AES_256",
            "description" : "KeySpec Describes the type of key material in the key.\n- *`AES_256`*: default value, a symmetric encryption key.\n- ~~RSA_xxxx~~: coming soon",
            "example" : "AES_256"
          },
          "key_usage" : {
            "type" : "string",
            "default" : "ENCRYPT_DECRYPT",
            "description" : "KeyUsage The cryptographic operations for which you can use the key.",
            "example" : "ENCRYPT_DECRYPT"
          },
          "modifier" : {
            "type" : "string",
            "description" : "Modifier The creator that key was most recently modified by\n- formatted as {tenant-code}/{user-name}",
            "example" : "mytenant/myname"
          },
          "modify_time" : {
            "type" : "string",
            "format" : "date-time",
            "description" : "ModifyTime The date and time that key was most recently modified\n- formatted as [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) with UTC timezone",
            "example" : "2023-01-01T23:01:01Z"
          },
          "raw_key_id" : {
            "type" : "string"
          },
          "raw_response" : {
            "type" : "object"
          },
          "status" : {
            "type" : "string",
            "description" : "Status The status of the key.",
            "example" : "enabled"
          },
          "tenant" : {
            "type" : "string",
            "description" : "Tenant The owner tenant of the key.",
            "example" : "mytenant"
          }
        }
      },
      "DisableKeyRequest" : {
        "type" : "object",
        "properties" : {
          "key_id" : {
            "type" : "string",
            "description" : "KeyId The unique identifier for the key.",
            "example" : "1234abcd-12ab-34cd-56ef-1234567890ab"
          }
        },
        "required" : [ "key_id" ]
      },
      "EnableKeyRequest" : {
        "type" : "object",
        "properties" : {
          "key_id" : {
            "type" : "string",
            "description" : "KeyId The unique identifier for the key.",
            "example" : "1234abcd-12ab-34cd-56ef-1234567890ab"
          }
        },
        "required" : [ "key_id" ]
      },
      "EncryptRequest" : {
        "type" : "object",
        "properties" : {
          "encryption_algorithm" : {
            "type" : "string",
            "description" : "EncryptionAlgorithm encrypt algorithm",
            "example" : "AES_256_GCM"
          },
          "encryption_context" : {
            "type" : "object",
            "additionalProperties" : {
              "type" : "string"
            },
            "description" : "EncryptionContext Specifies the encryption context that will be used to encrypt the data.\nWhen you use an encryption context to encrypt data, you must specify the same (an exact case-sensitive match) encryption context to decrypt the data."
          },
          "key_id" : {
            "type" : "string",
            "description" : "KeyId Identifies the key to use in the encryption operation.\nTo specify a key, use its key ID, key IRN, alias name, or alias IRN. When using an alias name, prefix it with \"alias/\".\n- required\n- to specify a key in a tenant, you must use the key IRN or alias IRN.\n- to specify a AWS KMS key, use the alias name or alias IRN.\n- for example:\n  + *`KeyId`*: **1234abcd-12ab-34cd-56ef-1234567890ab**\n  + *`Key IRN`*: **res:mytenat:key/1234abcd-12ab-34cd-56ef-1234567890ab**\n  + *`alias name`*: **alias/alias-example-name**\n  + *`alias IRN`*: **res:mytenant:alias/alias-example-name**",
            "example" : "1234abcd-12ab-34cd-56ef-1234567890ab"
          },
          "plain_bytes" : {
            "type" : "string",
            "format" : "byte",
            "description" : "PlainBytes Data to be encrypted.\n- required\n- base64-encoded binary data object\n- minimum length of 1. maximum length of 2048.",
            "example" : "U3dhZ2dlciByb2Nrcw==",
            "maxLength" : 2048,
            "minLength" : 1,
            "pattern" : "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$"
          }
        },
        "required" : [ "key_id", "plain_bytes" ]
      },
      "EncryptResponse" : {
        "type" : "object",
        "properties" : {
          "ciphertext" : {
            "type" : "string",
            "description" : "Ciphertext The encrypted plaintext include metadata.\n- base64-encoded binary data object",
            "example" : "U3dhZ2dlciByb2Nrcw=="
          },
          "encryption_algorithm" : {
            "type" : "string",
            "description" : "EncryptionAlgorithm encrypt algorithm",
            "example" : "AES_256_GCM"
          },
          "key_id" : {
            "type" : "string",
            "description" : "KeyId The key IRN or alias IRN that was used to encrypt the plaintext.\n- if the request key is a kms service key, it will output the key IRN, like **res:mytenat:key/1234abcd-12ab-34cd-56ef-1234567890ab**\n- if the request key is an alias associated with a kms service key, it will output the key IRN, like **res:mytenat:key/1234abcd-12ab-34cd-56ef-1234567890ab**\n- if the request key is an alias associated with an AWS KMS key and the options OutputAwsKeyId is false, it will output the alias IRN, like **res:mytenant:alias/alias-example-name**\n- if the request key is an alias associated with an AWS KMS key and the options OutputAwsKeyId is true, it will output the AWS KMS key arn, like **arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab**",
            "example" : "res:mytenat:key/1234abcd-12ab-34cd-56ef-1234567890ab"
          },
          "raw_key_id" : {
            "type" : "string"
          },
          "raw_response" : {
            "type" : "object"
          }
        }
      },
      "ErrorResponseModel" : {
        "type" : "object",
        "properties" : {
          "code" : {
            "type" : "string"
          },
          "date" : {
            "type" : "string"
          },
          "env_name" : {
            "type" : "string"
          },
          "errors" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/CodeWithParams"
            }
          },
          "message" : {
            "type" : "string"
          },
          "message_params" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "trace_id" : {
            "type" : "string"
          }
        }
      },
      "GenerateDataKeyPairRequest" : {
        "type" : "object",
        "properties" : {
          "encryption_context" : {
            "type" : "object",
            "additionalProperties" : {
              "type" : "string"
            },
            "description" : "EncryptionContext Specifies the encryption context that will be used to encrypt the data.\nWhen you use an encryption context to encrypt data, you must specify the same (an exact case-sensitive match) encryption context to decrypt the data."
          },
          "key_id" : {
            "type" : "string",
            "description" : "KeyId Identifies the key to use in the encryption operation.\nTo specify a key, use its key ID, key IRN, alias name, or alias IRN. When using an alias name, prefix it with \"alias/\".\n- required\n- to specify a key in a tenant, you must use the key IRN or alias IRN.\n- to specify an AWS KMS key, use the alias name or alias IRN.\n- for example:\n  + *`KeyId`*: **1234abcd-12ab-34cd-56ef-1234567890ab**\n  + *`Key IRN`*: **res:mytenat:key/1234abcd-12ab-34cd-56ef-1234567890ab**\n  + *`alias name`*: **alias/alias-example-name**\n  + *`alias IRN`*: **res:mytenant:alias/alias-example-name**",
            "example" : "1234abcd-12ab-34cd-56ef-1234567890ab"
          },
          "key_pair_spec" : {
            "type" : "string",
            "description" : "KeyPairSpec Specifies the type of data key pair to generate. available values:\n- *`RSA_2048`*: 2048-bit RSA key pair.\n- *`RSA_3072`*: 3072-bit RSA key pair.\n- *`RSA_4096`*: 4096-bit RSA key pair."
          }
        },
        "required" : [ "key_id", "key_pair_spec" ]
      },
      "GenerateDataKeyPairResponse" : {
        "type" : "object",
        "properties" : {
          "key_id" : {
            "type" : "string"
          },
          "key_pair_spec" : {
            "type" : "string"
          },
          "private_key_ciphertext" : {
            "type" : "string"
          },
          "private_key_pem" : {
            "type" : "string"
          },
          "private_key_plain_bytes" : {
            "type" : "string",
            "format" : "byte",
            "pattern" : "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$"
          },
          "public_key_bytes" : {
            "type" : "string",
            "format" : "byte",
            "pattern" : "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$"
          },
          "public_key_pem" : {
            "type" : "string"
          },
          "raw_key_id" : {
            "type" : "string"
          },
          "raw_response" : {
            "type" : "object"
          }
        }
      },
      "GenerateDataKeyRequest" : {
        "type" : "object",
        "properties" : {
          "encryption_algorithm" : {
            "type" : "string",
            "description" : "EncryptionAlgorithm encrypt algorithm",
            "example" : "AES_256_GCM"
          },
          "encryption_context" : {
            "type" : "object",
            "additionalProperties" : {
              "type" : "string"
            },
            "description" : "EncryptionContext Specifies the encryption context that will be used to encrypt the data.\nWhen you use an encryption context to encrypt data, you must specify the same (an exact case-sensitive match) encryption context to decrypt the data."
          },
          "key_id" : {
            "type" : "string",
            "description" : "KeyId Identifies the key to use in the encryption operation.\nTo specify a key, use its key ID, key IRN, alias name, or alias IRN. When using an alias name, prefix it with \"alias/\".\n- required\n- to specify a key in a tenant, you must use the key IRN or alias IRN.\n- to specify an AWS KMS key, use the alias name or alias IRN.\n- for example:\n  + *`KeyId`*: **1234abcd-12ab-34cd-56ef-1234567890ab**\n  + *`Key IRN`*: **res:mytenat:key/1234abcd-12ab-34cd-56ef-1234567890ab**\n  + *`alias name`*: **alias/alias-example-name**\n  + *`alias IRN`*: **res:mytenant:alias/alias-example-name**",
            "example" : "1234abcd-12ab-34cd-56ef-1234567890ab"
          },
          "length_in_bytes" : {
            "type" : "integer",
            "description" : "LengthInBytes Specifies the length of the data key in bytes. For example, use the value 32 to generate a 256-bit data key (32 bytes is 256 bits).",
            "example" : 32
          }
        },
        "required" : [ "key_id", "length_in_bytes" ]
      },
      "GenerateDataKeyResponse" : {
        "type" : "object",
        "properties" : {
          "ciphertext" : {
            "type" : "string",
            "description" : "Ciphertext The encrypted data key include metadata.\n- base64-encoded binary data object",
            "example" : "U3dhZ2dlciByb2Nrcw=="
          },
          "encryption_algorithm" : {
            "type" : "string",
            "description" : "EncryptionAlgorithm encrypt algorithm",
            "example" : "AES_256_GCM"
          },
          "key_id" : {
            "type" : "string",
            "description" : "KeyId The key IRN or alias IRN that was used to encrypt the plaintext.\n- if the request key is a kms service key, it will output the key IRN, like **res:mytenat:key/1234abcd-12ab-34cd-56ef-1234567890ab**\n- if the request key is an alias associated with a kms service key, it will output the key IRN, like **res:mytenat:key/1234abcd-12ab-34cd-56ef-1234567890ab**\n- if the request key is an alias associated with an AWS KMS key and the options OutputAwsKeyId is false, it will output the alias IRN, like **res:mytenant:alias/alias-example-name**\n- if the request key is an alias associated with an AWS KMS key and the options OutputAwsKeyId is true, it will output the AWS KMS key arn, like **arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab**"
          },
          "plain_bytes" : {
            "type" : "string",
            "format" : "byte",
            "description" : "PlainBytes The plaintext data key. Use this data key to encrypt your data outside kms service. Then, remove it from memory as soon as possible.\n- base64-encoded binary data object",
            "example" : "U3dhZ2dlciByb2Nrcw==",
            "pattern" : "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$"
          },
          "raw_key_id" : {
            "type" : "string"
          },
          "raw_response" : {
            "type" : "object"
          }
        }
      },
      "GenerateMacRequest" : {
        "type" : "object",
        "properties" : {
          "key_id" : {
            "type" : "string",
            "description" : "KeyId The key IRN or alias IRN that was used to encrypt the plaintext.\n- if the request key is a kms service key, it will output the key IRN, like **res:mytenat:key/1234abcd-12ab-34cd-56ef-1234567890ab**\n- if the request key is an alias associated with a kms service key, it will output the key IRN, like **res:mytenat:key/1234abcd-12ab-34cd-56ef-1234567890ab**\n- if the request key is an alias associated with an AWS KMS key and the options OutputAwsKeyId is false, it will output the alias IRN, like **res:mytenant:alias/alias-example-name**\n- if the request key is an alias associated with an AWS KMS key and the options OutputAwsKeyId is true, it will output the AWS KMS key arn, like **arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab**"
          },
          "mac_algorithm" : {
            "type" : "string",
            "description" : "MACAlgorithm mac algorithm",
            "example" : "HMAC_SHA3_256"
          },
          "message" : {
            "type" : "string",
            "format" : "byte",
            "maxLength" : 8192,
            "pattern" : "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$"
          }
        },
        "required" : [ "key_id", "message" ]
      },
      "GenerateMacResponse" : {
        "type" : "object",
        "properties" : {
          "key_id" : {
            "type" : "string"
          },
          "mac" : {
            "type" : "string",
            "format" : "byte",
            "pattern" : "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$"
          },
          "mac_algorithm" : {
            "type" : "string",
            "example" : "HMAC_SHA3_256"
          },
          "mac_hex" : {
            "type" : "string"
          },
          "raw_key_id" : {
            "type" : "string"
          },
          "raw_response" : {
            "type" : "object"
          }
        }
      },
      "GetPublicKeyRequest" : {
        "type" : "object",
        "properties" : {
          "key_id" : {
            "type" : "string",
            "description" : "KeyId Identifies the key to use in the encryption operation.\nTo specify a key, use its key ID, key IRN, alias name, or alias IRN. When using an alias name, prefix it with \"alias/\".\n- required\n- to specify a key in a tenant, you must use the key IRN or alias IRN.\n- to specify a AWS KMS key, use the alias name or alias IRN.\n- for example:\n  + *`KeyId`*: **1234abcd-12ab-34cd-56ef-1234567890ab**\n  + *`Key IRN`*: **res:mytenat:key/1234abcd-12ab-34cd-56ef-1234567890ab**\n  + *`alias name`*: **alias/alias-example-name**\n  + *`alias IRN`*: **res:mytenant:alias/alias-example-name**",
            "example" : "1234abcd-12ab-34cd-56ef-1234567890ab"
          }
        },
        "required" : [ "key_id" ]
      },
      "GetPublicKeyResponse" : {
        "type" : "object",
        "properties" : {
          "algorithms" : {
            "type" : "array",
            "example" : [ "AES_256_GCM" ],
            "items" : {
              "type" : "string"
            }
          },
          "default_algorithm" : {
            "type" : "string",
            "example" : "AES_256_GCM"
          },
          "key_id" : {
            "type" : "string",
            "description" : "KeyID The unique identifier for the key.",
            "example" : "1234abcd-12ab-34cd-56ef-1234567890ab"
          },
          "key_spec" : {
            "type" : "string",
            "description" : "KeySpec Describes the type of key material in the key.\n- *`AES_256`*: default value, a symmetric encryption key.\n- ~~RSA_xxxx~~: coming soon",
            "example" : "RSA_2048"
          },
          "key_usage" : {
            "type" : "string",
            "default" : "ENCRYPT_DECRYPT",
            "description" : "KeyUsage The cryptographic operations for which you can use the key.",
            "example" : "ENCRYPT_DECRYPT"
          },
          "public_key" : {
            "type" : "string",
            "format" : "byte",
            "pattern" : "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$"
          },
          "public_key_pem" : {
            "type" : "string"
          },
          "raw_key_id" : {
            "type" : "string"
          },
          "raw_response" : {
            "type" : "object"
          }
        }
      },
      "Key" : {
        "type" : "object",
        "properties" : {
          "algorithms" : {
            "type" : "array",
            "example" : [ "AES_256_GCM" ],
            "items" : {
              "type" : "string"
            }
          },
          "create_time" : {
            "type" : "string",
            "format" : "date-time",
            "description" : "CreateTime The date and time that key was most recently created\n- formatted as [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) with UTC timezone",
            "example" : "2023-01-01T23:01:01Z"
          },
          "creator" : {
            "type" : "string",
            "description" : "Creator The creator that key was most recently created by\n- formatted as {tenant-code}/{user-name}",
            "example" : "mytenant/myname"
          },
          "default_algorithm" : {
            "type" : "string",
            "example" : "AES_256_GCM"
          },
          "description" : {
            "type" : "string",
            "description" : "Description The description of the key."
          },
          "key_id" : {
            "type" : "string",
            "description" : "KeyID The unique identifier for the key.",
            "example" : "1234abcd-12ab-34cd-56ef-1234567890ab"
          },
          "key_irn" : {
            "type" : "string",
            "description" : "IRN The key IRN(InsureMO Resource Name)\n- formatted as res:{tenant-code}:key/{key-id}",
            "example" : "res:mytenat:key/1234abcd-12ab-34cd-56ef-1234567890ab"
          },
          "key_manager" : {
            "type" : "string",
            "example" : "false"
          },
          "key_spec" : {
            "type" : "string",
            "default" : "AES_256",
            "description" : "KeySpec Describes the type of key material in the key.\n- *`AES_256`*: default value, a symmetric encryption key.\n- ~~RSA_xxxx~~: coming soon",
            "example" : "AES_256"
          },
          "key_usage" : {
            "type" : "string",
            "default" : "ENCRYPT_DECRYPT",
            "description" : "KeyUsage The cryptographic operations for which you can use the key.",
            "example" : "ENCRYPT_DECRYPT"
          },
          "modifier" : {
            "type" : "string",
            "description" : "Modifier The creator that key was most recently modified by\n- formatted as {tenant-code}/{user-name}",
            "example" : "mytenant/myname"
          },
          "modify_time" : {
            "type" : "string",
            "format" : "date-time",
            "description" : "ModifyTime The date and time that key was most recently modified\n- formatted as [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) with UTC timezone",
            "example" : "2023-01-01T23:01:01Z"
          },
          "status" : {
            "type" : "string",
            "description" : "Status The status of the secret.\n- *`enabled`*: the key is enabled, allows you to use the key for cryptographic operations.\n- *`disabled`*: the key is disabled, temporarily prevents use of the key for cryptographic operations.\n- ~~`pending`~~: coming soon. the key is pending import\n- *`deleted`*: the key is marked as deleted and will be permanently deleted soon.",
            "example" : "enabled"
          },
          "tenant" : {
            "type" : "string",
            "description" : "Tenant The owner tenant of the key.",
            "example" : "mytenant"
          }
        }
      },
      "KmsWebDestResource" : {
        "type" : "object",
        "properties" : {
          "label" : {
            "type" : "string"
          },
          "placeholder" : {
            "type" : "string"
          }
        }
      },
      "KmsWebOption" : {
        "type" : "object",
        "properties" : {
          "advanced" : {
            "type" : "boolean"
          },
          "enums" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "label" : {
            "type" : "string"
          },
          "model" : {
            "type" : "string"
          },
          "placeholder" : {
            "type" : "string"
          },
          "required" : {
            "type" : "boolean"
          },
          "type" : {
            "$ref" : "#/components/schemas/KmsWebOptionType"
          }
        }
      },
      "KmsWebOptionType" : {
        "type" : "string",
        "enum" : [ "text", "secret", "selector" ],
        "x-enum-varnames" : [ "WebOptionTypeText", "WebOptionTypeSecret", "WebOptionTypeSelector" ]
      },
      "KmsWebType" : {
        "type" : "object",
        "properties" : {
          "dest_resource" : {
            "$ref" : "#/components/schemas/KmsWebDestResource"
          },
          "index" : {
            "type" : "integer"
          },
          "label" : {
            "type" : "string"
          },
          "options" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/KmsWebOption"
            }
          },
          "value" : {
            "type" : "string"
          }
        }
      },
      "PagedResponseModel-Alias" : {
        "type" : "object",
        "properties" : {
          "code" : {
            "type" : "string"
          },
          "current_page" : {
            "type" : "integer"
          },
          "data" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/Alias"
            }
          },
          "date" : {
            "type" : "string"
          },
          "env_name" : {
            "type" : "string"
          },
          "message" : {
            "type" : "string"
          },
          "message_params" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "page_size" : {
            "type" : "integer"
          },
          "total" : {
            "type" : "integer"
          },
          "trace_id" : {
            "type" : "string"
          }
        }
      },
      "PagedResponseModel-Key" : {
        "type" : "object",
        "properties" : {
          "code" : {
            "type" : "string"
          },
          "current_page" : {
            "type" : "integer"
          },
          "data" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/Key"
            }
          },
          "date" : {
            "type" : "string"
          },
          "env_name" : {
            "type" : "string"
          },
          "message" : {
            "type" : "string"
          },
          "message_params" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "page_size" : {
            "type" : "integer"
          },
          "total" : {
            "type" : "integer"
          },
          "trace_id" : {
            "type" : "string"
          }
        }
      },
      "ReEncryptRequest" : {
        "type" : "object",
        "properties" : {
          "ciphertext" : {
            "type" : "string",
            "description" : "Ciphertext Cipher text to be decrypted. The blob includes metadata.\n- required\n- base64-encoded binary data object",
            "example" : "U3dhZ2dlciByb2Nrcw=="
          },
          "destination_encryption_algorithm" : {
            "type" : "string",
            "description" : "DestinationEncryptionAlgorithm destination encrypt algorithm",
            "example" : "AES_256_GCM"
          },
          "destination_encryption_context" : {
            "type" : "object",
            "additionalProperties" : {
              "type" : "string"
            },
            "description" : "DestinationEncryptionContext Specifies the encryption context that will be used to encrypt the data.\nWhen you use an encryption context to encrypt data, you must specify the same (an exact case-sensitive match) encryption context to decrypt the data."
          },
          "destination_key_id" : {
            "type" : "string",
            "description" : "DestinationKeyId Identifies the key to use in the encryption operation.\nTo specify a key, use its key ID, key IRN, alias name, or alias IRN. When using an alias name, prefix it with \"alias/\".\n- required\n- to specify a key in a tenant, you must use the key IRN or alias IRN.\n- to specify a AWS KMS key, use the alias name or alias IRN.\n- for example:\n  + *`KeyId`*: **1234abcd-12ab-34cd-56ef-1234567890ab**\n  + *`Key IRN`*: **res:mytenat:key/1234abcd-12ab-34cd-56ef-1234567890ab**\n  + *`alias name`*: **alias/alias-example-name**\n  + *`alias IRN`*: **res:mytenant:alias/alias-example-name**",
            "example" : "1234abcd-12ab-34cd-56ef-1234567890ab"
          },
          "source_encryption_algorithm" : {
            "type" : "string",
            "description" : "SourceEncryptionAlgorithm source encrypt algorithm",
            "example" : "AES_256_GCM"
          },
          "source_encryption_context" : {
            "type" : "object",
            "additionalProperties" : {
              "type" : "string"
            },
            "description" : "SourceEncryptionContext Specifies the encryption context that will be used to encrypt the data.\nWhen you use an encryption context to encrypt data, you must specify the same (an exact case-sensitive match) encryption context to decrypt the data."
          },
          "source_key_id" : {
            "type" : "string",
            "description" : "SourceKeyId Identifies the key to use in the encryption operation.\nTo specify a key, use its key ID, key IRN, alias name, or alias IRN. When using an alias name, prefix it with \"alias/\".\n- required when to specify a key in a tenant.\n- required when to specify an AWS KMS key(as alias).\n- required when the ciphertext was encrypted under an asymmetric key.\n- not required when the ciphertext was encrypted under a symmetric key owned by your tenant, kms service can get the key from metadata that it adds to the symmetric ciphertext blob.",
            "example" : "1234abcd-12ab-34cd-56ef-1234567890ab"
          }
        },
        "required" : [ "ciphertext", "destination_key_id" ]
      },
      "ReEncryptResponse" : {
        "type" : "object",
        "properties" : {
          "ciphertext" : {
            "type" : "string",
            "description" : "Ciphertext The new encrypted plaintext include metadata.\n- base64-encoded binary data object",
            "example" : "U3dhZ2dlciByb2Nrcw=="
          },
          "encryption_algorithm" : {
            "type" : "string",
            "description" : "EncryptionAlgorithm encrypt algorithm",
            "example" : "AES_256_GCM"
          },
          "key_id" : {
            "type" : "string",
            "description" : "KeyId The key IRN or alias IRN that was used to encrypt the plaintext.\n- if the request key is a kms service key, it will output the key IRN, like **res:mytenat:key/1234abcd-12ab-34cd-56ef-1234567890ab**\n- if the request key is an alias associated with a kms service key, it will output the key IRN, like **res:mytenat:key/1234abcd-12ab-34cd-56ef-1234567890ab**\n- if the request key is an alias associated with an AWS KMS key and the options OutputAwsKeyId is false, it will output the alias IRN, like **res:mytenant:alias/alias-example-name**\n- if the request key is an alias associated with an AWS KMS key and the options OutputAwsKeyId is true, it will output the AWS KMS key arn, like **arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab**"
          },
          "raw_key_id" : {
            "type" : "string"
          },
          "raw_response" : {
            "type" : "object"
          },
          "raw_source_key_id" : {
            "type" : "string"
          },
          "raw_source_response" : {
            "type" : "object"
          },
          "source_encryption_algorithm" : {
            "type" : "string",
            "description" : "SourceEncryptionAlgorithm decrypt algorithm",
            "example" : "AES_256_GCM"
          },
          "source_key_id" : {
            "type" : "string",
            "description" : "SourceKeyId The key IRN or alias IRN that was used to decrypt the ciphertext.\n- if the request key is a kms service key, it will output the key IRN, like **res:mytenat:key/1234abcd-12ab-34cd-56ef-1234567890ab**\n- if the request key is an alias associated with a kms service key, it will output the key IRN, like **res:mytenat:key/1234abcd-12ab-34cd-56ef-1234567890ab**\n- if the request key is an alias associated with an AWS KMS key and the options OutputAwsKeyId is false, it will output the alias IRN, like **res:mytenant:alias/alias-example-name**\n- if the request key is an alias associated with an AWS KMS key and the options OutputAwsKeyId is true, it will output the AWS KMS key arn, like **arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab**"
          }
        }
      },
      "SignRequest" : {
        "type" : "object",
        "properties" : {
          "digest" : {
            "type" : "string",
            "format" : "byte",
            "pattern" : "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$"
          },
          "digest_hex" : {
            "type" : "string"
          },
          "key_id" : {
            "type" : "string",
            "description" : "KeyId The key IRN or alias IRN that was used to encrypt the plaintext.\n- if the request key is a kms service key, it will output the key IRN, like **res:mytenat:key/1234abcd-12ab-34cd-56ef-1234567890ab**\n- if the request key is an alias associated with a kms service key, it will output the key IRN, like **res:mytenat:key/1234abcd-12ab-34cd-56ef-1234567890ab**\n- if the request key is an alias associated with an AWS KMS key and the options OutputAwsKeyId is false, it will output the alias IRN, like **res:mytenant:alias/alias-example-name**\n- if the request key is an alias associated with an AWS KMS key and the options OutputAwsKeyId is true, it will output the AWS KMS key arn, like **arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab**"
          },
          "message" : {
            "type" : "string",
            "format" : "byte",
            "maxLength" : 8192,
            "pattern" : "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$"
          },
          "sign_algorithm" : {
            "type" : "string",
            "description" : "SignAlgorithm mac algorithm"
          }
        },
        "required" : [ "key_id" ]
      },
      "SignResponse" : {
        "type" : "object",
        "properties" : {
          "key_id" : {
            "type" : "string"
          },
          "raw_key_id" : {
            "type" : "string"
          },
          "raw_response" : {
            "type" : "object"
          },
          "sign_algorithm" : {
            "type" : "string",
            "example" : "HMAC_SHA3_256"
          },
          "signature" : {
            "type" : "string",
            "format" : "byte",
            "pattern" : "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$"
          },
          "signature_hex" : {
            "type" : "string"
          }
        }
      },
      "UpdateAliasRequest" : {
        "type" : "object",
        "properties" : {
          "alias_name" : {
            "type" : "string",
            "description" : "Name The alias name, unique in the tenant. Identifies the alias that is changing its destination resource or options\n- required\n- minimum length of 1. Maximum length of 256.\n- can contain only alphanumeric characters(0-9,a-z,A-Z), underscores (_), and dashes (-)\n- can not start with mo-/_",
            "example" : "alias-example-name",
            "maxLength" : 256,
            "minLength" : 1
          },
          "aws_kms_options" : {
            "allOf" : [ {
              "$ref" : "#/components/schemas/AwsKmsOptions"
            } ],
            "description" : "AwsKmsOptions required if destination type is aws-kms"
          },
          "dest_resource" : {
            "type" : "string",
            "description" : "DestResource The dest resource\n- empty if you don't want to update it\n- the key id or key irn if destination type is **`key`**, such as *`1234abcd-12ab-34cd-56ef-1234567890ab`* or *`res:mytenant:key/1234abcd-12ab-34cd-56ef-1234567890ab`*\n- the secret name if destination type is **`secret`**, such as *`secret-example-name`* or *`res:mytenant:secret/secret-example-name`*\n- the aws arn, key or alias if destination type is **`aws-kms`**, such as *`1234abcd-12ab-34cd-56ef-1234567890ab`* or *`alias/ExampleAlias`*",
            "example" : "1234abcd-12ab-34cd-56ef-1234567890ab"
          }
        },
        "required" : [ "alias_name" ]
      },
      "UpdateKeyRequest" : {
        "type" : "object",
        "properties" : {
          "description" : {
            "type" : "string",
            "description" : "Description The description of the key.\n- empty means no changes."
          },
          "key_id" : {
            "type" : "string",
            "description" : "KeyId The unique identifier for the key.",
            "example" : "1234abcd-12ab-34cd-56ef-1234567890ab"
          }
        },
        "required" : [ "key_id" ]
      },
      "VerifyMacRequest" : {
        "type" : "object",
        "properties" : {
          "key_id" : {
            "type" : "string",
            "description" : "KeyId The key IRN or alias IRN that was used to encrypt the plaintext.\n- if the request key is a kms service key, it will output the key IRN, like **res:mytenat:key/1234abcd-12ab-34cd-56ef-1234567890ab**\n- if the request key is an alias associated with a kms service key, it will output the key IRN, like **res:mytenat:key/1234abcd-12ab-34cd-56ef-1234567890ab**\n- if the request key is an alias associated with an AWS KMS key and the options OutputAwsKeyId is false, it will output the alias IRN, like **res:mytenant:alias/alias-example-name**\n- if the request key is an alias associated with an AWS KMS key and the options OutputAwsKeyId is true, it will output the AWS KMS key arn, like **arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab**"
          },
          "mac" : {
            "type" : "string",
            "format" : "byte",
            "pattern" : "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$"
          },
          "mac_algorithm" : {
            "type" : "string",
            "example" : "HMAC_SHA3_256"
          },
          "mac_hex" : {
            "type" : "string"
          },
          "message" : {
            "type" : "string",
            "format" : "byte",
            "maxLength" : 8192,
            "pattern" : "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$"
          }
        },
        "required" : [ "key_id", "message" ]
      },
      "VerifyMacResponse" : {
        "type" : "object",
        "properties" : {
          "key_id" : {
            "type" : "string"
          },
          "mac_algorithm" : {
            "type" : "string",
            "example" : "HMAC_SHA3_256"
          },
          "raw_key_id" : {
            "type" : "string"
          },
          "raw_response" : {
            "type" : "object"
          },
          "result" : {
            "type" : "boolean"
          }
        }
      },
      "VerifyRequest" : {
        "type" : "object",
        "properties" : {
          "digest" : {
            "type" : "string",
            "format" : "byte",
            "pattern" : "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$"
          },
          "digest_hex" : {
            "type" : "string"
          },
          "key_id" : {
            "type" : "string",
            "description" : "KeyId The key IRN or alias IRN that was used to encrypt the plaintext.\n- if the request key is a kms service key, it will output the key IRN, like **res:mytenat:key/1234abcd-12ab-34cd-56ef-1234567890ab**\n- if the request key is an alias associated with a kms service key, it will output the key IRN, like **res:mytenat:key/1234abcd-12ab-34cd-56ef-1234567890ab**\n- if the request key is an alias associated with an AWS KMS key and the options OutputAwsKeyId is false, it will output the alias IRN, like **res:mytenant:alias/alias-example-name**\n- if the request key is an alias associated with an AWS KMS key and the options OutputAwsKeyId is true, it will output the AWS KMS key arn, like **arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab**"
          },
          "message" : {
            "type" : "string",
            "format" : "byte",
            "maxLength" : 8192,
            "pattern" : "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$"
          },
          "sign_algorithm" : {
            "type" : "string",
            "description" : "SignAlgorithm mac algorithm"
          },
          "signature" : {
            "type" : "string",
            "format" : "byte",
            "pattern" : "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$"
          },
          "signature_hex" : {
            "type" : "string"
          }
        },
        "required" : [ "key_id" ]
      },
      "VerifyResponse" : {
        "type" : "object",
        "properties" : {
          "key_id" : {
            "type" : "string"
          },
          "raw_key_id" : {
            "type" : "string"
          },
          "raw_response" : {
            "type" : "object"
          },
          "result" : {
            "type" : "boolean"
          },
          "sign_algorithm" : {
            "type" : "string"
          }
        }
      }
    }
  },
  "jsonSchemaDialect" : "https://spec.openapis.org/oas/3.1/dialect/base",
  "x-mo-gateway-auth-enabled" : true,
  "x-mo-gateway-cors-enabled" : true,
  "x-original-swagger-version" : "2.0"
}