{
  "typeName" : "AWS::ImageBuilder::InfrastructureConfiguration",
  "description" : "Resource schema for AWS::ImageBuilder::InfrastructureConfiguration",
  "sourceUrl" : "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-imagebuilder.git",
  "properties" : {
    "Arn" : {
      "description" : "The Amazon Resource Name (ARN) of the infrastructure configuration.",
      "type" : "string"
    },
    "Name" : {
      "description" : "The name of the infrastructure configuration.",
      "type" : "string"
    },
    "Description" : {
      "description" : "The description of the infrastructure configuration.",
      "type" : "string"
    },
    "InstanceTypes" : {
      "description" : "The instance types of the infrastructure configuration.",
      "type" : "array",
      "insertionOrder" : true,
      "items" : {
        "type" : "string"
      }
    },
    "SecurityGroupIds" : {
      "description" : "The security group IDs of the infrastructure configuration.",
      "type" : "array",
      "insertionOrder" : false,
      "items" : {
        "type" : "string"
      }
    },
    "Logging" : {
      "description" : "The logging configuration of the infrastructure configuration.",
      "$ref" : "#/definitions/Logging"
    },
    "SubnetId" : {
      "description" : "The subnet ID of the infrastructure configuration.",
      "type" : "string"
    },
    "KeyPair" : {
      "description" : "The EC2 key pair of the infrastructure configuration..",
      "type" : "string"
    },
    "TerminateInstanceOnFailure" : {
      "description" : "The terminate instance on failure configuration of the infrastructure configuration.",
      "type" : "boolean"
    },
    "InstanceProfileName" : {
      "description" : "The instance profile of the infrastructure configuration.",
      "type" : "string"
    },
    "InstanceMetadataOptions" : {
      "description" : "The instance metadata option settings for the infrastructure configuration.",
      "$ref" : "#/definitions/InstanceMetadataOptions"
    },
    "SnsTopicArn" : {
      "description" : "The SNS Topic Amazon Resource Name (ARN) of the infrastructure configuration.",
      "type" : "string"
    },
    "ResourceTags" : {
      "description" : "The tags attached to the resource created by Image Builder.",
      "type" : "object",
      "additionalProperties" : false,
      "patternProperties" : {
        ".{1,}" : {
          "type" : "string"
        }
      }
    },
    "Tags" : {
      "description" : "The tags associated with the component.",
      "type" : "object",
      "additionalProperties" : false,
      "patternProperties" : {
        ".{1,}" : {
          "type" : "string"
        }
      }
    }
  },
  "definitions" : {
    "TagMap" : {
      "description" : "TagMap",
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "TagKey" : {
          "description" : "TagKey",
          "type" : "string",
          "minLength" : 1,
          "maxLength" : 128
        },
        "TagValue" : {
          "description" : "TagValue",
          "type" : "string",
          "minLength" : 1,
          "maxLength" : 256
        }
      }
    },
    "Logging" : {
      "description" : "The logging configuration of the infrastructure configuration.",
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "S3Logs" : {
          "$ref" : "#/definitions/S3Logs"
        }
      }
    },
    "InstanceMetadataOptions" : {
      "description" : "The instance metadata option settings for the infrastructure configuration.",
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "HttpPutResponseHopLimit" : {
          "description" : "Limit the number of hops that an instance metadata request can traverse to reach its destination.",
          "type" : "integer"
        },
        "HttpTokens" : {
          "description" : "Indicates whether a signed token header is required for instance metadata retrieval requests. The values affect the response as follows: ",
          "type" : "string",
          "enum" : [ "required", "optional" ]
        }
      }
    },
    "S3Logs" : {
      "description" : "The S3 path in which to store the logs.",
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "S3BucketName" : {
          "description" : "S3BucketName",
          "type" : "string"
        },
        "S3KeyPrefix" : {
          "description" : "S3KeyPrefix",
          "type" : "string"
        }
      }
    }
  },
  "required" : [ "Name", "InstanceProfileName" ],
  "primaryIdentifier" : [ "/properties/Arn" ],
  "readOnlyProperties" : [ "/properties/Arn" ],
  "createOnlyProperties" : [ "/properties/Name" ],
  "handlers" : {
    "create" : {
      "permissions" : [ "iam:PassRole", "iam:GetRole", "iam:GetInstanceProfile", "iam:CreateServiceLinkedRole", "sns:Publish", "imagebuilder:TagResource", "imagebuilder:GetInfrastructureConfiguration", "imagebuilder:CreateInfrastructureConfiguration" ]
    },
    "update" : {
      "permissions" : [ "imagebuilder:GetInfrastructureConfiguration", "imagebuilder:UpdateInfrastructureConfiguration" ]
    },
    "read" : {
      "permissions" : [ "imagebuilder:GetInfrastructureConfiguration" ]
    },
    "delete" : {
      "permissions" : [ "imagebuilder:UnTagResource", "imagebuilder:GetInfrastructureConfiguration", "imagebuilder:DeleteInfrastructureConfiguration" ]
    },
    "list" : {
      "permissions" : [ "imagebuilder:ListInfrastructureConfigurations" ]
    }
  },
  "additionalProperties" : false
}