{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-sagemaker/json-schema/amazon-sagemaker-create-code-repository-input-schema.json",
  "title": "CreateCodeRepositoryInput",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-sagemaker-code-repository-api-openapi.yml#/components/schemas/CreateCodeRepositoryInput",
  "type": "object",
  "properties": {
    "CodeRepositoryName": {
      "type": "string",
      "description": "The name of the Git repository. The name must have 1 to 63 characters. Valid characters are a-z, A-Z, 0-9, and - (hyphen)."
    },
    "GitConfig": {
      "$ref": "#/$defs/GitConfig"
    },
    "Tags": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Tag"
      },
      "description": "An array of key-value pairs. You can use tags to categorize your Amazon Web Services resources in different ways, for example, by purpose, owner, or environment. For more information, see Tagging Amazon Web Services Resources."
    }
  },
  "required": [
    "CodeRepositoryName",
    "GitConfig"
  ],
  "$defs": {
    "GitConfig": {
      "type": "object",
      "properties": {
        "RepositoryUrl": {
          "type": "string",
          "description": "The URL where the Git repository is located."
        },
        "Branch": {
          "type": "string",
          "description": "The default branch for the Git repository."
        },
        "SecretArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the Amazon Web Services Secrets Manager secret that contains the credentials used to access the git repository. The secret must have a staging label of AWSCURRENT and must be in the following format: {\"username\": UserName, \"password\": Password}"
        }
      },
      "required": [
        "RepositoryUrl"
      ]
    },
    "Tag": {
      "type": "object",
      "properties": {
        "Key": {
          "type": "string",
          "description": "The tag key. Tag keys must be unique per resource."
        },
        "Value": {
          "type": "string",
          "description": "The tag value."
        }
      },
      "required": [
        "Key",
        "Value"
      ]
    }
  }
}