Returns a MemberAccounts object that lists the member accounts in the administrator's Amazon Web Services organization.
Either an Firewall Manager administrator or the organization's management account can make this request.
Parameters:
-
next_token
(Optional[PaginationToken], default:
None
)
–
If you specify a value for MaxResults and you have more account IDs than the number that you specify for MaxResults, Firewall Manager returns a NextToken value in the response that allows you to list another group of IDs. For the second and subsequent ListMemberAccountsRequest requests, specify the value of NextToken from the previous response to get information about another batch of member account IDs.
-
max_results
(Optional[PaginationMaxResults], default:
None
)
–
Specifies the number of member account IDs that you want Firewall Manager to return for this request. If you have more IDs than the number that you specify for MaxResults, the response includes a NextToken value that you can use to get another batch of member account IDs.
Raises:
Source code in docs_src/capo_fms/_services/fms.py
| def list_member_accounts(
self,
*,
config_overrides: Optional[FMSClientConfig] = None,
next_token: Optional["capo_fms.types.pagination_token.PaginationToken"] = None,
max_results: Optional[
"capo_fms.types.pagination_max_results.PaginationMaxResults"
] = None,
) -> "capo_fms.types.list_member_accounts_response.ListMemberAccountsResponse":
"""<p>Returns a <code>MemberAccounts</code> object that lists the member accounts in the administrator's Amazon Web Services organization.</p> <p>Either an Firewall Manager administrator or the organization's management account can make this request.</p>
Args:
next_token: <p>If you specify a value for <code>MaxResults</code> and you have more account IDs than the number that you specify for <code>MaxResults</code>, Firewall Manager returns a <code>NextToken</code> value in the response that allows you to list another group of IDs. For the second and subsequent <code>ListMemberAccountsRequest</code> requests, specify the value of <code>NextToken</code> from the previous response to get information about another batch of member account IDs.</p>
max_results: <p>Specifies the number of member account IDs that you want Firewall Manager to return for this request. If you have more IDs than the number that you specify for <code>MaxResults</code>, the response includes a <code>NextToken</code> value that you can use to get another batch of member account IDs.</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.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.
"""
def _handler(
req: "OperationRequest[capo_fms.types.list_member_accounts_request.ListMemberAccountsRequest]",
) -> OperationResponse[
"capo_fms.types.list_member_accounts_response.ListMemberAccountsResponse"
]:
import capo_fms._operations.awsfms_20180101.list_member_accounts
output, http_response = (
capo_fms._operations.awsfms_20180101.list_member_accounts.list_member_accounts(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListMemberAccounts")
)
input_: capo_fms.types.list_member_accounts_request.ListMemberAccountsRequest = {}
if next_token is not None:
input_["next_token"] = next_token
if max_results is not None:
input_["max_results"] = max_results
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|