{
  "typeName" : "AWS::Bedrock::AgentAlias",
  "description" : "Definition of AWS::Bedrock::AgentAlias Resource Type",
  "sourceUrl" : "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-bedrock-agents",
  "definitions" : {
    "AgentAliasHistoryEvent" : {
      "type" : "object",
      "description" : "History event for an alias for an Agent.",
      "properties" : {
        "RoutingConfiguration" : {
          "type" : "array",
          "items" : {
            "$ref" : "#/definitions/AgentAliasRoutingConfigurationListItem"
          },
          "maxItems" : 1,
          "description" : "Routing configuration for an Agent alias.",
          "insertionOrder" : false
        },
        "EndDate" : {
          "type" : "string",
          "description" : "Time Stamp."
        },
        "StartDate" : {
          "type" : "string",
          "description" : "Time Stamp."
        }
      },
      "additionalProperties" : false
    },
    "AgentAliasRoutingConfigurationListItem" : {
      "type" : "object",
      "description" : "Details about the routing configuration for an Agent alias.",
      "properties" : {
        "AgentVersion" : {
          "type" : "string",
          "maxLength" : 5,
          "minLength" : 1,
          "pattern" : "^(DRAFT|[0-9]{0,4}[1-9][0-9]{0,4})$",
          "description" : "Agent Version."
        }
      },
      "required" : [ "AgentVersion" ],
      "additionalProperties" : false
    },
    "AgentAliasStatus" : {
      "type" : "string",
      "description" : "The statuses an Agent Alias can be in.",
      "enum" : [ "CREATING", "PREPARED", "FAILED", "UPDATING", "DELETING" ]
    },
    "TagsMap" : {
      "type" : "object",
      "description" : "A map of tag keys and values",
      "patternProperties" : {
        "^[a-zA-Z0-9\\s._:/=+@-]*$" : {
          "type" : "string",
          "maxLength" : 256,
          "minLength" : 0,
          "pattern" : "^[a-zA-Z0-9\\s._:/=+@-]*$",
          "description" : "Value of a tag"
        }
      },
      "additionalProperties" : false
    }
  },
  "properties" : {
    "AgentAliasArn" : {
      "type" : "string",
      "maxLength" : 2048,
      "pattern" : "^arn:aws(|-cn|-us-gov):bedrock:[a-z0-9-]{1,20}:[0-9]{12}:agent-alias/[0-9a-zA-Z]{10}/[0-9a-zA-Z]{10}$",
      "description" : "Arn representation of the Agent Alias."
    },
    "AgentAliasHistoryEvents" : {
      "type" : "array",
      "items" : {
        "$ref" : "#/definitions/AgentAliasHistoryEvent"
      },
      "maxItems" : 10,
      "description" : "The list of history events for an alias for an Agent.",
      "insertionOrder" : false
    },
    "AgentAliasId" : {
      "type" : "string",
      "maxLength" : 10,
      "minLength" : 10,
      "pattern" : "^(\\bTSTALIASID\\b|[0-9a-zA-Z]+)$",
      "description" : "Id for an Agent Alias generated at the server side."
    },
    "AgentAliasName" : {
      "type" : "string",
      "pattern" : "^([0-9a-zA-Z][_-]?){1,100}$",
      "description" : "Name for a resource."
    },
    "AgentAliasStatus" : {
      "$ref" : "#/definitions/AgentAliasStatus"
    },
    "AgentId" : {
      "type" : "string",
      "pattern" : "^[0-9a-zA-Z]{10}$",
      "description" : "Identifier for a resource."
    },
    "CreatedAt" : {
      "type" : "string",
      "description" : "Time Stamp."
    },
    "Description" : {
      "type" : "string",
      "maxLength" : 200,
      "minLength" : 1,
      "description" : "Description of the Resource."
    },
    "RoutingConfiguration" : {
      "type" : "array",
      "items" : {
        "$ref" : "#/definitions/AgentAliasRoutingConfigurationListItem"
      },
      "maxItems" : 1,
      "description" : "Routing configuration for an Agent alias.",
      "insertionOrder" : false
    },
    "Tags" : {
      "$ref" : "#/definitions/TagsMap"
    },
    "UpdatedAt" : {
      "type" : "string",
      "description" : "Time Stamp."
    }
  },
  "required" : [ "AgentAliasName", "AgentId" ],
  "readOnlyProperties" : [ "/properties/AgentAliasArn", "/properties/AgentAliasHistoryEvents", "/properties/AgentAliasId", "/properties/AgentAliasStatus", "/properties/CreatedAt", "/properties/UpdatedAt" ],
  "createOnlyProperties" : [ "/properties/AgentId" ],
  "primaryIdentifier" : [ "/properties/AgentId", "/properties/AgentAliasId" ],
  "additionalIdentifiers" : [ [ "/properties/AgentAliasArn" ] ],
  "handlers" : {
    "create" : {
      "permissions" : [ "bedrock:PrepareAgent", "bedrock:GetAgent", "bedrock:CreateAgentAlias", "bedrock:TagResource", "bedrock:GetAgentAlias", "bedrock:ListTagsForResource" ]
    },
    "read" : {
      "permissions" : [ "bedrock:GetAgentAlias", "bedrock:ListTagsForResource" ]
    },
    "update" : {
      "permissions" : [ "bedrock:PrepareAgent", "bedrock:GetAgent", "bedrock:UpdateAgentAlias", "bedrock:TagResource", "bedrock:UntagResource", "bedrock:GetAgentAlias", "bedrock:ListTagsForResource" ]
    },
    "delete" : {
      "permissions" : [ "bedrock:DeleteAgentAlias" ]
    },
    "list" : {
      "permissions" : [ "bedrock:ListAgentAliases" ],
      "handlerSchema" : {
        "properties" : {
          "AgentId" : {
            "$ref" : "resource-schema.json#/properties/AgentId"
          }
        },
        "required" : [ "AgentId" ]
      }
    }
  },
  "tagging" : {
    "cloudFormationSystemTags" : false,
    "tagOnCreate" : true,
    "tagProperty" : "/properties/Tags",
    "tagUpdatable" : true,
    "taggable" : true,
    "permissions" : [ "bedrock:TagResource", "bedrock:UntagResource", "bedrock:ListTagsForResource" ]
  },
  "additionalProperties" : false
}