Skip to content

describe_endpoints async

describe_endpoints(
    *,
    config_overrides: Optional[AsyncMediaConvertClientConfig] = None,
    max_results: Optional[__integer] = None,
    mode: Optional[DescribeEndpointsMode] = None,
    next_token: Optional[__string] = None,
) -> DescribeEndpointsResponse

Send a request with an empty body to the regional API endpoint to get your account API endpoint. Note that DescribeEndpoints is no longer required. We recommend that you send your requests directly to the regional endpoint instead.

Parameters:

  • max_results (Optional[__integer], default: None ) –

    Optional. Max number of endpoints, up to twenty, that will be returned at one time.

  • mode (Optional[DescribeEndpointsMode], default: None ) –

    Optional field, defaults to DEFAULT. Specify DEFAULT for this operation to return your endpoints if any exist, or to create an endpoint for you and return it if one doesn't already exist. Specify GET_ONLY to return your endpoints if any exist, or an empty list if none exist.

  • next_token (Optional[__string], default: None ) –

    Use this string, provided with the response to a previous request, to request the next batch of endpoints.

Raises:

  • BadRequestException –

    The service can't process your request because of a problem in the request. Please check your request form and syntax.

  • ConflictException –

    The service couldn't complete your request because there is a conflict with the current state of the resource.

  • ForbiddenException –

    You don't have permissions for this action with the credentials you sent.

  • InternalServerErrorException –

    The service encountered an unexpected condition and can't fulfill your request.

  • NotFoundException –

    The resource you requested doesn't exist.

  • ServiceQuotaExceededException –

    You attempted to create more resources than the service allows based on service quotas.

  • TooManyRequestsException –

    Too many requests have been sent in too short of a time. The service limits the rate at which it will accept requests.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_mediaconvert/_services/async_media_convert.py
async def describe_endpoints(
    self,
    *,
    config_overrides: Optional[AsyncMediaConvertClientConfig] = None,
    max_results: Optional["capo_mediaconvert.types.__integer.__integer"] = None,
    mode: Optional[
        "capo_mediaconvert.types.describe_endpoints_mode.DescribeEndpointsMode"
    ] = None,
    next_token: Optional["capo_mediaconvert.types.__string.__string"] = None,
) -> (
    "capo_mediaconvert.types.describe_endpoints_response.DescribeEndpointsResponse"
):
    """Send a request with an empty body to the regional API endpoint to get your account API endpoint. Note that DescribeEndpoints is no longer required. We recommend that you send your requests directly to the regional endpoint instead.

    Args:
        max_results: Optional. Max number of endpoints, up to twenty, that will be returned at one time.
        mode: Optional field, defaults to DEFAULT. Specify DEFAULT for this operation to return your endpoints if any exist, or to create an endpoint for you and return it if one doesn't already exist. Specify GET_ONLY to return your endpoints if any exist, or an empty list if none exist.
        next_token: Use this string, provided with the response to a previous request, to request the next batch of endpoints.

    Raises:
        capo_mediaconvert.errors.bad_request_exception.BadRequestException: The service can't process your request because of a problem in the request. Please check your request form and syntax.
        capo_mediaconvert.errors.conflict_exception.ConflictException: The service couldn't complete your request because there is a conflict with the current state of the resource.
        capo_mediaconvert.errors.forbidden_exception.ForbiddenException: You don't have permissions for this action with the credentials you sent.
        capo_mediaconvert.errors.internal_server_error_exception.InternalServerErrorException: The service encountered an unexpected condition and can't fulfill your request.
        capo_mediaconvert.errors.not_found_exception.NotFoundException: The resource you requested doesn't exist.
        capo_mediaconvert.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: You attempted to create more resources than the service allows based on service quotas.
        capo_mediaconvert.errors.too_many_requests_exception.TooManyRequestsException: Too many requests have been sent in too short of a time. The service limits the rate at which it will accept requests.
        capo_mediaconvert.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_mediaconvert.types.describe_endpoints_request.DescribeEndpointsRequest]",
    ) -> AsyncOperationResponse[
        "capo_mediaconvert.types.describe_endpoints_response.DescribeEndpointsResponse"
    ]:
        import capo_mediaconvert._operations.media_convert.describe_endpoints

        (
            output,
            http_response,
        ) = await capo_mediaconvert._operations.media_convert.describe_endpoints.async_describe_endpoints(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeEndpoints")
    )
    input_: capo_mediaconvert.types.describe_endpoints_request.DescribeEndpointsRequest = {}
    if max_results is not None:
        input_["max_results"] = max_results
    if mode is not None:
        input_["mode"] = mode
    if next_token is not None:
        input_["next_token"] = next_token

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output