Skip to content

copy_fpga_image

copy_fpga_image(
    *,
    config_overrides: Optional[EC2ClientConfig] = None,
    dry_run: Optional[Boolean] = None,
    source_fpga_image_id: Optional[String] = None,
    description: Optional[String] = None,
    name: Optional[String] = None,
    source_region: Optional[String] = None,
    client_token: Optional[String] = None,
) -> CopyFpgaImageResult

Copies the specified Amazon FPGA Image (AFI) to the current Region.

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.

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

    The ID of the source AFI.

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

    The description for the new AFI.

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

    The name for the new AFI. The default is the name of the source AFI.

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

    The Region that contains the source 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.

Raises:

Source code in docs_src/capo_ec2/_services/ec2.py
def copy_fpga_image(
    self,
    *,
    config_overrides: Optional[EC2ClientConfig] = None,
    dry_run: Optional["capo_ec2.types.boolean.Boolean"] = None,
    source_fpga_image_id: Optional["capo_ec2.types.string.String"] = None,
    description: Optional["capo_ec2.types.string.String"] = None,
    name: Optional["capo_ec2.types.string.String"] = None,
    source_region: Optional["capo_ec2.types.string.String"] = None,
    client_token: Optional["capo_ec2.types.string.String"] = None,
) -> "capo_ec2.types.copy_fpga_image_result.CopyFpgaImageResult":
    """<p>Copies the specified Amazon FPGA Image (AFI) to the current Region.</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>
        source_fpga_image_id: <p>The ID of the source AFI.</p>
        description: <p>The description for the new AFI.</p>
        name: <p>The name for the new AFI. The default is the name of the source AFI.</p>
        source_region: <p>The Region that contains the source 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>

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

    def _handler(
        req: "OperationRequest[capo_ec2.types.copy_fpga_image_request.CopyFpgaImageRequest]",
    ) -> OperationResponse[
        "capo_ec2.types.copy_fpga_image_result.CopyFpgaImageResult"
    ]:
        import capo_ec2._operations.amazon_ec2.copy_fpga_image

        output, http_response = (
            capo_ec2._operations.amazon_ec2.copy_fpga_image.copy_fpga_image(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CopyFpgaImage")
    )
    input_: capo_ec2.types.copy_fpga_image_request.CopyFpgaImageRequest = {}
    if dry_run is not None:
        input_["dry_run"] = dry_run
    if source_fpga_image_id is not None:
        input_["source_fpga_image_id"] = source_fpga_image_id
    if description is not None:
        input_["description"] = description
    if name is not None:
        input_["name"] = name
    if source_region is not None:
        input_["source_region"] = source_region
    if client_token is not None:
        input_["client_token"] = client_token

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output