Skip to content

describe_script async

describe_script(
    *,
    config_overrides: Optional[AsyncGameLiftClientConfig] = None,
    script_id: Optional[ScriptIdOrArn] = None,
) -> DescribeScriptOutput

This API works with the following fleet types: EC2

Retrieves properties for a Realtime script.

To request a script record, specify the script ID. If successful, an object containing the script properties is returned.

Learn more

Amazon GameLift Servers Amazon GameLift Servers Realtime

Related actions

All APIs by task

Parameters:

  • script_id (Optional[ScriptIdOrArn], default: None ) –

    A unique identifier for the Realtime script to retrieve properties for. You can use either the script ID or ARN value.

Raises:

  • InternalServiceException –

    The service encountered an unrecoverable internal failure while processing the request. Clients can retry such requests immediately or after a waiting period.

  • InvalidRequestException –

    One or more parameter values in the request are invalid. Correct the invalid parameter values before retrying.

  • NotFoundException –

    The requested resource was not found. The resource was either not created yet or deleted.

  • UnauthorizedException –

    The client failed authentication. Clients should not retry such requests.

  • UnknownServiceError –

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

Source code in docs_src/capo_gamelift/_services/async_game_lift.py
async def describe_script(
    self,
    *,
    config_overrides: Optional[AsyncGameLiftClientConfig] = None,
    script_id: Optional[
        "capo_gamelift.types.script_id_or_arn.ScriptIdOrArn"
    ] = None,
) -> "capo_gamelift.types.describe_script_output.DescribeScriptOutput":
    """<p> <b>This API works with the following fleet types:</b> EC2</p> <p>Retrieves properties for a Realtime script. </p> <p>To request a script record, specify the script ID. If successful, an object containing the script properties is returned.</p> <p> <b>Learn more</b> </p> <p> <a href="https://docs.aws.amazon.com/gamelift/latest/developerguide/realtime-intro.html">Amazon GameLift Servers Amazon GameLift Servers Realtime</a> </p> <p> <b>Related actions</b> </p> <p> <a href="https://docs.aws.amazon.com/gamelift/latest/developerguide/reference-awssdk.html#reference-awssdk-resources-fleets">All APIs by task</a> </p>

    Args:
        script_id: <p>A unique identifier for the Realtime script to retrieve properties for. You can use either the script ID or ARN value.</p>

    Raises:
        capo_gamelift.errors.internal_service_exception.InternalServiceException: <p>The service encountered an unrecoverable internal failure while processing the request. Clients can retry such requests immediately or after a waiting period.</p>
        capo_gamelift.errors.invalid_request_exception.InvalidRequestException: <p>One or more parameter values in the request are invalid. Correct the invalid parameter values before retrying.</p>
        capo_gamelift.errors.not_found_exception.NotFoundException: <p>The requested resource was not found. The resource was either not created yet or deleted.</p>
        capo_gamelift.errors.unauthorized_exception.UnauthorizedException: <p>The client failed authentication. Clients should not retry such requests.</p>
        capo_gamelift.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_gamelift.types.describe_script_input.DescribeScriptInput]",
    ) -> AsyncOperationResponse[
        "capo_gamelift.types.describe_script_output.DescribeScriptOutput"
    ]:
        import capo_gamelift._operations.game_lift.describe_script

        (
            output,
            http_response,
        ) = await capo_gamelift._operations.game_lift.describe_script.async_describe_script(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeScript")
    )
    input_: capo_gamelift.types.describe_script_input.DescribeScriptInput = {}
    if script_id is not None:
        input_["script_id"] = script_id

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