Retrieves a list of the source endpoints in your account. The results are paginated. Use the NextToken value that's returned to retrieve additional results.
Parameters:
-
max_results
(Optional[int], default:
None
)
–
The maximum number of results to return in a single request. The valid range is 1 to 100. If you don't specify a value, the service returns up to 100 results.
-
next_token
(Optional[str], default:
None
)
–
The token that identifies the next page of results to return. Use the token that a previous request returned.
-
filters
(Optional[SourceEndpointFilterList], default:
None
)
–
The filters to apply to the list of source endpoints.
Raises:
-
BadRequestException
–
This exception is thrown if the request contains a semantic error. The precise meaning depends on the API, and is documented in the error message.
-
ConflictException
–
The requested operation would cause a conflict with the current state of a service resource associated with the request. Resolve the conflict before retrying this request.
-
InternalServerErrorException
–
The server encountered an internal error and is unable to complete the request.
-
ServiceUnavailableException
–
The service is currently unavailable or busy.
-
TooManyRequestsException
–
The request was denied due to request throttling.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_mediaconnect/_services/media_connect.py
| def list_source_endpoints(
self,
*,
config_overrides: Optional[MediaConnectClientConfig] = None,
max_results: Optional[int] = None,
next_token: Optional[str] = None,
filters: Optional[
"capo_mediaconnect.types.source_endpoint_filter_list.SourceEndpointFilterList"
] = None,
) -> "capo_mediaconnect.types.list_source_endpoints_response.ListSourceEndpointsResponse":
"""<p>Retrieves a list of the source endpoints in your account. The results are paginated. Use the NextToken value that's returned to retrieve additional results.</p>
Args:
max_results: <p>The maximum number of results to return in a single request. The valid range is 1 to 100. If you don't specify a value, the service returns up to 100 results.</p>
next_token: <p>The token that identifies the next page of results to return. Use the token that a previous request returned.</p>
filters: <p>The filters to apply to the list of source endpoints.</p>
Raises:
capo_mediaconnect.errors.bad_request_exception.BadRequestException: <p>This exception is thrown if the request contains a semantic error. The precise meaning depends on the API, and is documented in the error message. </p>
capo_mediaconnect.errors.conflict_exception.ConflictException: <p>The requested operation would cause a conflict with the current state of a service resource associated with the request. Resolve the conflict before retrying this request. </p>
capo_mediaconnect.errors.internal_server_error_exception.InternalServerErrorException: <p>The server encountered an internal error and is unable to complete the request. </p>
capo_mediaconnect.errors.service_unavailable_exception.ServiceUnavailableException: <p>The service is currently unavailable or busy. </p>
capo_mediaconnect.errors.too_many_requests_exception.TooManyRequestsException: <p>The request was denied due to request throttling. </p>
capo_mediaconnect.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_mediaconnect.types.list_source_endpoints_request.ListSourceEndpointsRequest]",
) -> OperationResponse[
"capo_mediaconnect.types.list_source_endpoints_response.ListSourceEndpointsResponse"
]:
import capo_mediaconnect._operations.media_connect.list_source_endpoints
output, http_response = (
capo_mediaconnect._operations.media_connect.list_source_endpoints.list_source_endpoints(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListSourceEndpoints")
)
input_: capo_mediaconnect.types.list_source_endpoints_request.ListSourceEndpointsRequest = {}
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
|