Skip to content

list_third_party_firewall_firewall_policies async

list_third_party_firewall_firewall_policies(
    third_party_firewall: ThirdPartyFirewall,
    max_results: PaginationMaxResults,
    *,
    config_overrides: Optional[AsyncFMSClientConfig] = None,
    next_token: Optional[PaginationToken] = None,
) -> ListThirdPartyFirewallFirewallPoliciesResponse

Retrieves a list of all of the third-party firewall policies that are associated with the third-party firewall administrator's account.

Parameters:

  • third_party_firewall (ThirdPartyFirewall) –

    The name of the third-party firewall vendor.

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

    If the previous response included a NextToken element, the specified third-party firewall vendor is associated with more third-party firewall policies. To get more third-party firewall policies, submit another ListThirdPartyFirewallFirewallPoliciesRequest request.

    For the value of NextToken, specify the value of NextToken from the previous response. If the previous response didn't include a NextToken element, there are no more third-party firewall policies to get.

  • max_results (PaginationMaxResults) –

    The maximum number of third-party firewall policies that you want Firewall Manager to return. If the specified third-party firewall vendor is associated with more than MaxResults firewall policies, the response includes a NextToken element. NextToken contains an encrypted token that identifies the first third-party firewall policies that Firewall Manager will return if you submit another request.

Raises:

  • InternalErrorException –

    The operation failed because of a system problem, even though the request was valid. Retry your request.

  • InvalidInputException –

    The parameters of the request were invalid.

  • InvalidOperationException –

    The operation failed because there was nothing to do or the operation wasn't possible. For example, you might have submitted an AssociateAdminAccount request for an account ID that was already set as the Firewall Manager administrator. Or you might have tried to access a Region that's disabled by default, and that you need to enable for the Firewall Manager administrator account and for Organizations before you can access it.

  • ResourceNotFoundException –

    The specified resource was not found.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_fms/_services/async_fms.py
async def list_third_party_firewall_firewall_policies(
    self,
    third_party_firewall: "capo_fms.types.third_party_firewall.ThirdPartyFirewall",
    max_results: "capo_fms.types.pagination_max_results.PaginationMaxResults",
    *,
    config_overrides: Optional[AsyncFMSClientConfig] = None,
    next_token: Optional["capo_fms.types.pagination_token.PaginationToken"] = None,
) -> "capo_fms.types.list_third_party_firewall_firewall_policies_response.ListThirdPartyFirewallFirewallPoliciesResponse":
    """<p>Retrieves a list of all of the third-party firewall policies that are associated with the third-party firewall administrator's account.</p>

    Args:
        third_party_firewall: <p>The name of the third-party firewall vendor.</p>
        next_token: <p>If the previous response included a <code>NextToken</code> element, the specified third-party firewall vendor is associated with more third-party firewall policies. To get more third-party firewall policies, submit another <code>ListThirdPartyFirewallFirewallPoliciesRequest</code> request.</p> <p> For the value of <code>NextToken</code>, specify the value of <code>NextToken</code> from the previous response. If the previous response didn't include a <code>NextToken</code> element, there are no more third-party firewall policies to get. </p>
        max_results: <p>The maximum number of third-party firewall policies that you want Firewall Manager to return. If the specified third-party firewall vendor is associated with more than <code>MaxResults</code> firewall policies, the response includes a <code>NextToken</code> element. <code>NextToken</code> contains an encrypted token that identifies the first third-party firewall policies that Firewall Manager will return if you submit another request.</p>

    Raises:
        capo_fms.errors.internal_error_exception.InternalErrorException: <p>The operation failed because of a system problem, even though the request was valid. Retry your request.</p>
        capo_fms.errors.invalid_input_exception.InvalidInputException: <p>The parameters of the request were invalid.</p>
        capo_fms.errors.invalid_operation_exception.InvalidOperationException: <p>The operation failed because there was nothing to do or the operation wasn't possible. For example, you might have submitted an <code>AssociateAdminAccount</code> request for an account ID that was already set as the Firewall Manager administrator. Or you might have tried to access a Region that's disabled by default, and that you need to enable for the Firewall Manager administrator account and for Organizations before you can access it.</p>
        capo_fms.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found.</p>
        capo_fms.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_fms.types.list_third_party_firewall_firewall_policies_request.ListThirdPartyFirewallFirewallPoliciesRequest]",
    ) -> AsyncOperationResponse[
        "capo_fms.types.list_third_party_firewall_firewall_policies_response.ListThirdPartyFirewallFirewallPoliciesResponse"
    ]:
        import capo_fms._operations.awsfms_20180101.list_third_party_firewall_firewall_policies

        (
            output,
            http_response,
        ) = await capo_fms._operations.awsfms_20180101.list_third_party_firewall_firewall_policies.async_list_third_party_firewall_firewall_policies(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListThirdPartyFirewallFirewallPolicies")
    )
    input_: capo_fms.types.list_third_party_firewall_firewall_policies_request.ListThirdPartyFirewallFirewallPoliciesRequest = {
        "third_party_firewall": third_party_firewall,
        "max_results": max_results,
    }
    if next_token is not None:
        input_["next_token"] = next_token

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