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.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { AppSyncClient, GetDataSourceIntrospectionCommand } from "@aws-sdk/client-appsync"; // ES Modules import + * // const { AppSyncClient, GetDataSourceIntrospectionCommand } = require("@aws-sdk/client-appsync"); // CommonJS import + * const client = new AppSyncClient(config); + * const input = { // GetDataSourceIntrospectionRequest + * introspectionId: "STRING_VALUE", // required + * includeModelsSDL: true || false, + * nextToken: "STRING_VALUE", + * maxResults: Number("int"), + * }; + * const command = new GetDataSourceIntrospectionCommand(input); + * const response = await client.send(command); + * // { // GetDataSourceIntrospectionResponse + * // introspectionId: "STRING_VALUE", + * // introspectionStatus: "PROCESSING" || "FAILED" || "SUCCESS", + * // introspectionStatusDetail: "STRING_VALUE", + * // introspectionResult: { // DataSourceIntrospectionResult + * // models: [ // DataSourceIntrospectionModels + * // { // DataSourceIntrospectionModel + * // name: "STRING_VALUE", + * // fields: [ // DataSourceIntrospectionModelFields + * // { // DataSourceIntrospectionModelField + * // name: "STRING_VALUE", + * // type: { // DataSourceIntrospectionModelFieldType + * // kind: "STRING_VALUE", + * // name: "STRING_VALUE", + * // type: { + * // kind: "STRING_VALUE", + * // name: "STRING_VALUE", + * // type: "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.
+ * + * @throws {@link InternalFailureException} (server fault) + *An internal AppSync error occurred. Try your request again.
+ * + * @throws {@link NotFoundException} (client fault) + *The resource specified in the request was not found. Check the resource, and then try + * again.
+ * + * @throws {@link AppSyncServiceException} + *Base exception class for all service exceptions from AppSync service.
+ * + */ +export class GetDataSourceIntrospectionCommand extends $Command< + GetDataSourceIntrospectionCommandInput, + GetDataSourceIntrospectionCommandOutput, + AppSyncClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: GetDataSourceIntrospectionCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStackCreates a new introspection. Returns the introspectionId
of the new introspection after its
+ * creation.
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.
+ * + * @throws {@link InternalFailureException} (server fault) + *An internal AppSync error occurred. Try your request again.
+ * + * @throws {@link NotFoundException} (client fault) + *The resource specified in the request was not found. Check the resource, and then try + * again.
+ * + * @throws {@link UnauthorizedException} (client fault) + *You aren't authorized to perform this operation.
+ * + * @throws {@link AppSyncServiceException} + *Base exception class for all service exceptions from AppSync service.
+ * + */ +export class StartDataSourceIntrospectionCommand extends $Command< + StartDataSourceIntrospectionCommandInput, + StartDataSourceIntrospectionCommandOutput, + AppSyncClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: StartDataSourceIntrospectionCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStackThe introspection ID. Each introspection contains a unique ID that can be used to reference the + * instrospection record.
+ */ + introspectionId: string | undefined; + + /** + * @public + *A boolean flag that determines whether SDL should be generated for introspected types or not. 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.
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.
The maximum number of introspected types that will be returned in a single response.
+ */ + maxResults?: number; +} + +/** + * @public + *The index that was retrieved from the introspected data.
+ */ +export interface DataSourceIntrospectionModelIndex { + /** + * @public + *The name of the index.
+ */ + name?: string; + + /** + * @public + *The fields of the index.
+ */ + fields?: string[]; +} + +/** + * @public + * @enum + */ +export const DataSourceIntrospectionStatus = { + FAILED: "FAILED", + PROCESSING: "PROCESSING", + SUCCESS: "SUCCESS", +} as const; + +/** + * @public + */ +export type DataSourceIntrospectionStatus = + (typeof DataSourceIntrospectionStatus)[keyof typeof DataSourceIntrospectionStatus]; + /** * @public */ @@ -4165,6 +4232,73 @@ export interface ListTypesByAssociationResponse { nextToken?: string; } +/** + * @public + *Contains the metadata required to introspect the RDS cluster.
+ */ +export interface RdsDataApiConfig { + /** + * @public + *The resource ARN of the RDS cluster.
+ */ + resourceArn: string | undefined; + + /** + * @public + *The secret's ARN that was obtained from Secrets Manager. A secret consists of secret information, the secret + * value, plus metadata about the secret. A secret value can be a string or binary. It typically includes the ARN, + * secret name and description, policies, tags, encryption key from the Key Management Service, and key rotation + * data.
+ */ + secretArn: string | undefined; + + /** + * @public + *The name of the database in the cluster.
+ */ + databaseName: string | undefined; +} + +/** + * @public + */ +export interface StartDataSourceIntrospectionRequest { + /** + * @public + *The rdsDataApiConfig
object data.
The introspection ID. Each introspection contains a unique ID that can be used to reference the + * instrospection record.
+ */ + introspectionId?: string; + + /** + * @public + *The status of the introspection during creation. By default, when a new instrospection has been created, the
+ * status will be set to PROCESSING
. Once the operation has been completed, the status will change to
+ * SUCCESS
or FAILED
depending on how the data was parsed. A FAILED
+ * operation will return an error and its details as an introspectionStatusDetail
.
The error detail field. When a FAILED
+ * introspectionStatus
is returned, the introspectionStatusDetail
will also return the
+ * exact error that was generated during the operation.
Represents the type data for each field retrieved from the introspection.
+ */ +export interface DataSourceIntrospectionModelFieldType { + /** + * @public + *Specifies the classification of data. For example, this could be set to values like Scalar
or
+ * NonNull
to indicate a fundamental property of the field.
Valid values include:
+ *
+ * Scalar
: Indicates the value is a primitive type (scalar).
+ * NonNull
: Indicates the field cannot be null
.
+ * List
: Indicates the field contains a list.
The name of the data type that represents the field. For example, String
is a valid
+ * name
value.
The DataSourceIntrospectionModelFieldType
object data. The type
is only present if
+ * DataSourceIntrospectionModelFieldType.kind
is set to NonNull
or List
.
The type
typically contains its own kind
and name
fields to represent
+ * the actual type data. For instance, type
could contain a kind
value of
+ * Scalar
with a name
value of String
. The values Scalar
+ * and String
will be collectively stored in the values
field.
The values of the type
field. This field represents the AppSync data type equivalent of the
+ * introspected field.
Represents the fields that were retrieved from the introspected data.
+ */ +export interface DataSourceIntrospectionModelField { + /** + * @public + *The name of the field that was retrieved from the introspected data.
+ */ + name?: string; + + /** + * @public + *The DataSourceIntrospectionModelFieldType
object data.
The length value of the introspected field.
+ */ + length?: number; +} + +/** + * @public + *Contains the introspected data that was retrieved from the data source.
+ */ +export interface DataSourceIntrospectionModel { + /** + * @public + *The name of the model. For example, this could be the name of a single table in a database.
+ */ + name?: string; + + /** + * @public + *The DataSourceIntrospectionModelField
object data.
The primary key stored as a DataSourceIntrospectionModelIndex
object.
The array of DataSourceIntrospectionModelIndex
objects.
Contains the output of the SDL that was generated from the introspected types. This is controlled by the
+ * includeModelsSDL
parameter of the GetDataSourceIntrospection
operation.
Represents the output of a DataSourceIntrospectionResult
. This is the populated result of a
+ * GetDataSourceIntrospection
operation.
The array of DataSourceIntrospectionModel
objects.
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.
The introspection ID. Each introspection contains a unique ID that can be used to reference the + * instrospection record.
+ */ + introspectionId?: string; + + /** + * @public + *The status of the introspection during retrieval. By default, when a new instrospection is being retrieved,
+ * the status will be set to PROCESSING
. Once the operation has been completed, the status will
+ * change to SUCCESS
or FAILED
depending on how the data was parsed. A
+ * FAILED
operation will return an error and its details as an
+ * introspectionStatusDetail
.
The error detail field. When a FAILED
+ * introspectionStatus
is returned, the introspectionStatusDetail
will also return the
+ * exact error that was generated during the operation.
The DataSourceIntrospectionResult
object data.
Describes a data source.
" } }, + "com.amazonaws.appsync#DataSourceIntrospectionModel": { + "type": "structure", + "members": { + "name": { + "target": "com.amazonaws.appsync#String", + "traits": { + "smithy.api#documentation": "The name of the model. For example, this could be the name of a single table in a database.
" + } + }, + "fields": { + "target": "com.amazonaws.appsync#DataSourceIntrospectionModelFields", + "traits": { + "smithy.api#documentation": "The DataSourceIntrospectionModelField
object data.
The primary key stored as a DataSourceIntrospectionModelIndex
object.
The array of DataSourceIntrospectionModelIndex
objects.
Contains the output of the SDL that was generated from the introspected types. This is controlled by the\n includeModelsSDL
parameter of the GetDataSourceIntrospection
operation.
Contains the introspected data that was retrieved from the data source.
" + } + }, + "com.amazonaws.appsync#DataSourceIntrospectionModelField": { + "type": "structure", + "members": { + "name": { + "target": "com.amazonaws.appsync#String", + "traits": { + "smithy.api#documentation": "The name of the field that was retrieved from the introspected data.
" + } + }, + "type": { + "target": "com.amazonaws.appsync#DataSourceIntrospectionModelFieldType", + "traits": { + "smithy.api#documentation": "The DataSourceIntrospectionModelFieldType
object data.
The length value of the introspected field.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Represents the fields that were retrieved from the introspected data.
" + } + }, + "com.amazonaws.appsync#DataSourceIntrospectionModelFieldType": { + "type": "structure", + "members": { + "kind": { + "target": "com.amazonaws.appsync#String", + "traits": { + "smithy.api#documentation": "Specifies the classification of data. For example, this could be set to values like Scalar
or\n NonNull
to indicate a fundamental property of the field.
Valid values include:
\n\n Scalar
: Indicates the value is a primitive type (scalar).
\n NonNull
: Indicates the field cannot be null
.
\n List
: Indicates the field contains a list.
The name of the data type that represents the field. For example, String
is a valid\n name
value.
The DataSourceIntrospectionModelFieldType
object data. The type
is only present if\n DataSourceIntrospectionModelFieldType.kind
is set to NonNull
or List
.
The type
typically contains its own kind
and name
fields to represent\n the actual type data. For instance, type
could contain a kind
value of\n Scalar
with a name
value of String
. The values Scalar
\n and String
will be collectively stored in the values
field.
The values of the type
field. This field represents the AppSync data type equivalent of the\n introspected field.
Represents the type data for each field retrieved from the introspection.
" + } + }, + "com.amazonaws.appsync#DataSourceIntrospectionModelFieldTypeValues": { + "type": "list", + "member": { + "target": "com.amazonaws.appsync#String" + } + }, + "com.amazonaws.appsync#DataSourceIntrospectionModelFields": { + "type": "list", + "member": { + "target": "com.amazonaws.appsync#DataSourceIntrospectionModelField" + } + }, + "com.amazonaws.appsync#DataSourceIntrospectionModelIndex": { + "type": "structure", + "members": { + "name": { + "target": "com.amazonaws.appsync#String", + "traits": { + "smithy.api#documentation": "The name of the index.
" + } + }, + "fields": { + "target": "com.amazonaws.appsync#DataSourceIntrospectionModelIndexFields", + "traits": { + "smithy.api#documentation": "The fields of the index.
" + } + } + }, + "traits": { + "smithy.api#documentation": "The index that was retrieved from the introspected data.
" + } + }, + "com.amazonaws.appsync#DataSourceIntrospectionModelIndexFields": { + "type": "list", + "member": { + "target": "com.amazonaws.appsync#String" + } + }, + "com.amazonaws.appsync#DataSourceIntrospectionModelIndexes": { + "type": "list", + "member": { + "target": "com.amazonaws.appsync#DataSourceIntrospectionModelIndex" + } + }, + "com.amazonaws.appsync#DataSourceIntrospectionModels": { + "type": "list", + "member": { + "target": "com.amazonaws.appsync#DataSourceIntrospectionModel" + } + }, + "com.amazonaws.appsync#DataSourceIntrospectionResult": { + "type": "structure", + "members": { + "models": { + "target": "com.amazonaws.appsync#DataSourceIntrospectionModels", + "traits": { + "smithy.api#documentation": "The array of DataSourceIntrospectionModel
objects.
Determines the number of types to be returned in a single response before paginating. This value is\n typically taken from nextToken
value from the previous response.
Represents the output of a DataSourceIntrospectionResult
. This is the populated result of a\n GetDataSourceIntrospection
operation.
Retrieves the record of an existing introspection. If the retrieval is successful, the result of the\n instrospection will also be returned. If the retrieval fails the operation, an error message will be returned\n instead.
", + "smithy.api#http": { + "method": "GET", + "uri": "/v1/datasources/introspections/{introspectionId}", + "code": 200 + } + } + }, + "com.amazonaws.appsync#GetDataSourceIntrospectionRequest": { + "type": "structure", + "members": { + "introspectionId": { + "target": "com.amazonaws.appsync#String", + "traits": { + "smithy.api#documentation": "The introspection ID. Each introspection contains a unique ID that can be used to reference the\n instrospection record.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "includeModelsSDL": { + "target": "com.amazonaws.appsync#Boolean", + "traits": { + "smithy.api#default": false, + "smithy.api#documentation": "A boolean flag that determines whether SDL should be generated for introspected types or not. If set to\n true
, each model will contain an sdl
property that contains the SDL for that type.\n The SDL only contains the type data and no additional metadata or directives.
Determines the number of types to be returned in a single response before paginating. This value is\n typically taken from nextToken
value from the previous response.
The maximum number of introspected types that will be returned in a single response.
", + "smithy.api#httpQuery": "maxResults" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.appsync#GetDataSourceIntrospectionResponse": { + "type": "structure", + "members": { + "introspectionId": { + "target": "com.amazonaws.appsync#String", + "traits": { + "smithy.api#documentation": "The introspection ID. Each introspection contains a unique ID that can be used to reference the\n instrospection record.
" + } + }, + "introspectionStatus": { + "target": "com.amazonaws.appsync#DataSourceIntrospectionStatus", + "traits": { + "smithy.api#documentation": "The status of the introspection during retrieval. By default, when a new instrospection is being retrieved,\n the status will be set to PROCESSING
. Once the operation has been completed, the status will\n change to SUCCESS
or FAILED
depending on how the data was parsed. A\n FAILED
operation will return an error and its details as an\n introspectionStatusDetail
.
The error detail field. When a FAILED
\n introspectionStatus
is returned, the introspectionStatusDetail
will also return the\n exact error that was generated during the operation.
The DataSourceIntrospectionResult
object data.
The pipeline configuration for a resolver of kind PIPELINE
.
The resource ARN of the RDS cluster.
", + "smithy.api#required": {} + } + }, + "secretArn": { + "target": "com.amazonaws.appsync#RdsDataApiConfigSecretArn", + "traits": { + "smithy.api#documentation": "The secret's ARN that was obtained from Secrets Manager. A secret consists of secret information, the secret\n value, plus metadata about the secret. A secret value can be a string or binary. It typically includes the ARN,\n secret name and description, policies, tags, encryption key from the Key Management Service, and key rotation\n data.
", + "smithy.api#required": {} + } + }, + "databaseName": { + "target": "com.amazonaws.appsync#RdsDataApiConfigDatabaseName", + "traits": { + "smithy.api#documentation": "The name of the database in the cluster.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Contains the metadata required to introspect the RDS cluster.
" + } + }, + "com.amazonaws.appsync#RdsDataApiConfigDatabaseName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 128 + } + } + }, + "com.amazonaws.appsync#RdsDataApiConfigResourceArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 20, + "max": 2048 + }, + "smithy.api#pattern": "^arn:[a-z-]*:rds:[a-z0-9-]*:\\d{12}:cluster:[0-9A-Za-z_/-]*$" + } + }, + "com.amazonaws.appsync#RdsDataApiConfigSecretArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 20, + "max": 2048 + }, + "smithy.api#pattern": "^arn:[a-z-]*:secretsmanager:[a-z0-9-]*:\\d{12}:secret:[0-9A-Za-z_/-]*$" + } + }, "com.amazonaws.appsync#RdsHttpEndpointConfig": { "type": "structure", "members": { @@ -7037,6 +7390,77 @@ "target": "com.amazonaws.appsync#SourceApiAssociationSummary" } }, + "com.amazonaws.appsync#StartDataSourceIntrospection": { + "type": "operation", + "input": { + "target": "com.amazonaws.appsync#StartDataSourceIntrospectionRequest" + }, + "output": { + "target": "com.amazonaws.appsync#StartDataSourceIntrospectionResponse" + }, + "errors": [ + { + "target": "com.amazonaws.appsync#BadRequestException" + }, + { + "target": "com.amazonaws.appsync#InternalFailureException" + }, + { + "target": "com.amazonaws.appsync#NotFoundException" + }, + { + "target": "com.amazonaws.appsync#UnauthorizedException" + } + ], + "traits": { + "smithy.api#documentation": "Creates a new introspection. Returns the introspectionId
of the new introspection after its\n creation.
The rdsDataApiConfig
object data.
The introspection ID. Each introspection contains a unique ID that can be used to reference the\n instrospection record.
" + } + }, + "introspectionStatus": { + "target": "com.amazonaws.appsync#DataSourceIntrospectionStatus", + "traits": { + "smithy.api#documentation": "The status of the introspection during creation. By default, when a new instrospection has been created, the\n status will be set to PROCESSING
. Once the operation has been completed, the status will change to\n SUCCESS
or FAILED
depending on how the data was parsed. A FAILED
\n operation will return an error and its details as an introspectionStatusDetail
.
The error detail field. When a FAILED
\n introspectionStatus
is returned, the introspectionStatusDetail
will also return the\n exact error that was generated during the operation.