{
  "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"
        }
      }
    },
    "Placement" : {
      "description" : "The placement option settings for the infrastructure configuration.",
      "$ref" : "#/definitions/Placement"
    }
  },
  "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"
        }
      }
    },
    "Placement" : {
      "description" : "The placement options",
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "AvailabilityZone" : {
          "description" : "AvailabilityZone",
          "type" : "string"
        },
        "Tenancy" : {
          "description" : "Tenancy",
          "type" : "string",
          "enum" : [ "default", "dedicated", "host" ]
        },
        "HostId" : {
          "description" : "HostId",
          "type" : "string"
        },
        "HostResourceGroupArn" : {
          "description" : "HostResourceGroupArn",
          "type" : "string"
        }
      }
    }
  },
  "required" : [ "Name", "InstanceProfileName" ],
  "primaryIdentifier" : [ "/properties/Arn" ],
  "readOnlyProperties" : [ "/properties/Arn" ],
  "createOnlyProperties" : [ "/properties/Name" ],
  "tagging" : {
    "taggable" : true,
    "tagOnCreate" : true,
    "tagUpdatable" : true,
    "cloudFormationSystemTags" : true,
    "tagProperty" : "/properties/Tags",
    "permissions" : [ "imagebuilder:TagResource", "imagebuilder:UntagResource" ]
  },
  "handlers" : {
    "create" : {
      "permissions" : [ "iam:PassRole", "iam:GetRole", "iam:GetInstanceProfile", "iam:CreateServiceLinkedRole", "sns:Publish", "imagebuilder:TagResource", "imagebuilder:GetInfrastructureConfiguration", "imagebuilder:CreateInfrastructureConfiguration" ]
    },
    "update" : {
      "permissions" : [ "iam:PassRole", "sns:Publish", "imagebuilder:GetInfrastructureConfiguration", "imagebuilder:UpdateInfrastructureConfiguration", "imagebuilder:TagResource", "imagebuilder:UntagResource" ]
    },
    "read" : {
      "permissions" : [ "imagebuilder:GetInfrastructureConfiguration" ]
    },
    "delete" : {
      "permissions" : [ "imagebuilder:UntagResource", "imagebuilder:GetInfrastructureConfiguration", "imagebuilder:DeleteInfrastructureConfiguration" ]
    },
    "list" : {
      "permissions" : [ "imagebuilder:ListInfrastructureConfigurations" ]
    }
  },
  "additionalProperties" : false
}