Amazon Elastic Compute Cloud

2017/09/21 - Amazon Elastic Compute Cloud - 5 new 1 updated api methods

Changes  Add EC2 APIs to copy Amazon FPGA Images (AFIs) within the same region and across multiple regions, delete AFIs, and modify AFI attributes. AFI attributes include name, description and granting/denying other AWS accounts to load the AFI.

ModifyFpgaImageAttribute (new) Link ¶

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

See also: AWS API Documentation

Request Syntax

client.modify_fpga_image_attribute(
    DryRun=True|False,
    FpgaImageId='string',
    Attribute='description'|'name'|'loadPermission'|'productCodes',
    OperationType='add'|'remove',
    UserIds=[
        'string',
    ],
    UserGroups=[
        'string',
    ],
    ProductCodes=[
        'string',
    ],
    LoadPermission={
        'Add': [
            {
                'Group': 'all',
                'UserId': 'string'
            },
        ],
        'Remove': [
            {
                'Group': 'all',
                'UserId': 'string'
            },
        ]
    },
    Description='string',
    Name='string'
)
type DryRun

boolean

param DryRun

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 .

type FpgaImageId

string

param FpgaImageId

[REQUIRED]

The ID of the AFI.

type Attribute

string

param Attribute

The name of the attribute.

type OperationType

string

param OperationType

The operation type.

type UserIds

list

param UserIds

One or more AWS account IDs. This parameter is valid only when modifying the loadPermission attribute.

  • (string) --

type UserGroups

list

param UserGroups

One or more user groups. This parameter is valid only when modifying the loadPermission attribute.

  • (string) --

type ProductCodes

list

param ProductCodes

One or more 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.

  • (string) --

type LoadPermission

dict

param LoadPermission

The load permission for the AFI.

  • Add (list) --

    The load permissions to add.

    • (dict) --

      Describes a load permission.

      • Group (string) --

        The name of the group.

      • UserId (string) --

        The AWS account ID.

  • Remove (list) --

    The load permissions to remove.

    • (dict) --

      Describes a load permission.

      • Group (string) --

        The name of the group.

      • UserId (string) --

        The AWS account ID.

type Description

string

param Description

A description for the AFI.

type Name

string

param Name

A name for the AFI.

rtype

dict

returns

Response Syntax

