Skip to content

describe_network_interface_permissions async

describe_network_interface_permissions(
    *,
    config_overrides: Optional[AsyncEC2ClientConfig] = None,
    network_interface_permission_ids: Optional[NetworkInterfacePermissionIdList] = None,
    filters: Optional[FilterList] = None,
    next_token: Optional[String] = None,
    max_results: Optional[DescribeNetworkInterfacePermissionsMaxResults] = None,
) -> DescribeNetworkInterfacePermissionsResult

Describes the permissions for your network interfaces.

Parameters:

  • network_interface_permission_ids (Optional[NetworkInterfacePermissionIdList], default: None ) –

    The network interface permission IDs.

  • filters (Optional[FilterList], default: None ) –

    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 Amazon Web Services account ID.

    • network-interface-permission.aws-service - The Amazon Web Services service.

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

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

    The token returned from a previous paginated request. Pagination continues from the end of the items returned by the previous request.

  • max_results (Optional[DescribeNetworkInterfacePermissionsMaxResults], default: None ) –

    The maximum number of items to return for this request. To get the next page of items, make another request with the token returned in the output. If this parameter is not specified, up to 50 results are returned by default. For more information, see Pagination.

Raises:

Source code in docs_src/capo_ec2/_services/async_ec2.py
async def describe_network_interface_permissions(
    self,
    *,
    config_overrides: Optional[AsyncEC2ClientConfig] = None,
    network_interface_permission_ids: Optional[
        "capo_ec2.types.network_interface_permission_id_list.NetworkInterfacePermissionIdList"
    ] = None,
    filters: Optional["capo_ec2.types.filter_list.FilterList"] = None,
    next_token: Optional["capo_ec2.types.string.String"] = None,
    max_results: Optional[
        "capo_ec2.types.describe_network_interface_permissions_max_results.DescribeNetworkInterfacePermissionsMaxResults"
    ] = None,
) -> "capo_ec2.types.describe_network_interface_permissions_result.DescribeNetworkInterfacePermissionsResult":
    """<p>Describes the permissions for your network interfaces. </p>

    Args:
        network_interface_permission_ids: <p>The network interface permission IDs.</p>
        filters: <p>One or more filters.</p> <ul> <li> <p> <code>network-interface-permission.network-interface-permission-id</code> - The ID of the permission.</p> </li> <li> <p> <code>network-interface-permission.network-interface-id</code> - The ID of the network interface.</p> </li> <li> <p> <code>network-interface-permission.aws-account-id</code> - The Amazon Web Services account ID.</p> </li> <li> <p> <code>network-interface-permission.aws-service</code> - The Amazon Web Services service.</p> </li> <li> <p> <code>network-interface-permission.permission</code> - The type of permission (<code>INSTANCE-ATTACH</code> | <code>EIP-ASSOCIATE</code>).</p> </li> </ul>
        next_token: <p>The token returned from a previous paginated request. Pagination continues from the end of the items returned by the previous request.</p>
        max_results: <p>The maximum number of items to return for this request. To get the next page of items, make another request with the token returned in the output. If this parameter is not specified, up to 50 results are returned by default. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination">Pagination</a>.</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.describe_network_interface_permissions_request.DescribeNetworkInterfacePermissionsRequest]",
    ) -> AsyncOperationResponse[
        "capo_ec2.types.describe_network_interface_permissions_result.DescribeNetworkInterfacePermissionsResult"
    ]:
        import capo_ec2._operations.amazon_ec2.describe_network_interface_permissions

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeNetworkInterfacePermissions")
    )
    input_: capo_ec2.types.describe_network_interface_permissions_request.DescribeNetworkInterfacePermissionsRequest = {}
    if network_interface_permission_ids is not None:
        input_["network_interface_permission_ids"] = (
            network_interface_permission_ids
        )
    if filters is not None:
        input_["filters"] = filters
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

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