{
  "typeName" : "AWS::FIS::ExperimentTemplate",
  "description" : "Resource schema for AWS::FIS::ExperimentTemplate",
  "sourceUrl" : "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-fis.git",
  "definitions" : {
    "ExperimentTemplateId" : {
      "type" : "string"
    },
    "ExperimentTemplateDescription" : {
      "type" : "string",
      "description" : "A description for the experiment template.",
      "maxLength" : 512
    },
    "StopConditionSource" : {
      "type" : "string",
      "maxLength" : 64
    },
    "StopConditionValue" : {
      "type" : "string",
      "minLength" : 20,
      "maxLength" : 2048
    },
    "ExperimentTemplateStopCondition" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "Source" : {
          "$ref" : "#/definitions/StopConditionSource"
        },
        "Value" : {
          "$ref" : "#/definitions/StopConditionValue"
        }
      },
      "required" : [ "Source" ]
    },
    "ExperimentTemplateStopConditionList" : {
      "type" : "array",
      "description" : "One or more stop conditions.",
      "items" : {
        "$ref" : "#/definitions/ExperimentTemplateStopCondition"
      }
    },
    "ResourceType" : {
      "type" : "string",
      "description" : "The AWS resource type. The resource type must be supported for the specified action.",
      "maxLength" : 64
    },
    "ResourceArn" : {
      "type" : "string",
      "minLength" : 20,
      "maxLength" : 2048
    },
    "ResourceArnList" : {
      "type" : "array",
      "description" : "The Amazon Resource Names (ARNs) of the target resources.",
      "items" : {
        "$ref" : "#/definitions/ResourceArn"
      }
    },
    "ExperimentTemplateTargetSelectionMode" : {
      "type" : "string",
      "description" : "Scopes the identified resources to a specific number of the resources at random, or a percentage of the resources.",
      "maxLength" : 64
    },
    "ExperimentTemplateTargetFilterPath" : {
      "type" : "string",
      "description" : "The attribute path for the filter.",
      "maxLength" : 256
    },
    "ExperimentTemplateTargetFilterValue" : {
      "type" : "string",
      "maxLength" : 128
    },
    "ExperimentTemplateTargetFilterValues" : {
      "type" : "array",
      "description" : "The attribute values for the filter.",
      "items" : {
        "$ref" : "#/definitions/ExperimentTemplateTargetFilterValue"
      }
    },
    "ExperimentTemplateTargetFilter" : {
      "type" : "object",
      "description" : "Describes a filter used for the target resource input in an experiment template.",
      "additionalProperties" : false,
      "properties" : {
        "Path" : {
          "$ref" : "#/definitions/ExperimentTemplateTargetFilterPath"
        },
        "Values" : {
          "$ref" : "#/definitions/ExperimentTemplateTargetFilterValues"
        }
      },
      "required" : [ "Path", "Values" ]
    },
    "ExperimentTemplateTargetFilterList" : {
      "type" : "array",
      "items" : {
        "$ref" : "#/definitions/ExperimentTemplateTargetFilter"
      }
    },
    "ExperimentTemplateTarget" : {
      "type" : "object",
      "description" : "Specifies a target for an experiment.",
      "additionalProperties" : false,
      "properties" : {
        "ResourceType" : {
          "$ref" : "#/definitions/ResourceType"
        },
        "ResourceArns" : {
          "$ref" : "#/definitions/ResourceArnList"
        },
        "ResourceTags" : {
          "type" : "object",
          "patternProperties" : {
            ".{1,128}" : {
              "type" : "string",
              "maxLength" : 256
            }
          },
          "additionalProperties" : false
        },
        "Parameters" : {
          "type" : "object",
          "patternProperties" : {
            ".{1,64}" : {
              "type" : "string",
              "maxLength" : 1024
            }
          },
          "additionalProperties" : false
        },
        "Filters" : {
          "$ref" : "#/definitions/ExperimentTemplateTargetFilterList"
        },
        "SelectionMode" : {
          "$ref" : "#/definitions/ExperimentTemplateTargetSelectionMode"
        }
      },
      "required" : [ "ResourceType", "SelectionMode" ]
    },
    "ExperimentTemplateTargetMap" : {
      "type" : "object",
      "description" : "The targets for the experiment.",
      "patternProperties" : {
        ".{1,64}" : {
          "$ref" : "#/definitions/ExperimentTemplateTarget"
        }
      },
      "additionalProperties" : false
    },
    "ActionId" : {
      "type" : "string",
      "description" : "The ID of the action.",
      "maxLength" : 64
    },
    "ExperimentTemplateActionItemDescription" : {
      "type" : "string",
      "description" : "A description for the action.",
      "maxLength" : 512
    },
    "ExperimentTemplateActionItemParameter" : {
      "type" : "string",
      "maxLength" : 1024
    },
    "ExperimentTemplateActionItemTarget" : {
      "type" : "string",
      "maxLength" : 64
    },
    "ExperimentTemplateActionItemStartAfter" : {
      "type" : "string",
      "maxLength" : 64
    },
    "ExperimentTemplateActionItemStartAfterList" : {
      "type" : "array",
      "description" : "The names of the actions that must be completed before the current action starts.",
      "items" : {
        "$ref" : "#/definitions/ExperimentTemplateActionItemStartAfter"
      }
    },
    "ExperimentTemplateAction" : {
      "type" : "object",
      "description" : "Specifies an action for the experiment template.",
      "additionalProperties" : false,
      "properties" : {
        "ActionId" : {
          "$ref" : "#/definitions/ActionId"
        },
        "Description" : {
          "$ref" : "#/definitions/ExperimentTemplateActionItemDescription"
        },
        "Parameters" : {
          "type" : "object",
          "description" : "The parameters for the action, if applicable.",
          "patternProperties" : {
            ".{1,64}" : {
              "$ref" : "#/definitions/ExperimentTemplateActionItemParameter"
            }
          },
          "additionalProperties" : false
        },
        "Targets" : {
          "type" : "object",
          "description" : "One or more targets for the action.",
          "patternProperties" : {
            ".{1,64}" : {
              "$ref" : "#/definitions/ExperimentTemplateActionItemTarget"
            }
          },
          "additionalProperties" : false
        },
        "StartAfter" : {
          "$ref" : "#/definitions/ExperimentTemplateActionItemStartAfterList"
        }
      },
      "required" : [ "ActionId" ]
    },
    "ExperimentTemplateActionMap" : {
      "type" : "object",
      "description" : "The actions for the experiment.",
      "patternProperties" : {
        "[\\S]{1,64}" : {
          "$ref" : "#/definitions/ExperimentTemplateAction"
        }
      },
      "additionalProperties" : false
    },
    "ExperimentTemplateLogConfiguration" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "CloudWatchLogsConfiguration" : {
          "type" : "object",
          "additionalProperties" : false,
          "properties" : {
            "LogGroupArn" : {
              "type" : "string",
              "minLength" : 20,
              "maxLength" : 2048
            }
          },
          "required" : [ "LogGroupArn" ]
        },
        "S3Configuration" : {
          "type" : "object",
          "additionalProperties" : false,
          "properties" : {
            "BucketName" : {
              "type" : "string",
              "minLength" : 3,
              "maxLength" : 63
            },
            "Prefix" : {
              "type" : "string",
              "minLength" : 1,
              "maxLength" : 1024
            }
          },
          "required" : [ "BucketName" ]
        },
        "LogSchemaVersion" : {
          "type" : "integer",
          "minimum" : 1
        }
      },
      "required" : [ "LogSchemaVersion" ]
    },
    "RoleArn" : {
      "type" : "string",
      "description" : "The Amazon Resource Name (ARN) of an IAM role that grants the AWS FIS service permission to perform service actions on your behalf.",
      "maxLength" : 1224
    }
  },
  "properties" : {
    "Id" : {
      "$ref" : "#/definitions/ExperimentTemplateId"
    },
    "Description" : {
      "$ref" : "#/definitions/ExperimentTemplateDescription"
    },
    "Targets" : {
      "$ref" : "#/definitions/ExperimentTemplateTargetMap"
    },
    "Actions" : {
      "$ref" : "#/definitions/ExperimentTemplateActionMap"
    },
    "StopConditions" : {
      "$ref" : "#/definitions/ExperimentTemplateStopConditionList"
    },
    "LogConfiguration" : {
      "$ref" : "#/definitions/ExperimentTemplateLogConfiguration"
    },
    "RoleArn" : {
      "$ref" : "#/definitions/RoleArn"
    },
    "Tags" : {
      "type" : "object",
      "patternProperties" : {
        ".{1,128}" : {
          "type" : "string",
          "maxLength" : 256
        }
      },
      "additionalProperties" : false
    }
  },
  "additionalProperties" : false,
  "required" : [ "Description", "StopConditions", "Targets", "RoleArn", "Tags" ],
  "readOnlyProperties" : [ "/properties/Id" ],
  "createOnlyProperties" : [ "/properties/Tags" ],
  "primaryIdentifier" : [ "/properties/Id" ],
  "handlers" : {
    "create" : {
      "permissions" : [ "fis:CreateExperimentTemplate" ]
    },
    "read" : {
      "permissions" : [ "fis:GetExperimentTemplate" ]
    },
    "update" : {
      "permissions" : [ "fis:UpdateExperimentTemplate" ]
    },
    "delete" : {
      "permissions" : [ "fis:DeleteExperimentTemplate" ]
    },
    "list" : {
      "permissions" : [ "fis:ListExperimentTemplates" ]
    }
  }
}