Retrieves the record of an existing introspection. If the retrieval is successful, the result of the instrospection will also be returned. If the retrieval fails the operation, an error message will be returned instead.
Parameters:
-
introspection_id
(String)
–
The introspection ID. Each introspection contains a unique ID that can be used to reference the instrospection record.
-
include_models_sdl
(Optional[Boolean], default:
None
)
–
A boolean flag that determines whether SDL should be generated for introspected types. If set to true, each model will contain an sdl property that contains the SDL for that type. The SDL only contains the type data and no additional metadata or directives.
-
next_token
(Optional[PaginationToken], default:
None
)
–
Determines the number of types to be returned in a single response before paginating. This value is typically taken from nextToken value from the previous response.
-
max_results
(Optional[MaxResults], default:
None
)
–
The maximum number of introspected types that will be returned in a single response.
Raises:
-
BadRequestException
–
The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and then try again.
-
InternalFailureException
–
An internal AppSync error occurred. Try your request again.
-
NotFoundException
–
The resource specified in the request was not found. Check the resource, and then try again.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_appsync/_services/app_sync.py
| def get_data_source_introspection(
self,
introspection_id: "capo_appsync.types.string.String",
*,
config_overrides: Optional[AppSyncClientConfig] = None,
include_models_sdl: Optional["capo_appsync.types.boolean.Boolean"] = None,
next_token: Optional[
"capo_appsync.types.pagination_token.PaginationToken"
] = None,
max_results: Optional["capo_appsync.types.max_results.MaxResults"] = None,
) -> "capo_appsync.types.get_data_source_introspection_response.GetDataSourceIntrospectionResponse":
"""<p>Retrieves the record of an existing introspection. If the retrieval is successful, the result of the instrospection will also be returned. If the retrieval fails the operation, an error message will be returned instead.</p>
Args:
introspection_id: <p>The introspection ID. Each introspection contains a unique ID that can be used to reference the instrospection record.</p>
include_models_sdl: <p>A boolean flag that determines whether SDL should be generated for introspected types. If set to <code>true</code>, each model will contain an <code>sdl</code> property that contains the SDL for that type. The SDL only contains the type data and no additional metadata or directives. </p>
next_token: <p>Determines the number of types to be returned in a single response before paginating. This value is typically taken from <code>nextToken</code> value from the previous response.</p>
max_results: <p>The maximum number of introspected types that will be returned in a single response.</p>
Raises:
capo_appsync.errors.bad_request_exception.BadRequestException: <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and then try again.</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.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_appsync.types.get_data_source_introspection_request.GetDataSourceIntrospectionRequest]",
) -> OperationResponse[
"capo_appsync.types.get_data_source_introspection_response.GetDataSourceIntrospectionResponse"
]:
import capo_appsync._operations.aws_deepdish_control_plane_service.get_data_source_introspection
output, http_response = (
capo_appsync._operations.aws_deepdish_control_plane_service.get_data_source_introspection.get_data_source_introspection(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetDataSourceIntrospection")
)
input_: capo_appsync.types.get_data_source_introspection_request.GetDataSourceIntrospectionRequest = {
"introspection_id": introspection_id
}
if include_models_sdl is not None:
input_["include_models_sdl"] = include_models_sdl
if next_token is not None:
input_["next_token"] = next_token
if max_results is not None:
input_["max_results"] = max_results
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|