Lists the modules that you can attach, newest first by createdAt. Results are paginated. Use nextToken to get the next page.
Parameters:
-
subscription_type
(Optional[SubscriptionType], default:
None
)
–
Lists only modules that you have access to this way.
-
max_results
(Optional[int], default:
None
)
–
The maximum number of results for each page, from 1 to 10. The default is 10.
-
next_token
(Optional[str], default:
None
)
–
If nextToken is returned, there are more results available. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours; using an expired token fails with ValidationException.
Raises:
-
AccessDeniedException
–
The request could not be completed because you do not have sufficient access to perform this action.
-
InternalServerException
–
The request could not be completed because of an internal server error. Try your call again.
-
ThrottlingException
–
The request was denied due to request throttling.
-
ValidationException
–
The request could not be completed because it fails satisfy the constraints specified by the service.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Examples:
List the modules you subscribe to through AWS Marketplace
Lists the Marketplace modules that you can attach.
>>> client.list_available_modules(subscription_type='MARKETPLACE', max_results=10)
Source code in docs_src/capo_rtbfabric/_services/rtb_fabric.py
| def list_available_modules(
self,
*,
config_overrides: Optional[RTBFabricClientConfig] = None,
subscription_type: Optional[
"capo_rtbfabric.types.subscription_type.SubscriptionType"
] = None,
max_results: Optional[int] = None,
next_token: Optional[str] = None,
) -> "capo_rtbfabric.types.list_available_modules_response.ListAvailableModulesResponse":
"""<p>Lists the modules that you can attach, newest first by <code>createdAt</code>. Results are paginated. Use <code>nextToken</code> to get the next page.</p>
Args:
subscription_type: <p>Lists only modules that you have access to this way.</p>
max_results: <p>The maximum number of results for each page, from 1 to 10. The default is 10.</p>
next_token: <p>If nextToken is returned, there are more results available. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours; using an expired token fails with ValidationException.</p>
Raises:
capo_rtbfabric.errors.access_denied_exception.AccessDeniedException: <p>The request could not be completed because you do not have sufficient access to perform this action.</p>
capo_rtbfabric.errors.internal_server_exception.InternalServerException: <p>The request could not be completed because of an internal server error. Try your call again.</p>
capo_rtbfabric.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
capo_rtbfabric.errors.validation_exception.ValidationException: <p>The request could not be completed because it fails satisfy the constraints specified by the service.</p>
capo_rtbfabric.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
List the modules you subscribe to through AWS Marketplace
Lists the Marketplace modules that you can attach.
>>> client.list_available_modules(subscription_type='MARKETPLACE', max_results=10)
"""
def _handler(
req: "OperationRequest[capo_rtbfabric.types.list_available_modules_request.ListAvailableModulesRequest]",
) -> OperationResponse[
"capo_rtbfabric.types.list_available_modules_response.ListAvailableModulesResponse"
]:
import capo_rtbfabric._operations.rtb_fabric.list_available_modules
output, http_response = (
capo_rtbfabric._operations.rtb_fabric.list_available_modules.list_available_modules(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListAvailableModules")
)
input_: capo_rtbfabric.types.list_available_modules_request.ListAvailableModulesRequest = {}
if subscription_type is not None:
input_["subscription_type"] = subscription_type
if max_results is not None:
input_["max_results"] = max_results
if next_token is not None:
input_["next_token"] = next_token
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|