Amazon Elastic Compute Cloud

2017/07/13 - Amazon Elastic Compute Cloud - 3 new api methods

Changes  X-ENI (or Cross-Account ENI) is a new feature that allows the attachment or association of Elastic Network Interfaces (ENI) between VPCs in different AWS accounts located in the same availability zone. With this new capability, service providers and partners can deliver managed solutions in a variety of new architectural patterns where the provider and consumer of the service are in different AWS accounts.

DescribeNetworkInterfacePermissions (new) Link ¶

Describes the permissions for your network interfaces.

See also: AWS API Documentation

Request Syntax

client.describe_network_interface_permissions(
    NetworkInterfacePermissionIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    NextToken='string',
    MaxResults=123
)
type NetworkInterfacePermissionIds

list

param NetworkInterfacePermissionIds

One or more network interface permission IDs.

  • (string) --

type Filters

list

param Filters

One or more filters.

  • network-interface-permission.network-interface-permission-id - The ID of the permission.

  • network-interface-permission.network-interface-id - The ID of the network interface.

  • network-interface-permission.aws-account-id - The AWS account ID.

  • network-interface-permission.aws-service - The AWS service.

  • network-interface-permission.permission - The type of permission ( INSTANCE-ATTACH | EIP-ASSOCIATE ).

  • (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 request the next page of results.

type MaxResults

integer

param MaxResults

The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned NextToken value. If this parameter is not specified, up to 50 results are returned by default.

rtype

dict

returns

Response Syntax

{
    'NetworkInterfacePermissions': [
        {
            'NetworkInterfacePermissionId': 'string',
            'NetworkInterfaceId': 'string',
            'AwsAccountId': 'string',
            'AwsService': 'string',
            'Permission': 'INSTANCE-ATTACH'|'EIP-ASSOCIATE',
            'PermissionState': {
                'State': 'pending'|'granted'|'revoking'|'revoked',
                'StatusMessage': 'string'
            }
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • NetworkInterfacePermissions (list) --

      The network interface permissions.

      • (dict) --

        Describes a permission for a network interface.

        • NetworkInterfacePermissionId (string) --

          The ID of the network interface permission.

        • NetworkInterfaceId (string) --

          The ID of the network interface.

        • AwsAccountId (string) --

          The AWS account ID.

        • AwsService (string) --

          The AWS service.

        • Permission (string) --

          The type of permission.

        • PermissionState (dict) --

          Information about the state of the permission.

          • State (string) --

            The state of the permission.

          • StatusMessage (string) --

            A status message, if applicable.

    • NextToken (string) --

      The token to use to retrieve the next page of results.

CreateNetworkInterfacePermission (new) Link ¶

Grants an AWS authorized partner account permission to attach the specified network interface to an instance in their account.

You can grant permission to a single AWS account only, and only one account at a time.

See also: AWS API Documentation

Request Syntax

client.create_network_interface_permission(
    NetworkInterfaceId='string',
    AwsAccountId='string',
    AwsService='string',
    Permission='INSTANCE-ATTACH'|'EIP-ASSOCIATE',
    DryRun=True|False
)
type NetworkInterfaceId

string

param NetworkInterfaceId

[REQUIRED]

The ID of the network interface.

type AwsAccountId

string

param AwsAccountId

The AWS account ID.

type AwsService

string

param AwsService

The AWS service. Currently not supported.

type Permission

string

param Permission

[REQUIRED]

The type of permission to grant.

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 .

rtype

dict

returns

Response Syntax

{
    'InterfacePermission': {
        'NetworkInterfacePermissionId': 'string',
        'NetworkInterfaceId': 'string',
        'AwsAccountId': 'string',
        'AwsService': 'string',
        'Permission': 'INSTANCE-ATTACH'|'EIP-ASSOCIATE',
        'PermissionState': {
            'State': 'pending'|'granted'|'revoking'|'revoked',
            'StatusMessage': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • InterfacePermission (dict) --

      Information about the permission for the network interface.

      • NetworkInterfacePermissionId (string) --

        The ID of the network interface permission.

      • NetworkInterfaceId (string) --

        The ID of the network interface.

      • AwsAccountId (string) --

        The AWS account ID.

      • AwsService (string) --

        The AWS service.

      • Permission (string) --

        The type of permission.

      • PermissionState (dict) --

        Information about the state of the permission.

        • State (string) --

          The state of the permission.

        • StatusMessage (string) --

          A status message, if applicable.

DeleteNetworkInterfacePermission (new) Link ¶

Deletes a permission for a network interface. By default, you cannot delete the permission if the account for which you're removing the permission has attached the network interface to an instance. However, you can force delete the permission, regardless of any attachment.

See also: AWS API Documentation

Request Syntax

client.delete_network_interface_permission(
    NetworkInterfacePermissionId='string',
    Force=True|False,
    DryRun=True|False
)
type NetworkInterfacePermissionId

string

param NetworkInterfacePermissionId

[REQUIRED]

The ID of the network interface permission.

type Force

boolean

param Force

Specify true to remove the permission even if the network interface is attached to an instance.

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 .

rtype

dict

returns

Response Syntax

{
    'Return': True|False
}

Response Structure

  • (dict) --

    • Return (boolean) --

      Returns true if the request succeeds, otherwise returns an error.