Returns a list of the profiles for your system. If you want to limit the results to a certain number, supply a value for the MaxResults parameter. If you ran the command previously and received a value for NextToken, you can supply that value to continue listing profiles from where you left off.
Parameters:
-
max_results
(Optional[MaxResults], default:
None
)
–
The maximum number of items to return.
-
next_token
(Optional[NextToken], default:
None
)
–
When there are additional results that were not returned, a NextToken parameter is returned. You can use that value for a subsequent call to ListProfiles to continue listing results.
-
profile_type
(Optional[ProfileType], default:
None
)
–
Indicates whether to list only LOCAL type profiles or only PARTNER type profiles. If not supplied in the request, the command lists all types of profiles.
Raises:
Source code in docs_src/capo_transfer/_services/transfer.py
| def list_profiles(
self,
*,
config_overrides: Optional[TransferClientConfig] = None,
max_results: Optional["capo_transfer.types.max_results.MaxResults"] = None,
next_token: Optional["capo_transfer.types.next_token.NextToken"] = None,
profile_type: Optional["capo_transfer.types.profile_type.ProfileType"] = None,
) -> "capo_transfer.types.list_profiles_response.ListProfilesResponse":
"""<p>Returns a list of the profiles for your system. If you want to limit the results to a certain number, supply a value for the <code>MaxResults</code> parameter. If you ran the command previously and received a value for <code>NextToken</code>, you can supply that value to continue listing profiles from where you left off.</p>
Args:
max_results: <p>The maximum number of items to return.</p>
next_token: <p>When there are additional results that were not returned, a <code>NextToken</code> parameter is returned. You can use that value for a subsequent call to <code>ListProfiles</code> to continue listing results.</p>
profile_type: <p>Indicates whether to list only <code>LOCAL</code> type profiles or only <code>PARTNER</code> type profiles. If not supplied in the request, the command lists all types of profiles.</p>
Raises:
capo_transfer.errors.internal_service_error.InternalServiceError: <p>This exception is thrown when an error occurs in the Transfer Family service.</p>
capo_transfer.errors.invalid_next_token_exception.InvalidNextTokenException: <p>The <code>NextToken</code> parameter that was passed is invalid.</p>
capo_transfer.errors.invalid_request_exception.InvalidRequestException: <p>This exception is thrown when the client submits a malformed request.</p>
capo_transfer.errors.resource_not_found_exception.ResourceNotFoundException: <p>This exception is thrown when a resource is not found by the Amazon Web ServicesTransfer Family service.</p>
capo_transfer.errors.service_unavailable_exception.ServiceUnavailableException: <p>The request has failed because the Amazon Web ServicesTransfer Family service is not available.</p>
capo_transfer.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_transfer.types.list_profiles_request.ListProfilesRequest]",
) -> OperationResponse[
"capo_transfer.types.list_profiles_response.ListProfilesResponse"
]:
import capo_transfer._operations.transfer_service.list_profiles
output, http_response = (
capo_transfer._operations.transfer_service.list_profiles.list_profiles(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListProfiles")
)
input_: capo_transfer.types.list_profiles_request.ListProfilesRequest = {}
if max_results is not None:
input_["max_results"] = max_results
if next_token is not None:
input_["next_token"] = next_token
if profile_type is not None:
input_["profile_type"] = profile_type
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|