Skip to content

get_introspection_schema async

get_introspection_schema(
    api_id: String,
    format: OutputType,
    *,
    config_overrides: Optional[AsyncAppSyncClientConfig] = None,
    include_directives: Optional[BooleanValue] = None,
) -> GetIntrospectionSchemaResponse

Retrieves the introspection schema for a GraphQL API.

Parameters:

  • api_id (String) –

    The API ID.

  • format (OutputType) –

    The schema format: SDL or JSON.

  • include_directives (Optional[BooleanValue], default: None ) –

    A flag that specifies whether the schema introspection should contain directives.

Raises:

Source code in docs_src/capo_appsync/_services/async_app_sync.py
async def get_introspection_schema(
    self,
    api_id: "capo_appsync.types.string.String",
    format: "capo_appsync.types.output_type.OutputType",
    *,
    config_overrides: Optional[AsyncAppSyncClientConfig] = None,
    include_directives: Optional[
        "capo_appsync.types.boolean_value.BooleanValue"
    ] = None,
) -> "capo_appsync.types.get_introspection_schema_response.GetIntrospectionSchemaResponse":
    """<p>Retrieves the introspection schema for a GraphQL API.</p>

    Args:
        api_id: <p>The API ID.</p>
        format: <p>The schema format: SDL or JSON.</p>
        include_directives: <p>A flag that specifies whether the schema introspection should contain directives.</p>

    Raises:
        capo_appsync.errors.graph_ql_schema_exception.GraphQLSchemaException: <p>The GraphQL schema is not valid.</p>
        capo_appsync.errors.internal_failure_exception.InternalFailureException: <p>An internal AppSync error occurred. Try your request again.</p>
        capo_appsync.errors.not_found_exception.NotFoundException: <p>The resource specified in the request was not found. Check the resource, and then try again.</p>
        capo_appsync.errors.unauthorized_exception.UnauthorizedException: <p>You aren't authorized to perform this operation.</p>
        capo_appsync.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_appsync.types.get_introspection_schema_request.GetIntrospectionSchemaRequest]",
    ) -> AsyncOperationResponse[
        "capo_appsync.types.get_introspection_schema_response.GetIntrospectionSchemaResponse"
    ]:
        import capo_appsync._operations.aws_deepdish_control_plane_service.get_introspection_schema

        (
            output,
            http_response,
        ) = await capo_appsync._operations.aws_deepdish_control_plane_service.get_introspection_schema.async_get_introspection_schema(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetIntrospectionSchema")
    )
    input_: capo_appsync.types.get_introspection_schema_request.GetIntrospectionSchemaRequest = {
        "api_id": api_id,
        "format": format,
    }
    if include_directives is not None:
        input_["include_directives"] = include_directives

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