{
    'FpgaImageAttribute': {
        'FpgaImageId': 'string',
        'Name': 'string',
        'Description': 'string',
        'LoadPermissions': [
            {
                'UserId': 'string',
                'Group': 'all'
            },
        ],
        'ProductCodes': [
            {
                'ProductCodeId': 'string',
                'ProductCodeType': 'devpay'|'marketplace'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • FpgaImageAttribute (dict) --

      Information about the attribute.

      • FpgaImageId (string) --

        The ID of the AFI.

      • Name (string) --

        The name of the AFI.

      • Description (string) --

        The description of the AFI.

      • LoadPermissions (list) --

        One or more load permissions.

        • (dict) --

          Describes a load permission.

          • UserId (string) --

            The AWS account ID.

          • Group (string) --

            The name of the group.

      • ProductCodes (list) --

        One or more product codes.

        • (dict) --

          Describes a product code.

          • ProductCodeId (string) --

            The product code.

          • ProductCodeType (string) --

            The type of product code.

DeleteFpgaImage (new) Link ¶

Deletes the specified Amazon FPGA Image (AFI).

See also: AWS API Documentation

Request Syntax

client.delete_fpga_image(
    DryRun=True|False,
    FpgaImageId='string'
)
type DryRun

boolean

param DryRun

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 .

type FpgaImageId

string

param FpgaImageId

[REQUIRED]

The ID of the AFI.

rtype

dict

returns

Response Syntax

{
    'Return': True|False
}

Response Structure

  • (dict) --

    • Return (boolean) --

      Is true if the request succeeds, and an error otherwise.

CopyFpgaImage (new) Link ¶

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

See also: AWS API Documentation

Request Syntax

client.copy_fpga_image(
    DryRun=True|False,
    SourceFpgaImageId='string',
    Description='string',
    Name='string',
    SourceRegion='string',
    ClientToken='string'
)
type DryRun

boolean

param DryRun

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 .

type SourceFpgaImageId

string

param SourceFpgaImageId

[REQUIRED]

The ID of the source AFI.

type Description

string

param Description

The description for the new AFI.

type Name

string

param Name

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

type SourceRegion

string

param SourceRegion

[REQUIRED]

The region that contains the source AFI.

type ClientToken

string

param ClientToken

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

rtype

dict

returns

Response Syntax

{
    'FpgaImageId': 'string'
}

Response Structure

  • (dict) --

    • FpgaImageId (string) --

      The ID of the new AFI.

DescribeFpgaImageAttribute (new) Link ¶

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

See also: AWS API Documentation

Request Syntax

client.describe_fpga_image_attribute(
    DryRun=True|False,
    FpgaImageId='string',
    Attribute='description'|'name'|'loadPermission'|'productCodes'
)
type DryRun

boolean

param DryRun

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 .

type FpgaImageId

string

param FpgaImageId

[REQUIRED]

The ID of the AFI.

type Attribute

string

param Attribute

[REQUIRED]

The AFI attribute.

rtype

dict

returns

Response Syntax

{
    'FpgaImageAttribute': {
        'FpgaImageId': 'string',
        'Name': 'string',
        'Description': 'string',
        'LoadPermissions': [
            {
                'UserId': 'string',
                'Group': 'all'
            },
        ],
        'ProductCodes': [
            {
                'ProductCodeId': 'string',
                'ProductCodeType': 'devpay'|'marketplace'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • FpgaImageAttribute (dict) --

      Information about the attribute.

      • FpgaImageId (string) --

        The ID of the AFI.

      • Name (string) --

        The name of the AFI.

      • Description (string) --

        The description of the AFI.

      • LoadPermissions (list) --

        One or more load permissions.

        • (dict) --

          Describes a load permission.

          • UserId (string) --

            The AWS account ID.

          • Group (string) --

            The name of the group.

      • ProductCodes (list) --

        One or more product codes.

        • (dict) --

          Describes a product code.

          • ProductCodeId (string) --

            The product code.

          • ProductCodeType (string) --

            The type of product code.

ResetFpgaImageAttribute (new) Link ¶

Resets the specified attribute of the specified Amazon FPGA Image (AFI) to its default value. You can only reset the load permission attribute.

See also: AWS API Documentation

Request Syntax

client.reset_fpga_image_attribute(
    DryRun=True|False,
    FpgaImageId='string',
    Attribute='loadPermission'
)
type DryRun

boolean

param DryRun

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 .

type FpgaImageId

string

param FpgaImageId

[REQUIRED]

The ID of the AFI.

type Attribute

string

param Attribute

The attribute.

rtype

dict

returns

Response Syntax

{
    'Return': True|False
}

Response Structure

  • (dict) --

    • Return (boolean) --

      Is true if the request succeeds, and an error otherwise.

DescribeFpgaImages (updated) Link ¶
Changes (response)
{'FpgaImages': {'Public': 'boolean'}}

Describes one or more available Amazon FPGA Images (AFIs). These include public AFIs, private AFIs that you own, and AFIs owned by other AWS accounts for which you have load permissions.

See also: AWS API Documentation

Request Syntax

client.describe_fpga_images(
    DryRun=True|False,
    FpgaImageIds=[
        'string',
    ],
    Owners=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    NextToken='string',
    MaxResults=123
)
type DryRun

boolean

param DryRun

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 .

type FpgaImageIds

list

param FpgaImageIds

One or more AFI IDs.

  • (string) --

type Owners

list

param Owners

Filters the AFI by owner. Specify an AWS account ID, self (owner is the sender of the request), or an AWS owner alias (valid values are amazon | aws-marketplace ).

  • (string) --

type Filters

list

param Filters

One or more filters.

  • create-time - The creation time of the AFI.

  • fpga-image-id - The FPGA image identifier (AFI ID).

  • fpga-image-global-id - The global FPGA image identifier (AGFI ID).

  • name - The name of the AFI.

  • owner-id - The AWS account ID of the AFI owner.

  • product-code - The product code.

  • shell-version - The version of the AWS Shell that was used to create the bitstream.

  • state - The state of the AFI ( pending | failed | available | unavailable ).

  • tag :key =*value* - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify tag:Purpose for the filter name and X for the filter value.

  • tag-key - The key of a tag assigned to the resource. This filter is independent of the tag-value filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the tag :key =*value* filter.

  • tag-value - The value of a tag assigned to the resource. This filter is independent of the tag-key filter.

  • update-time - The time of the most recent update.

  • (dict) --

    A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

    • Name (string) --

      The name of the filter. Filter names are case-sensitive.

    • Values (list) --

      One or more filter values. Filter values are case-sensitive.

      • (string) --

type NextToken

string

param NextToken

The token to retrieve the next page of results.

type MaxResults

integer

param MaxResults

The maximum number of results to return in a single call.

rtype

dict

returns

Response Syntax

{
    'FpgaImages': [
        {
            'FpgaImageId': 'string',
            'FpgaImageGlobalId': 'string',
            'Name': 'string',
            'Description': 'string',
            'ShellVersion': 'string',
            'PciId': {
                'DeviceId': 'string',
                'VendorId': 'string',
                'SubsystemId': 'string',
                'SubsystemVendorId': 'string'
            },
            'State': {
                'Code': 'pending'|'failed'|'available'|'unavailable',
                'Message': 'string'
            },
            'CreateTime': datetime(2015, 1, 1),
            'UpdateTime': datetime(2015, 1, 1),
            'OwnerId': 'string',
            'OwnerAlias': 'string',
            'ProductCodes': [
                {
                    'ProductCodeId': 'string',
                    'ProductCodeType': 'devpay'|'marketplace'
                },
            ],
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'Public': True|False
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • FpgaImages (list) --

      Information about one or more FPGA images.

      • (dict) --

        Describes an Amazon FPGA image (AFI).

        • FpgaImageId (string) --

          The FPGA image identifier (AFI ID).

        • FpgaImageGlobalId (string) --

          The global FPGA image identifier (AGFI ID).

        • Name (string) --

          The name of the AFI.

        • Description (string) --

          The description of the AFI.

        • ShellVersion (string) --

          The version of the AWS Shell that was used to create the bitstream.

        • PciId (dict) --

          Information about the PCI bus.

          • DeviceId (string) --

            The ID of the device.

          • VendorId (string) --

            The ID of the vendor.

          • SubsystemId (string) --

            The ID of the subsystem.

          • SubsystemVendorId (string) --

            The ID of the vendor for the subsystem.

        • State (dict) --

          Information about the state of the AFI.

          • Code (string) --

            The state. The following are the possible values:

            • pending - AFI bitstream generation is in progress.

            • available - The AFI is available for use.

            • failed - AFI bitstream generation failed.

            • unavailable - The AFI is no longer available for use.

          • Message (string) --

            If the state is failed , this is the error message.

        • CreateTime (datetime) --

          The date and time the AFI was created.

        • UpdateTime (datetime) --

          The time of the most recent update to the AFI.

        • OwnerId (string) --

          The AWS account ID of the AFI owner.

        • OwnerAlias (string) --

          The alias of the AFI owner. Possible values include self , amazon , and aws-marketplace .

        • ProductCodes (list) --

          The product codes for the AFI.

          • (dict) --

            Describes a product code.

            • ProductCodeId (string) --

              The product code.

            • ProductCodeType (string) --

              The type of product code.

        • Tags (list) --

          Any tags assigned to the AFI.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:

            • Value (string) --

              The value of the tag.

              Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

        • Public (boolean) --

          Indicates whether the AFI is public.

    • NextToken (string) --

      The token to use to retrieve the next page of results. This value is null when there are no more results to return.