Skip to content

create_fpga_image async

create_fpga_image(
    *,
    config_overrides: Optional[AsyncEC2ClientConfig] = None,
    dry_run: Optional[Boolean] = None,
    input_storage_location: Optional[StorageLocation] = None,
    logs_storage_location: Optional[StorageLocation] = None,
    description: Optional[String] = None,
    name: Optional[String] = None,
    client_token: Optional[String] = None,
    tag_specifications: Optional[TagSpecificationList] = None,
) -> CreateFpgaImageResult

Creates an Amazon FPGA Image (AFI) from the specified design checkpoint (DCP).

The create operation is asynchronous. To verify that the AFI was successfully created and is ready for use, check the output logs.

An AFI contains the FPGA bitstream that is ready to download to an FPGA. You can securely deploy an AFI on multiple FPGA-accelerated instances. For more information, see the Amazon Web Services FPGA Hardware Development Kit.

Parameters:

  • dry_run (Optional[Boolean], default: None ) –

    Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

  • input_storage_location (Optional[StorageLocation], default: None ) –

    The location of the encrypted design checkpoint in Amazon S3. The input must be a tarball.

  • logs_storage_location (Optional[StorageLocation], default: None ) –

    The location in Amazon S3 for the output logs.

  • description (Optional[String], default: None ) –

    A description for the AFI.

  • name (Optional[String], default: None ) –

    A name for the AFI.

  • client_token (Optional[String], default: None ) –

    Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring Idempotency.

  • tag_specifications (Optional[TagSpecificationList], default: None ) –

    The tags to apply to the FPGA image during creation.

Raises:

Source code in docs_src/capo_ec2/_services/async_ec2.py
async def create_fpga_image(
    self,
    *,
    config_overrides: Optional[AsyncEC2ClientConfig] = None,
    dry_run: Optional["capo_ec2.types.boolean.Boolean"] = None,
    input_storage_location: Optional[
        "capo_ec2.types.storage_location.StorageLocation"
    ] = None,
    logs_storage_location: Optional[
        "capo_ec2.types.storage_location.StorageLocation"
    ] = None,
    description: Optional["capo_ec2.types.string.String"] = None,
    name: Optional["capo_ec2.types.string.String"] = None,
    client_token: Optional["capo_ec2.types.string.String"] = None,
    tag_specifications: Optional[
        "capo_ec2.types.tag_specification_list.TagSpecificationList"
    ] = None,
) -> "capo_ec2.types.create_fpga_image_result.CreateFpgaImageResult":
    """<p>Creates an Amazon FPGA Image (AFI) from the specified design checkpoint (DCP).</p> <p>The create operation is asynchronous. To verify that the AFI was successfully created and is ready for use, check the output logs.</p> <p>An AFI contains the FPGA bitstream that is ready to download to an FPGA. You can securely deploy an AFI on multiple FPGA-accelerated instances. For more information, see the <a href="https://github.com/aws/aws-fpga/">Amazon Web Services FPGA Hardware Development Kit</a>.</p>

    Args:
        dry_run: <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
        input_storage_location: <p>The location of the encrypted design checkpoint in Amazon S3. The input must be a tarball.</p>
        logs_storage_location: <p>The location in Amazon S3 for the output logs.</p>
        description: <p>A description for the AFI.</p>
        name: <p>A name for the AFI.</p>
        client_token: <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/ec2/latest/devguide/ec2-api-idempotency.html">Ensuring Idempotency</a>.</p>
        tag_specifications: <p>The tags to apply to the FPGA image during creation.</p>

    Raises:
        capo_ec2.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_ec2.types.create_fpga_image_request.CreateFpgaImageRequest]",
    ) -> AsyncOperationResponse[
        "capo_ec2.types.create_fpga_image_result.CreateFpgaImageResult"
    ]:
        import capo_ec2._operations.amazon_ec2.create_fpga_image

        (
            output,
            http_response,
        ) = await capo_ec2._operations.amazon_ec2.create_fpga_image.async_create_fpga_image(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateFpgaImage")
    )
    input_: capo_ec2.types.create_fpga_image_request.CreateFpgaImageRequest = {}
    if dry_run is not None:
        input_["dry_run"] = dry_run
    if input_storage_location is not None:
        input_["input_storage_location"] = input_storage_location
    if logs_storage_location is not None:
        input_["logs_storage_location"] = logs_storage_location
    if description is not None:
        input_["description"] = description
    if name is not None:
        input_["name"] = name
    if client_token is not None:
        input_["client_token"] = client_token
    if tag_specifications is not None:
        input_["tag_specifications"] = tag_specifications

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output