Skip to content

list_stream_urls async

list_stream_urls(
    *,
    config_overrides: Optional[AsyncGameLiftStreamsClientConfig] = None,
    status: Optional[StreamUrlStatus] = None,
    stream_group_identifier: Optional[Identifier] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[MaxResults] = None,
) -> ListStreamUrlsOutput

Retrieves a list of the stream URLs in the current Amazon Web Services Region for your Amazon Web Services account. You can filter the results by status or by stream group. Use the pagination parameters to retrieve results as a set of sequential pages. If you delete the stream group or application that backs a stream URL, this operation updates that stream URL's status to REVOKED.

Parameters:

  • status (Optional[StreamUrlStatus], default: None ) –

    Filters the list to stream URLs with the specified status.

    • ACTIVE: The stream URL is valid and can start stream sessions.

    • EXPIRED: The stream URL has passed its expiration time and can no longer start stream sessions.

    • REVOKED: The stream URL was revoked and can no longer start stream sessions.

    • LIMIT_REACHED: The stream URL has been used the maximum number of times and can no longer start stream sessions.

  • stream_group_identifier (Optional[Identifier], default: None ) –

    Filters the list to stream URLs that belong to the specified stream group.

    This value is an Amazon Resource Name (ARN) or ID that uniquely identifies the stream group resource. Example ARN: arn:aws:gameliftstreams:us-west-2:111122223333:streamgroup/sg-1AB2C3De4. Example ID: sg-1AB2C3De4.

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

    The token that marks the start of the next set of results. Use this token when you retrieve results as sequential pages. To get the first page of results, omit a token value. To get the remaining pages, provide the token returned with the previous result set.

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

    The maximum number of results to return per page. Valid values are 1-100. The default is 25.

Raises:

  • AccessDeniedException –

    You don't have the required permissions to access this Amazon GameLift Streams resource. Correct the permissions before you try again.

  • InternalServerException –

    The service encountered an internal error and is unable to complete the request.

  • ThrottlingException –

    The request was denied due to request throttling. Retry the request after the suggested wait time.

  • ValidationException –

    One or more parameter values in the request fail to satisfy the specified constraints. Correct the invalid parameter values before retrying the request.

  • UnknownServiceError –

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

Source code in docs_src/capo_gameliftstreams/_services/async_game_lift_streams.py
async def list_stream_urls(
    self,
    *,
    config_overrides: Optional[AsyncGameLiftStreamsClientConfig] = None,
    status: Optional[
        "capo_gameliftstreams.types.stream_url_status.StreamUrlStatus"
    ] = None,
    stream_group_identifier: Optional[
        "capo_gameliftstreams.types.identifier.Identifier"
    ] = None,
    next_token: Optional["capo_gameliftstreams.types.next_token.NextToken"] = None,
    max_results: Optional[
        "capo_gameliftstreams.types.max_results.MaxResults"
    ] = None,
) -> "capo_gameliftstreams.types.list_stream_urls_output.ListStreamUrlsOutput":
    """<p>Retrieves a list of the stream URLs in the current Amazon Web Services Region for your Amazon Web Services account. You can filter the results by status or by stream group. Use the pagination parameters to retrieve results as a set of sequential pages. If you delete the stream group or application that backs a stream URL, this operation updates that stream URL's status to <code>REVOKED</code>.</p>

    Args:
        status: <p>Filters the list to stream URLs with the specified status.</p> <ul> <li> <p> <code>ACTIVE</code>: The stream URL is valid and can start stream sessions.</p> </li> <li> <p> <code>EXPIRED</code>: The stream URL has passed its expiration time and can no longer start stream sessions.</p> </li> <li> <p> <code>REVOKED</code>: The stream URL was revoked and can no longer start stream sessions.</p> </li> <li> <p> <code>LIMIT_REACHED</code>: The stream URL has been used the maximum number of times and can no longer start stream sessions.</p> </li> </ul>
        stream_group_identifier: <p>Filters the list to stream URLs that belong to the specified stream group.</p> <p>This value is an <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference-arns.html">Amazon Resource Name (ARN)</a> or ID that uniquely identifies the stream group resource. Example ARN: <code>arn:aws:gameliftstreams:us-west-2:111122223333:streamgroup/sg-1AB2C3De4</code>. Example ID: <code>sg-1AB2C3De4</code>. </p>
        next_token: <p>The token that marks the start of the next set of results. Use this token when you retrieve results as sequential pages. To get the first page of results, omit a token value. To get the remaining pages, provide the token returned with the previous result set. </p>
        max_results: <p>The maximum number of results to return per page. Valid values are 1-100. The default is 25.</p>

    Raises:
        capo_gameliftstreams.errors.access_denied_exception.AccessDeniedException: <p>You don't have the required permissions to access this Amazon GameLift Streams resource. Correct the permissions before you try again.</p>
        capo_gameliftstreams.errors.internal_server_exception.InternalServerException: <p>The service encountered an internal error and is unable to complete the request.</p>
        capo_gameliftstreams.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling. Retry the request after the suggested wait time.</p>
        capo_gameliftstreams.errors.validation_exception.ValidationException: <p>One or more parameter values in the request fail to satisfy the specified constraints. Correct the invalid parameter values before retrying the request.</p>
        capo_gameliftstreams.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_gameliftstreams.types.list_stream_urls_input.ListStreamUrlsInput]",
    ) -> AsyncOperationResponse[
        "capo_gameliftstreams.types.list_stream_urls_output.ListStreamUrlsOutput"
    ]:
        import capo_gameliftstreams._operations.game_lift_streams.list_stream_urls

        (
            output,
            http_response,
        ) = await capo_gameliftstreams._operations.game_lift_streams.list_stream_urls.async_list_stream_urls(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_gameliftstreams.types.list_stream_urls_output.ListStreamUrlsOutput",
    ) -> dict[str, Any]:
        import capo_gameliftstreams.types.list_stream_urls_output

        return capo_gameliftstreams.types.list_stream_urls_output.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("ListStreamUrls", redact_output=_redact_output),
    )
    input_: capo_gameliftstreams.types.list_stream_urls_input.ListStreamUrlsInput = {}
    if status is not None:
        input_["status"] = status
    if stream_group_identifier is not None:
        input_["stream_group_identifier"] = stream_group_identifier
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

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