{
  "version":"2.0",
  "metadata":{
    "apiVersion":"2017-12-15",
    "endpointPrefix":"imagebuild.marketplace",
    "jsonVersion":"1.1",
    "protocol":"json",
    "serviceAbbreviation":"Marketplace Image Build",
    "serviceFullName":"AWS Marketplace Image Build Service",
    "serviceId":"Marketplace Image Build",
    "signatureVersion":"v4",
    "signingName":"aws-marketplace",
    "targetPrefix":"AWSMPImageBuilding",
    "uid":"marketplaceimagebuild-2017-12-15"
  },
  "operations":{
    "DescribeBuilds":{
      "name":"DescribeBuilds",
      "http":{
        "method":"POST",
        "requestUri":"/"
      },
      "input":{"shape":"DescribeBuildsRequest"},
      "output":{"shape":"DescribeBuildsResult"},
      "errors":[
        {"shape":"InternalServerErrorException"},
        {"shape":"InvalidBuildIdException"},
        {"shape":"BuildIdNotFoundException"}
      ],
      "documentation":"<p>Retrieves information about all build records associated with the input build identifiers. Maximum number of build identifiers in an API call is 50.</p>"
    },
    "ListBuilds":{
      "name":"ListBuilds",
      "http":{
        "method":"POST",
        "requestUri":"/"
      },
      "input":{"shape":"ListBuildsRequest"},
      "output":{"shape":"ListBuildsResult"},
      "errors":[
        {"shape":"InternalServerErrorException"},
        {"shape":"InvalidNextTokenException"},
        {"shape":"InvalidMaxResultsException"},
        {"shape":"InvalidFilterException"}
      ],
      "documentation":"<p>Retrieves information about build records for all builds associated with the AWS account in use, including the status, description, and identifier of the resulting AMI. The results are in descending order of creation time. You can filter results by fulfillment option identifier. Use the pagination parameters to retrieve results in a set of sequential pages. You can only retrieve information about builds you own.</p>"
    },
    "StartBuild":{
      "name":"StartBuild",
      "http":{
        "method":"POST",
        "requestUri":"/"
      },
      "input":{"shape":"StartBuildRequest"},
      "output":{"shape":"StartBuildResult"},
      "errors":[
        {"shape":"InternalServerErrorException"},
        {"shape":"BuildLimitExceededException"},
        {"shape":"IdempotentParameterMismatchException"},
        {"shape":"InstallerMismatchException"},
        {"shape":"InvalidFulfillmentOptionIdException"},
        {"shape":"InvalidInstallationLogBucketException"},
        {"shape":"InvalidSnsTopicArnException"},
        {"shape":"InvalidSubnetException"},
        {"shape":"InvalidSecurityGroupException"},
        {"shape":"VPCMismatchException"},
        {"shape":"InvalidInstanceTypeException"},
        {"shape":"SubscriptionNotFoundException"},
        {"shape":"InvalidRoleException"},
        {"shape":"InvalidInstanceProfileException"},
        {"shape":"UnauthorizedOperationException"},
        {"shape":"InvalidInputImageIdException"},
        {"shape":"InvalidImageNameException"},
        {"shape":"InvalidImageDescriptionException"},
        {"shape":"InvalidImageTagsException"}
      ],
      "documentation":"<p>Initiates a build that installs the specified AWS Marketplace product on the source AMI, creating a new AMI in the same region.</p>"
    }
  },
  "shapes":{
    "Build":{
      "type":"structure",
      "members":{
        "BuildId":{
          "shape":"String",
          "documentation":"<p>The unique identifier for a build.</p>"
        },
        "InputImage":{
          "shape":"SourceImage",
          "documentation":"<p>The details about the existing source image to install the software product on.</p>"
        },
        "BuildAutomationId":{
          "shape":"String",
          "documentation":"<p>The SSM Automation Id associated with the build workflow.</p>"
        },
        "InputFulfillmentOptions":{
          "shape":"InputFulfillmentOptionList",
          "documentation":"<p>The list of fulfillment option identifiers of AWS Marketplace software products with the corresponding product title and version to install on the image. They need to be retrieved from the AWS Marketplace website.</p>"
        },
        "InputSnsTopicArn":{
          "shape":"String",
          "documentation":"<p>The full ARN of the Amazon SNS topic that will be notified when the build status changes.</p>"
        },
        "OutputInstallationLogS3BucketName":{
          "shape":"String",
          "documentation":"<p>The name of the Amazon S3 bucket where logs will be placed.</p>"
        },
        "OutputImage":{
          "shape":"OutputImage",
          "documentation":"<p>The identifier, name, and description of the new image to be created in the same AWS Region.</p>"
        },
        "Status":{
          "shape":"BuildStatus",
          "documentation":"<p>The current status of the build.</p>"
        },
        "StandardOutputUrl":{
          "shape":"String",
          "documentation":"<p>The Amazon S3 URL to the logs that the installer outputs on STDOUT during the install process.</p>"
        },
        "StandardErrorUrl":{
          "shape":"String",
          "documentation":"<p>The Amazon S3 URL to the the logs that the installer outputs on STDERR during the install process.</p>"
        },
        "ErrorDetail":{
          "shape":"ErrorDetail",
          "documentation":"<p>The container for the error code and error message.</p>"
        },
        "StartTime":{
          "shape":"DateTime",
          "documentation":"<p>The time stamp indicating when the build was created, in ISO 8601 format.</p>"
        },
        "LastUpdateTime":{
          "shape":"DateTime",
          "documentation":"<p>The time stamp indicating when the build was last updated, in ISO 8601 format.</p>"
        }
      },
      "documentation":"<p>The container for the properties describing each build that meets the filter requirements.</p>"
    },
    "BuildIdNotFoundException":{
      "type":"structure",
      "members":{
        "Message":{"shape":"String"}
      },
      "documentation":"<p> The input build identifier isn't found. </p>",
      "exception":true
    },
    "BuildLimitExceededException":{
      "type":"structure",
      "members":{
        "Message":{"shape":"String"}
      },
      "documentation":"<p>The maximum number of concurrent builds has been exceeded.</p>",
      "exception":true
    },
    "BuildList":{
      "type":"list",
      "member":{"shape":"Build"}
    },
    "BuildStatus":{
      "type":"string",
      "enum":[
        "InProgress",
        "InternalError",
        "Failed",
        "Succeeded"
      ]
    },
    "CustomTags":{
      "type":"map",
      "key":{"shape":"String"},
      "value":{"shape":"String"}
    },
    "DateTime":{"type":"timestamp"},
    "DescribeBuildsRequest":{
      "type":"structure",
      "required":["BuildIds"],
      "members":{
        "BuildIds":{
          "shape":"StringList",
          "documentation":"<p>The list of build identifiers to the <code>DescribeBuilds</code> operation. The API returns a list of build details in the order of the build identifiers.</p>"
        }
      },
      "documentation":"<p>The container for request parameters to the <code>DescribeBuilds</code> operation.</p>"
    },
    "DescribeBuildsResult":{
      "type":"structure",
      "members":{
        "Builds":{
          "shape":"BuildList",
          "documentation":"<p>The list of builds, holding properties that describe each build that meets the filter requirements.</p>"
        }
      }
    },
    "ErrorDetail":{
      "type":"structure",
      "members":{
        "ErrorCode":{
          "shape":"String",
          "documentation":"<p>Error code is the exception/error-code returned by an API in the build workflow.</p>"
        },
        "StatusCode":{
          "shape":"String",
          "documentation":"<p>HTTP status code returned by the AWS service.</p>"
        },
        "Message":{
          "shape":"String",
          "documentation":"<p>The message that provides details about the error.</p>"
        },
        "ServiceName":{
          "shape":"String",
          "documentation":"<p>Name of the AWS Service that returned an error response</p>"
        },
        "Operation":{
          "shape":"String",
          "documentation":"<p>API name that returned error response</p>"
        }
      },
      "documentation":"<p>The container for the error code and error message.</p>"
    },
    "Filter":{
      "type":"structure",
      "members":{
        "Name":{
          "shape":"String",
          "documentation":"<p>The name of the filter. Filter names are case sensitive.</p>"
        },
        "Values":{
          "shape":"StringList",
          "documentation":"<p>One or more filter values. Filter values are case sensitive.</p>"
        }
      },
      "documentation":"<p>The filter name and value pair that is used to return a more specific list of results. You can use filters to match a set of resources by various criteria, such as tags, attributes, or identifiers.</p>"
    },
    "FilterList":{
      "type":"list",
      "member":{"shape":"Filter"}
    },
    "IdempotentParameterMismatchException":{
      "type":"structure",
      "members":{
        "Message":{"shape":"String"}
      },
      "documentation":"<p>The same <code>ClientToken</code> is being used for a nonidentical request.</p>",
      "exception":true
    },
    "ImageDescription":{
      "type":"string",
      "max":255,
      "min":0
    },
    "InputFulfillmentOption":{
      "type":"structure",
      "members":{
        "Id":{
          "shape":"String",
          "documentation":"<p>The fulfillment option identifier of the product.</p>"
        },
        "Product":{"shape":"Product"}
      },
      "documentation":"<p>A container for details of the fulfillment options.</p>"
    },
    "InputFulfillmentOptionList":{
      "type":"list",
      "member":{"shape":"InputFulfillmentOption"}
    },
    "InstallerMismatchException":{
      "type":"structure",
      "members":{
        "Message":{"shape":"String"}
      },
      "documentation":"<p> The extension of the package installer is incompatible with the operating system of the source image. For example, <code>.sh</code> is incompatible with Windows, and <code>.exe</code> is incompatible with Linux. </p>",
      "exception":true
    },
    "InternalServerErrorException":{
      "type":"structure",
      "members":{
        "Message":{"shape":"String"}
      },
      "documentation":"<p>The request failed because of an internal server error.</p>",
      "exception":true,
      "fault":true
    },
    "InvalidBuildIdException":{
      "type":"structure",
      "members":{
        "Message":{"shape":"String"}
      },
      "documentation":"<p> The <code>BuildId</code> list violates any of the following conditions: </p> <ul> <li> <p>There are duplicate <code>BuildId</code> entries.</p> </li> <li> <p>The number of <code>BuildId</code> entries is not between 1 and 50.</p> </li> </ul>",
      "exception":true
    },
    "InvalidFilterException":{
      "type":"structure",
      "members":{
        "Message":{"shape":"String"}
      },
      "documentation":"<p> The provided filter name or value is invalid. A valid filter must be one of the following: <code>BuildId</code>, <code>FulfillmentOptionId</code>, <code>ProductId</code>, and <code>Status</code>. The filter name can't be empty. Values for <code>BuildId</code> can't be empty. </p>",
      "exception":true
    },
    "InvalidFulfillmentOptionIdException":{
      "type":"structure",
      "members":{
        "Message":{"shape":"String"}
      },
      "documentation":"<p> <code>FulfillmentOptionId</code> meets any of the following conditions:</p> <ul> <li> <p>It has a length of 0</p> </li> <li> <p>It has a length of greater than 1024</p> </li> <li> <p>It isn't found</p> </li> <li> <p>It isn't available in the AWS Region</p> </li> </ul>",
      "exception":true
    },
    "InvalidImageDescriptionException":{
      "type":"structure",
      "members":{
        "Message":{"shape":"String"}
      },
      "documentation":"<p> The length of the description is greater than 255 characters. </p>",
      "exception":true
    },
    "InvalidImageNameException":{
      "type":"structure",
      "members":{
        "Message":{"shape":"String"}
      },
      "documentation":"<p> <code>OutputImageName</code> is null, or the AMI name is invalid. AMI names must be between 3 and 128 characters long and can contain letters, numbers, '(', ')', '.', '-', '/', and '_'. </p>",
      "exception":true
    },
    "InvalidImageTagsException":{
      "type":"structure",
      "members":{
        "Message":{"shape":"String"}
      },
      "documentation":"<p> The output image tags aren't valid. For more information, see <a href=\"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html#tag-restrictions\">Tag Restrictions</a> in the <i>Amazon Elastic Compute Cloud User Guide for Linux Instances</i>. </p>",
      "exception":true
    },
    "InvalidInputImageIdException":{
      "type":"structure",
      "members":{
        "Message":{"shape":"String"}
      },
      "documentation":"<p> Any of the following conditions is true:</p> <ul> <li> <p> <code>InputImageId</code> is missing from the request</p> </li> <li> <p> <code>InputImageId</code> isn't in the form of <code>ami-xxxxxxxx</code> </p> </li> <li> <p> <code>InputImageId</code> isn't found in Amazon EC2 in the AWS Region</p> </li> <li> <p> <code>InputImage</code> contains a <code>ProductCode</code> of type <code>Marketplace</code> </p> </li> </ul>",
      "exception":true
    },
    "InvalidInstallationLogBucketException":{
      "type":"structure",
      "members":{
        "Message":{"shape":"String"}
      },
      "documentation":"<p> The input Amazon S3 bucket isn't found in the customer account in the AWS Region. </p>",
      "exception":true
    },
    "InvalidInstanceProfileException":{
      "type":"structure",
      "members":{
        "Message":{"shape":"String"}
      },
      "documentation":"<p> The input instance profile isn't found in the customer account. </p>",
      "exception":true
    },
    "InvalidInstanceTypeException":{
      "type":"structure",
      "members":{
        "Message":{"shape":"String"}
      },
      "documentation":"<p> The instance type parameter isn't a supported instance type. For the list of supported instance types for the product in the AWS Region, the product page on AWS Marketplace website. </p>",
      "exception":true
    },
    "InvalidMaxResultsException":{
      "type":"structure",
      "members":{
        "Message":{"shape":"String"}
      },
      "documentation":"<p>The specified value for the maximum number of results to be returned isn't valid.</p>",
      "exception":true
    },
    "InvalidNextTokenException":{
      "type":"structure",
      "members":{
        "Message":{"shape":"String"}
      },
      "documentation":"<p> <code>NextToken</code> meets any of the following conditions:</p> <ul> <li> <p>It has a length is 0</p> </li> <li> <p>It has a length is greater than 1024</p> </li> <li> <p>It contains unexpected attributes</p> </li> <li> <p>It is malformed</p> </li> <li> <p>It is expired</p> </li> </ul>",
      "exception":true
    },
    "InvalidRoleException":{
      "type":"structure",
      "members":{
        "Message":{"shape":"String"}
      },
      "documentation":"<p> The automation role that the user provided isn't found. </p>",
      "exception":true
    },
    "InvalidSecurityGroupException":{
      "type":"structure",
      "members":{
        "Message":{"shape":"String"}
      },
      "documentation":"<p> The provided <code>SecurityGroup</code> doesn't exist in the AWS Region. </p>",
      "exception":true
    },
    "InvalidSnsTopicArnException":{
      "type":"structure",
      "members":{
        "Message":{"shape":"String"}
      },
      "documentation":"<p> The ARN of the specified Amazon SNS topic doesn't exist in the AWS Region. </p>",
      "exception":true
    },
    "InvalidSubnetException":{
      "type":"structure",
      "members":{
        "Message":{"shape":"String"}
      },
      "documentation":"<p> The provided <code>SubnetId</code> doesn't exist in the AWS Region. </p>",
      "exception":true
    },
    "ListBuildsRequest":{
      "type":"structure",
      "members":{
        "NextToken":{
          "shape":"NextToken",
          "documentation":"<p>(Optional) The token that indicates the start of the next sequential page of results. Use the token that is returned with a previous call to this operation. To specify the start of the result set, don't specify a value.</p>"
        },
        "MaxResults":{
          "shape":"MaxResults",
          "documentation":"<p> The maximum number of builds to be returned in one page. </p>"
        },
        "Filters":{
          "shape":"FilterList",
          "documentation":"<p> The list of filters to get the details of the builds that satisfy the filter condition. Currently only one filter, <code>FulfillmentOptionId</code>, is supported. You can filter on only one fulfillment option at a time. </p>"
        }
      },
      "documentation":"<p>The container for request parameters to the <code>DescribeBuilds</code> operation.</p>"
    },
    "ListBuildsResult":{
      "type":"structure",
      "members":{
        "NextToken":{
          "shape":"NextToken",
          "documentation":"<p>The token to be used as input to the next <code>ListBuildsRequest</code> to get the next page of results.</p>"
        },
        "Builds":{
          "shape":"BuildList",
          "documentation":"<p>The list of builds, holding properties that describe each build that meets the filter requirements.</p>"
        }
      }
    },
    "MaxResults":{
      "type":"integer",
      "max":256,
      "min":0
    },
    "NextToken":{
      "type":"string",
      "max":1024,
      "min":1
    },
    "OutputImage":{
      "type":"structure",
      "members":{
        "Id":{
          "shape":"String",
          "documentation":"<p>The image identifier of the output image created by the <code>StartBuild</code> operation.</p>"
        },
        "Description":{
          "shape":"String",
          "documentation":"<p>The description of the output image created by the <code>StartBuild</code> operation.</p>"
        },
        "Name":{
          "shape":"String",
          "documentation":"<p>The name of the output image created by the <code>StartBuild</code> operation.</p>"
        }
      },
      "documentation":"<p>The details of the output image created by the <code>StartBuild</code> operation.</p>"
    },
    "Product":{
      "type":"structure",
      "members":{
        "Version":{
          "shape":"String",
          "documentation":"<p>The version of the AWS Marketplace software product to install on the image. AWS Marketplace populates this structure.</p>"
        },
        "Title":{
          "shape":"String",
          "documentation":"<p>The title of the AWS Marketplace software product to install on the image. AWS Marketplace populates this structure.</p>"
        }
      },
      "documentation":"<p>The details about the AWS Marketplace software product to install on the image. AWS Marketplace populates this structure.</p>"
    },
    "SourceImage":{
      "type":"structure",
      "members":{
        "Id":{
          "shape":"String",
          "documentation":"<p>The identifier of the existing source image.</p>"
        },
        "Name":{
          "shape":"String",
          "documentation":"<p>The name of the existing source image.</p>"
        }
      },
      "documentation":"<p>The details about the existing source image to install the software product on.</p>"
    },
    "StartBuildRequest":{
      "type":"structure",
      "required":[
        "InputFulfillmentOptionIds",
        "InputImageId",
        "OutputImageName",
        "OutputInstallationLogS3BucketName",
        "InputAutomationRoleName",
        "InputInstanceProfileName"
      ],
      "members":{
        "ClientToken":{
          "shape":"String",
          "documentation":"<p>(Optional) The unique, case-sensitive identifier that you provide to ensure idempotency of the request. We recommend UUID.</p>",
          "idempotencyToken":true
        },
        "InputFulfillmentOptionIds":{
          "shape":"StringList",
          "documentation":"<p>The list of fulfillment option identifiers of AWS Marketplace software products to install on the image. They need to be retrieved from the AWS Marketplace website.</p>"
        },
        "InputImageId":{
          "shape":"String",
          "documentation":"<p>The identifier of the image to install the software product on.</p>"
        },
        "OutputImageName":{
          "shape":"String",
          "documentation":"<p>The name for the new image.</p> <p>Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets ([]), spaces ( ), periods (.), slashes (/), hyphens (-), single quotes ('), at-signs (@), or underscores(_)</p>"
        },
        "OutputImageDescription":{
          "shape":"ImageDescription",
          "documentation":"<p>(Optional) The description for the new image in the same region.</p>"
        },
        "InputSnsTopicArn":{
          "shape":"String",
          "documentation":"<p>(Optional) The full ARN of the Amazon SNS topic that is notified when the build status changes.</p>"
        },
        "InputInstanceType":{
          "shape":"String",
          "documentation":"<p>(Optional) The AWS instance type to use for building the custom image. When no instance type is provided, the instance type recommended by the seller is used.</p>"
        },
        "InputSecurityGroupId":{
          "shape":"String",
          "documentation":"<p>(Optional) The security group identifier that is attached to the launched EC2 instance. When no security group is provided, the default security group is used.</p>"
        },
        "InputSubnetId":{
          "shape":"String",
          "documentation":"<p>(Optional) The subnet identifier inside the customer's VPC where the EC2 instance will be launched. When no subnet is provided, the default subnet is used.</p>"
        },
        "OutputInstallationLogS3BucketName":{
          "shape":"String",
          "documentation":"<p>The S3 bucket in the customer's AWS account where the image installation log will be stored. The bucket must be in the AWS Region where the image is being built.</p>"
        },
        "InputAutomationRoleName":{
          "shape":"String",
          "documentation":"<p>The IAM role required for SSM automation document to build the image. See the feature documentation on the AWS Marketplace website for the description of the role. </p>"
        },
        "InputInstanceProfileName":{
          "shape":"String",
          "documentation":"<p>The instance profile that will be attached to the EC2 instance launched to build the image. For an example of an instance profile, see the feature documentation. </p>"
        },
        "OutputImageTags":{
          "shape":"CustomTags",
          "documentation":"<p>(Optional) Tags to attach to the output image.</p>"
        }
      },
      "documentation":"<p>The container for the request parameters to the <code>StartBuild</code> operation.</p>"
    },
    "StartBuildResult":{
      "type":"structure",
      "members":{
        "BuildId":{
          "shape":"String",
          "documentation":"<p>The unique identifier for the started build.</p>"
        },
        "Status":{
          "shape":"BuildStatus",
          "documentation":"<p>The current status of the build. Possible build statuses include the following:</p> <ul> <li> <p> <code>InProgress</code>  A new build has been defined and started.</p> </li> <li> <p> <code>InternalError</code>  The build was terminated due to a retryable error.</p> </li> <li> <p> <code>Failed</code>  The build has failed, and a new image wasn't created.</p> </li> <li> <p> <code>Succeeded</code>  The build has finished, and a new image was created.</p> </li> </ul>"
        },
        "InputFulfillmentOptionIds":{
          "shape":"StringList",
          "documentation":"<p>The list of fulfillment option identifiers provided in the start build request.</p>"
        }
      },
      "documentation":"<p>The container for the result of the <code>StartBuild</code> operation.</p>"
    },
    "String":{"type":"string"},
    "StringList":{
      "type":"list",
      "member":{"shape":"String"}
    },
    "SubscriptionNotFoundException":{
      "type":"structure",
      "members":{
        "Message":{"shape":"String"}
      },
      "documentation":"<p> The IAM principal that the request credentials refer to doesn't have a subscription to the product for the corresponding <code>FulfillmentOptionId</code>. </p>",
      "exception":true
    },
    "UnauthorizedOperationException":{
      "type":"structure",
      "members":{
        "Message":{"shape":"String"}
      },
      "documentation":"<p> The IAM principal that the request credentials refer to doesn't have permission to any of the following operations on the source image: <code>ec2:CopyImage</code>, <code>ec2:DescribeImages</code>, or <code>ec2:ModifyImageAttribute</code>. </p>",
      "exception":true
    },
    "VPCMismatchException":{
      "type":"structure",
      "members":{
        "Message":{"shape":"String"}
      },
      "documentation":"<p> The provided <code>SecurityGroup</code> and <code>Subnet</code> belong to different VPCs. </p>",
      "exception":true
    }
  },
  "documentation":"<fullname>AWS Marketplace Image Building Service</fullname> <p>This reference provides descriptions of the AWS Marketplace Image Build Service API.</p> <p>The AWS Marketplace Image Building Service enables you to purchase installable software products through AWS Marketplace and install those products on a gold image or Amazon Machine Image (AMI) that you choose from the images available to your AWS account. You choose the software that you want to install from AWS Marketplace and the base AMI for the build. Then you use the AWS Marketplace Image Building Service to build and deliver a new AMI as a private image available only to your AWS account. You can build a private image through the AWS Marketplace website, or you can use this API.</p>"
}
