Skip to content

describe_trunk_interface_associations async

describe_trunk_interface_associations(
    *,
    config_overrides: Optional[AsyncEC2ClientConfig] = None,
    association_ids: Optional[TrunkInterfaceAssociationIdList] = None,
    dry_run: Optional[Boolean] = None,
    filters: Optional[FilterList] = None,
    next_token: Optional[String] = None,
    max_results: Optional[DescribeTrunkInterfaceAssociationsMaxResults] = None,
) -> DescribeTrunkInterfaceAssociationsResult

Describes one or more network interface trunk associations.

Parameters:

  • association_ids (Optional[TrunkInterfaceAssociationIdList], default: None ) –

    The IDs of the associations.

  • 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.

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

    One or more filters.

    • gre-key - The ID of a trunk interface association.

    • interface-protocol - The interface protocol. Valid values are VLAN and GRE.

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

    The token for the next page of results.

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

    The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

Raises:

Source code in docs_src/capo_ec2/_services/async_ec2.py
async def describe_trunk_interface_associations(
    self,
    *,
    config_overrides: Optional[AsyncEC2ClientConfig] = None,
    association_ids: Optional[
        "capo_ec2.types.trunk_interface_association_id_list.TrunkInterfaceAssociationIdList"
    ] = None,
    dry_run: Optional["capo_ec2.types.boolean.Boolean"] = 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_trunk_interface_associations_max_results.DescribeTrunkInterfaceAssociationsMaxResults"
    ] = None,
) -> "capo_ec2.types.describe_trunk_interface_associations_result.DescribeTrunkInterfaceAssociationsResult":
    """<p>Describes one or more network interface trunk associations.</p>

    Args:
        association_ids: <p>The IDs of the associations.</p>
        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>
        filters: <p>One or more filters.</p> <ul> <li> <p> <code>gre-key</code> - The ID of a trunk interface association.</p> </li> <li> <p> <code>interface-protocol</code> - The interface protocol. Valid values are <code>VLAN</code> and <code>GRE</code>.</p> </li> </ul>
        next_token: <p>The token for the next page of results.</p>
        max_results: <p>The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</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_trunk_interface_associations_request.DescribeTrunkInterfaceAssociationsRequest]",
    ) -> AsyncOperationResponse[
        "capo_ec2.types.describe_trunk_interface_associations_result.DescribeTrunkInterfaceAssociationsResult"
    ]:
        import capo_ec2._operations.amazon_ec2.describe_trunk_interface_associations

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeTrunkInterfaceAssociations")
    )
    input_: capo_ec2.types.describe_trunk_interface_associations_request.DescribeTrunkInterfaceAssociationsRequest = {}
    if association_ids is not None:
        input_["association_ids"] = association_ids
    if dry_run is not None:
        input_["dry_run"] = dry_run
    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