{
  "typeName" : "AWS::ElasticBeanstalk::ConfigurationTemplate",
  "description" : "Resource Type definition for AWS::ElasticBeanstalk::ConfigurationTemplate",
  "sourceUrl" : "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-elasticbeanstalk.git",
  "$schema" : "https://raw.githubusercontent.com/aws-cloudformation/cloudformation-resource-schema/master/src/main/resources/schema/provider.definition.schema.v1.json",
  "additionalProperties" : false,
  "definitions" : {
    "SourceConfiguration" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "ApplicationName" : {
          "description" : "The name of the application associated with the configuration.",
          "type" : "string"
        },
        "TemplateName" : {
          "description" : "The name of the configuration template.",
          "type" : "string"
        }
      },
      "required" : [ "TemplateName", "ApplicationName" ]
    },
    "ConfigurationOptionSetting" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "Namespace" : {
          "description" : "A unique namespace that identifies the option's associated AWS resource.",
          "type" : "string"
        },
        "OptionName" : {
          "description" : "The name of the configuration option.",
          "type" : "string"
        },
        "ResourceName" : {
          "description" : "A unique resource name for the option setting. Use it for a time–based scaling configuration option. ",
          "type" : "string"
        },
        "Value" : {
          "description" : "The current value for the configuration option.",
          "type" : "string"
        }
      },
      "required" : [ "Namespace", "OptionName" ]
    }
  },
  "properties" : {
    "ApplicationName" : {
      "description" : "The name of the Elastic Beanstalk application to associate with this configuration template. ",
      "type" : "string"
    },
    "Description" : {
      "description" : "An optional description for this configuration.",
      "type" : "string"
    },
    "EnvironmentId" : {
      "description" : "The ID of an environment whose settings you want to use to create the configuration template. You must specify EnvironmentId if you don't specify PlatformArn, SolutionStackName, or SourceConfiguration. ",
      "type" : "string"
    },
    "OptionSettings" : {
      "description" : "Option values for the Elastic Beanstalk configuration, such as the instance type. If specified, these values override the values obtained from the solution stack or the source configuration template. For a complete list of Elastic Beanstalk configuration options, see [Option Values](https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-options.html) in the AWS Elastic Beanstalk Developer Guide. ",
      "type" : "array",
      "arrayType" : "AttributeList",
      "uniqueItems" : false,
      "insertionOrder" : false,
      "items" : {
        "$ref" : "#/definitions/ConfigurationOptionSetting"
      }
    },
    "PlatformArn" : {
      "description" : "The Amazon Resource Name (ARN) of the custom platform. For more information, see [Custom Platforms](https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/custom-platforms.html) in the AWS Elastic Beanstalk Developer Guide. ",
      "type" : "string"
    },
    "SolutionStackName" : {
      "description" : "The name of an Elastic Beanstalk solution stack (platform version) that this configuration uses. For example, 64bit Amazon Linux 2013.09 running Tomcat 7 Java 7. A solution stack specifies the operating system, runtime, and application server for a configuration template. It also determines the set of configuration options as well as the possible and default values. For more information, see [Supported Platforms](https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/concepts.platforms.html) in the AWS Elastic Beanstalk Developer Guide.\n\n You must specify SolutionStackName if you don't specify PlatformArn, EnvironmentId, or SourceConfiguration.\n\n Use the ListAvailableSolutionStacks API to obtain a list of available solution stacks. ",
      "type" : "string"
    },
    "SourceConfiguration" : {
      "description" : "An Elastic Beanstalk configuration template to base this one on. If specified, Elastic Beanstalk uses the configuration values from the specified configuration template to create a new configuration.\n\nValues specified in OptionSettings override any values obtained from the SourceConfiguration.\n\nYou must specify SourceConfiguration if you don't specify PlatformArn, EnvironmentId, or SolutionStackName.\n\nConstraint: If both solution stack name and source configuration are specified, the solution stack of the source configuration template must match the specified solution stack name. ",
      "$ref" : "#/definitions/SourceConfiguration"
    },
    "TemplateName" : {
      "description" : "The name of the configuration template",
      "type" : "string"
    }
  },
  "required" : [ "ApplicationName" ],
  "tagging" : {
    "taggable" : false
  },
  "createOnlyProperties" : [ "/properties/ApplicationName", "/properties/EnvironmentId", "/properties/PlatformArn", "/properties/SolutionStackName", "/properties/SourceConfiguration" ],
  "primaryIdentifier" : [ "/properties/ApplicationName", "/properties/TemplateName" ],
  "readOnlyProperties" : [ "/properties/TemplateName" ],
  "writeOnlyProperties" : [ "/properties/EnvironmentId", "/properties/SourceConfiguration/ApplicationName", "/properties/SourceConfiguration/TemplateName" ],
  "handlers" : {
    "create" : {
      "permissions" : [ "elasticbeanstalk:CreateConfigurationTemplate", "s3:CreateBucket", "s3:PutBucketAcl", "s3:PutBucketObjectLockConfiguration", "s3:PutBucketVersioning", "s3:PutBucketOwnershipControls", "s3:PutBucketPolicy", "s3:PutBucketPublicAccessBlock", "s3:PutObject", "s3:ListBucket", "s3:GetObject", "s3:GetBucketLocation", "s3:GetBucketPolicy", "ec2:DescribeImages", "ec2:CreateLaunchTemplate" ]
    },
    "read" : {
      "permissions" : [ "elasticbeanstalk:DescribeConfigurationSettings", "ec2:CreateLaunchTemplate", "s3:ListBucket", "s3:GetObject", "s3:GetBucketLocation", "s3:GetBucketPolicy" ]
    },
    "update" : {
      "permissions" : [ "elasticbeanstalk:UpdateConfigurationTemplate", "ec2:CreateLaunchTemplate", "s3:PutObject", "s3:ListBucket", "s3:GetObject", "s3:GetBucketLocation", "s3:GetBucketPolicy", "ec2:DescribeImages" ]
    },
    "delete" : {
      "permissions" : [ "elasticbeanstalk:DeleteConfigurationTemplate", "elasticbeanstalk:DescribeConfigurationSettings", "ec2:CreateLaunchTemplate", "s3:ListBucket", "s3:GetObject", "s3:GetBucketLocation", "s3:GetBucketPolicy", "s3:DeleteObject" ]
    },
    "list" : {
      "permissions" : [ "elasticbeanstalk:DescribeApplications" ]
    }
  }
}