{
  "typeName" : "AWS::GameLift::Alias",
  "description" : "The AWS::GameLift::Alias resource creates an alias for an Amazon GameLift (GameLift) fleet destination.",
  "sourceUrl" : "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-gamelift.git",
  "definitions" : {
    "RoutingStrategy" : {
      "type" : "object",
      "properties" : {
        "Message" : {
          "description" : "The message text to be used with a terminal routing strategy. If you specify TERMINAL for the Type property, you must specify this property.",
          "type" : "string"
        },
        "FleetId" : {
          "description" : "A unique identifier for a fleet that the alias points to. If you specify SIMPLE for the Type property, you must specify this property.",
          "type" : "string",
          "pattern" : "^fleet-\\S+"
        },
        "Type" : {
          "description" : "Simple routing strategy. The alias resolves to one specific fleet. Use this type when routing to active fleets.",
          "type" : "string",
          "enum" : [ "SIMPLE", "TERMINAL" ]
        }
      },
      "additionalProperties" : false,
      "required" : [ "Type" ],
      "anyOf" : [ {
        "required" : [ "FleetId" ]
      }, {
        "required" : [ "Message" ]
      } ]
    }
  },
  "properties" : {
    "Description" : {
      "description" : "A human-readable description of the alias.",
      "type" : "string",
      "minLength" : 1,
      "maxLength" : 1024
    },
    "Name" : {
      "description" : "A descriptive label that is associated with an alias. Alias names do not need to be unique.",
      "type" : "string",
      "minLength" : 1,
      "maxLength" : 1024,
      "pattern" : ".*\\S.*"
    },
    "RoutingStrategy" : {
      "description" : "A routing configuration that specifies where traffic is directed for this alias, such as to a fleet or to a message.",
      "$ref" : "#/definitions/RoutingStrategy"
    },
    "AliasId" : {
      "description" : "Unique alias ID",
      "type" : "string"
    }
  },
  "additionalProperties" : false,
  "required" : [ "Name", "RoutingStrategy" ],
  "readOnlyProperties" : [ "/properties/AliasId" ],
  "primaryIdentifier" : [ "/properties/AliasId" ],
  "handlers" : {
    "create" : {
      "permissions" : [ "gamelift:CreateAlias" ]
    },
    "read" : {
      "permissions" : [ "gamelift:DescribeAlias" ]
    },
    "update" : {
      "permissions" : [ "gamelift:UpdateAlias" ]
    },
    "delete" : {
      "permissions" : [ "gamelift:DeleteAlias" ]
    },
    "list" : {
      "permissions" : [ "gamelift:ListAliases" ]
    }
  },
  "taggable" : true
}