Skip to content

modify_fpga_image_attribute async

modify_fpga_image_attribute(
    *,
    config_overrides: Optional[AsyncEC2ClientConfig] = None,
    dry_run: Optional[Boolean] = None,
    fpga_image_id: Optional[FpgaImageId] = None,
    attribute: Optional[FpgaImageAttributeName] = None,
    operation_type: Optional[OperationType] = None,
    user_ids: Optional[UserIdStringList] = None,
    user_groups: Optional[UserGroupStringList] = None,
    product_codes: Optional[ProductCodeStringList] = None,
    load_permission: Optional[LoadPermissionModifications] = None,
    description: Optional[String] = None,
    name: Optional[String] = None,
) -> ModifyFpgaImageAttributeResult

Modifies the specified attribute of the specified Amazon FPGA Image (AFI).

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.

  • fpga_image_id (Optional[FpgaImageId], default: None ) –

    The ID of the AFI.

  • attribute (Optional[FpgaImageAttributeName], default: None ) –

    The name of the attribute.

  • operation_type (Optional[OperationType], default: None ) –

    The operation type.

  • user_ids (Optional[UserIdStringList], default: None ) –

    The Amazon Web Services account IDs. This parameter is valid only when modifying the loadPermission attribute.

  • user_groups (Optional[UserGroupStringList], default: None ) –

    The user groups. This parameter is valid only when modifying the loadPermission attribute.

  • product_codes (Optional[ProductCodeStringList], default: None ) –

    The product codes. After you add a product code to an AFI, it can't be removed. This parameter is valid only when modifying the productCodes attribute.

  • load_permission (Optional[LoadPermissionModifications], default: None ) –

    The load permission for the AFI.

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

    A description for the AFI.

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

    A name for the AFI.

Raises:

Source code in docs_src/capo_ec2/_services/async_ec2.py
async def modify_fpga_image_attribute(
    self,
    *,
    config_overrides: Optional[AsyncEC2ClientConfig] = None,
    dry_run: Optional["capo_ec2.types.boolean.Boolean"] = None,
    fpga_image_id: Optional["capo_ec2.types.fpga_image_id.FpgaImageId"] = None,
    attribute: Optional[
        "capo_ec2.types.fpga_image_attribute_name.FpgaImageAttributeName"
    ] = None,
    operation_type: Optional["capo_ec2.types.operation_type.OperationType"] = None,
    user_ids: Optional[
        "capo_ec2.types.user_id_string_list.UserIdStringList"
    ] = None,
    user_groups: Optional[
        "capo_ec2.types.user_group_string_list.UserGroupStringList"
    ] = None,
    product_codes: Optional[
        "capo_ec2.types.product_code_string_list.ProductCodeStringList"
    ] = None,
    load_permission: Optional[
        "capo_ec2.types.load_permission_modifications.LoadPermissionModifications"
    ] = None,
    description: Optional["capo_ec2.types.string.String"] = None,
    name: Optional["capo_ec2.types.string.String"] = None,
) -> "capo_ec2.types.modify_fpga_image_attribute_result.ModifyFpgaImageAttributeResult":
    """<p>Modifies the specified attribute of the specified Amazon FPGA Image (AFI).</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>
        fpga_image_id: <p>The ID of the AFI.</p>
        attribute: <p>The name of the attribute.</p>
        operation_type: <p>The operation type.</p>
        user_ids: <p>The Amazon Web Services account IDs. This parameter is valid only when modifying the <code>loadPermission</code> attribute.</p>
        user_groups: <p>The user groups. This parameter is valid only when modifying the <code>loadPermission</code> attribute.</p>
        product_codes: <p>The product codes. After you add a product code to an AFI, it can't be removed. This parameter is valid only when modifying the <code>productCodes</code> attribute.</p>
        load_permission: <p>The load permission for the AFI.</p>
        description: <p>A description for the AFI.</p>
        name: <p>A name for the AFI.</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.modify_fpga_image_attribute_request.ModifyFpgaImageAttributeRequest]",
    ) -> AsyncOperationResponse[
        "capo_ec2.types.modify_fpga_image_attribute_result.ModifyFpgaImageAttributeResult"
    ]:
        import capo_ec2._operations.amazon_ec2.modify_fpga_image_attribute

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ModifyFpgaImageAttribute")
    )
    input_: capo_ec2.types.modify_fpga_image_attribute_request.ModifyFpgaImageAttributeRequest = {}
    if dry_run is not None:
        input_["dry_run"] = dry_run
    if fpga_image_id is not None:
        input_["fpga_image_id"] = fpga_image_id
    if attribute is not None:
        input_["attribute"] = attribute
    if operation_type is not None:
        input_["operation_type"] = operation_type
    if user_ids is not None:
        input_["user_ids"] = user_ids
    if user_groups is not None:
        input_["user_groups"] = user_groups
    if product_codes is not None:
        input_["product_codes"] = product_codes
    if load_permission is not None:
        input_["load_permission"] = load_permission
    if description is not None:
        input_["description"] = description
    if name is not None:
        input_["name"] = name

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