Lists the EC2 instances providing user-based subscriptions.
Parameters:
-
max_results
(Optional[BoxInteger], default:
None
)
–
The maximum number of results to return from a single request.
-
next_token
(Optional[str], default:
None
)
–
A token to specify where to start paginating. This is the nextToken from a previously truncated response.
-
filters
(Optional[FilterList], default:
None
)
–
You can use the following filters to streamline results:
Raises:
Source code in docs_src/capo_license_manager_user_subscriptions/_services/license_manager_user_subscriptions.py
| def list_instances(
self,
*,
config_overrides: Optional[LicenseManagerUserSubscriptionsClientConfig] = None,
max_results: Optional[
"capo_license_manager_user_subscriptions.types.box_integer.BoxInteger"
] = None,
next_token: Optional[str] = None,
filters: Optional[
"capo_license_manager_user_subscriptions.types.filter_list.FilterList"
] = None,
) -> "capo_license_manager_user_subscriptions.types.list_instances_response.ListInstancesResponse":
"""<p>Lists the EC2 instances providing user-based subscriptions.</p>
Args:
max_results: <p>The maximum number of results to return from a single request.</p>
next_token: <p>A token to specify where to start paginating. This is the nextToken from a previously truncated response.</p>
filters: <p>You can use the following filters to streamline results:</p> <ul> <li> <p>Status</p> </li> <li> <p>InstanceId</p> </li> </ul>
Raises:
capo_license_manager_user_subscriptions.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient access to perform this action.</p>
capo_license_manager_user_subscriptions.errors.conflict_exception.ConflictException: <p>The request couldn't be completed because it conflicted with the current state of the resource.</p>
capo_license_manager_user_subscriptions.errors.internal_server_exception.InternalServerException: <p>An exception occurred with the service.</p>
capo_license_manager_user_subscriptions.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource couldn't be found.</p>
capo_license_manager_user_subscriptions.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request failed because a service quota is exceeded.</p>
capo_license_manager_user_subscriptions.errors.throttling_exception.ThrottlingException: <p>The request was denied because of request throttling. Retry the request.</p>
capo_license_manager_user_subscriptions.errors.validation_exception.ValidationException: <p>A parameter is not valid.</p>
capo_license_manager_user_subscriptions.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_license_manager_user_subscriptions.types.list_instances_request.ListInstancesRequest]",
) -> OperationResponse[
"capo_license_manager_user_subscriptions.types.list_instances_response.ListInstancesResponse"
]:
import capo_license_manager_user_subscriptions._operations.license_manager_user_subscriptions.list_instances
output, http_response = (
capo_license_manager_user_subscriptions._operations.license_manager_user_subscriptions.list_instances.list_instances(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListInstances")
)
input_: capo_license_manager_user_subscriptions.types.list_instances_request.ListInstancesRequest = {}
if max_results is not None:
input_["max_results"] = max_results
if next_token is not None:
input_["next_token"] = next_token
if filters is not None:
input_["filters"] = filters
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|