{
  "typeName" : "AWS::Bedrock::ApplicationInferenceProfile",
  "description" : "Definition of AWS::Bedrock::ApplicationInferenceProfile Resource Type",
  "sourceUrl" : "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-bedrock-application-inference-profile",
  "definitions" : {
    "InferenceProfileModelSource" : {
      "description" : "Various ways to encode a list of models in a CreateInferenceProfile request",
      "oneOf" : [ {
        "type" : "object",
        "title" : "CopyFrom",
        "properties" : {
          "CopyFrom" : {
            "type" : "string",
            "maxLength" : 2048,
            "minLength" : 1,
            "pattern" : "^arn:aws(|-us-gov|-cn|-iso|-iso-b):bedrock:(|[0-9a-z-]{0,20}):(|[0-9]{12}):(inference-profile|foundation-model)/[a-zA-Z0-9-:.]+$",
            "description" : "Source arns for a custom inference profile to copy its regional load balancing config from. This\ncan either be a foundation model or predefined inference profile ARN."
          }
        },
        "required" : [ "CopyFrom" ],
        "additionalProperties" : false
      } ]
    },
    "InferenceProfileStatus" : {
      "type" : "string",
      "description" : "Status of the Inference Profile",
      "enum" : [ "ACTIVE" ]
    },
    "InferenceProfileType" : {
      "type" : "string",
      "description" : "Type of the Inference Profile",
      "enum" : [ "APPLICATION", "SYSTEM_DEFINED" ]
    },
    "InferenceProfileModel" : {
      "type" : "object",
      "description" : "Model configuration",
      "properties" : {
        "ModelArn" : {
          "type" : "string",
          "pattern" : "^arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}::foundation-model/[a-z0-9-]{1,63}[.]{1}([a-z0-9-]{1,63}[.]){0,2}[a-z0-9-]{1,63}([:][a-z0-9-]{1,63}){0,2}$",
          "description" : "ARN for Foundation Models in Bedrock. These models can be used as base models for model customization jobs"
        }
      },
      "additionalProperties" : false
    },
    "Tag" : {
      "type" : "object",
      "description" : "Definition of the key/value pair for a tag",
      "properties" : {
        "Key" : {
          "type" : "string",
          "maxLength" : 128,
          "minLength" : 1,
          "pattern" : "^[a-zA-Z0-9\\s._:/=+@-]*$",
          "description" : "Tag Key"
        },
        "Value" : {
          "type" : "string",
          "maxLength" : 256,
          "minLength" : 0,
          "pattern" : "^[a-zA-Z0-9\\s._:/=+@-]*$",
          "description" : "Tag Value"
        }
      },
      "required" : [ "Key", "Value" ],
      "additionalProperties" : false
    },
    "Unit" : {
      "type" : "object",
      "additionalProperties" : false
    }
  },
  "properties" : {
    "CreatedAt" : {
      "type" : "string",
      "description" : "Time Stamp",
      "format" : "date-time"
    },
    "Description" : {
      "type" : "string",
      "maxLength" : 200,
      "minLength" : 1,
      "pattern" : "^([0-9a-zA-Z:.][ _-]?)+$",
      "description" : "Description of the inference profile"
    },
    "InferenceProfileArn" : {
      "type" : "string",
      "maxLength" : 2048,
      "minLength" : 1,
      "pattern" : "^arn:aws(|-us-gov|-cn|-iso|-iso-b):bedrock:(|[0-9a-z-]{0,20}):(|[0-9]{12}):(inference-profile|application-inference-profile)/[a-zA-Z0-9-:.]+$"
    },
    "InferenceProfileId" : {
      "type" : "string",
      "maxLength" : 64,
      "minLength" : 1,
      "pattern" : "^[a-zA-Z0-9-:.]+$"
    },
    "InferenceProfileIdentifier" : {
      "type" : "string",
      "maxLength" : 2048,
      "minLength" : 1,
      "pattern" : "^(arn:aws(|-us-gov|-cn|-iso|-iso-b):bedrock:(|[0-9a-z-]{0,20}):(|[0-9]{12}):(inference-profile|application-inference-profile)/)?[a-zA-Z0-9-:.]+$",
      "description" : "Inference profile identifier. Supports both system-defined inference profile ids, and inference profile ARNs."
    },
    "InferenceProfileName" : {
      "type" : "string",
      "maxLength" : 64,
      "minLength" : 1,
      "pattern" : "^([0-9a-zA-Z][ _-]?)+$"
    },
    "ModelSource" : {
      "$ref" : "#/definitions/InferenceProfileModelSource"
    },
    "Models" : {
      "type" : "array",
      "items" : {
        "$ref" : "#/definitions/InferenceProfileModel"
      },
      "maxItems" : 5,
      "minItems" : 1,
      "description" : "List of model configuration"
    },
    "Status" : {
      "$ref" : "#/definitions/InferenceProfileStatus"
    },
    "Tags" : {
      "type" : "array",
      "items" : {
        "$ref" : "#/definitions/Tag"
      },
      "maxItems" : 200,
      "minItems" : 0,
      "description" : "List of Tags"
    },
    "Type" : {
      "$ref" : "#/definitions/InferenceProfileType"
    },
    "UpdatedAt" : {
      "type" : "string",
      "description" : "Time Stamp",
      "format" : "date-time"
    }
  },
  "required" : [ "InferenceProfileName" ],
  "readOnlyProperties" : [ "/properties/Models", "/properties/InferenceProfileArn", "/properties/InferenceProfileId", "/properties/InferenceProfileIdentifier", "/properties/Status", "/properties/Type", "/properties/CreatedAt", "/properties/UpdatedAt" ],
  "writeOnlyProperties" : [ "/properties/ModelSource" ],
  "createOnlyProperties" : [ "/properties/Description", "/properties/InferenceProfileName", "/properties/ModelSource" ],
  "primaryIdentifier" : [ "/properties/InferenceProfileIdentifier" ],
  "handlers" : {
    "create" : {
      "permissions" : [ "bedrock:CreateInferenceProfile", "bedrock:GetInferenceProfile", "bedrock:TagResource", "bedrock:ListTagsForResource" ]
    },
    "read" : {
      "permissions" : [ "bedrock:GetInferenceProfile", "bedrock:ListTagsForResource" ]
    },
    "update" : {
      "permissions" : [ "bedrock:GetInferenceProfile", "bedrock:ListTagsForResource", "bedrock:TagResource", "bedrock:UntagResource" ]
    },
    "delete" : {
      "permissions" : [ "bedrock:DeleteInferenceProfile", "bedrock:GetInferenceProfile" ]
    },
    "list" : {
      "handlerSchema" : {
        "properties" : {
          "Type" : {
            "$ref" : "resource-schema.json#/properties/Type"
          }
        }
      },
      "permissions" : [ "bedrock:ListInferenceProfiles" ]
    }
  },
  "tagging" : {
    "cloudFormationSystemTags" : true,
    "tagOnCreate" : true,
    "tagProperty" : "/properties/Tags",
    "tagUpdatable" : true,
    "taggable" : true,
    "permissions" : [ "bedrock:TagResource", "bedrock:UntagResource", "bedrock:ListTagsForResource" ]
  },
  "additionalProperties" : false
}