{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/unity-catalog/json-schema/unity-catalog-create-credential-request-schema.json",
  "title": "CreateCredentialRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/unity-catalog-credentials-api-openapi.yml#/components/schemas/CreateCredentialRequest",
  "type": "object",
  "required": [
    "name"
  ],
  "properties": {
    "name": {
      "description": "The credential name. The name must be unique within the metastore.",
      "type": "string"
    },
    "comment": {
      "description": "Comment associated with the credential.",
      "type": "string"
    },
    "aws_iam_role": {
      "$ref": "#/$defs/AwsIamRoleRequest"
    },
    "purpose": {
      "$ref": "#/$defs/CredentialPurpose"
    }
  },
  "$defs": {
    "AwsIamRoleArn": {
      "description": "The Amazon Resource Name (ARN) of the AWS IAM role used to vend temporary credentials.",
      "type": "string"
    },
    "AwsIamRoleRequest": {
      "type": "object",
      "required": [
        "role_arn"
      ],
      "properties": {
        "role_arn": {
          "$ref": "#/$defs/AwsIamRoleArn"
        }
      }
    },
    "CredentialPurpose": {
      "type": "string",
      "enum": [
        "STORAGE"
      ]
    }
  }
}