diff --git a/clients/client-appsync/README.md b/clients/client-appsync/README.md index 470884d75b63..8ea0d8f7ca1d 100644 --- a/clients/client-appsync/README.md +++ b/clients/client-appsync/README.md @@ -427,6 +427,14 @@ GetDataSource [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/appsync/command/GetDataSourceCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-appsync/Interface/GetDataSourceCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-appsync/Interface/GetDataSourceCommandOutput/) + +
+ +GetDataSourceIntrospection + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/appsync/command/GetDataSourceIntrospectionCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-appsync/Interface/GetDataSourceIntrospectionCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-appsync/Interface/GetDataSourceIntrospectionCommandOutput/) +
@@ -579,6 +587,14 @@ ListTypesByAssociation [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/appsync/command/ListTypesByAssociationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-appsync/Interface/ListTypesByAssociationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-appsync/Interface/ListTypesByAssociationCommandOutput/) +
+
+ +StartDataSourceIntrospection + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/appsync/command/StartDataSourceIntrospectionCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-appsync/Interface/StartDataSourceIntrospectionCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-appsync/Interface/StartDataSourceIntrospectionCommandOutput/) +
diff --git a/clients/client-appsync/src/AppSync.ts b/clients/client-appsync/src/AppSync.ts index 1e869ec2edbd..1575cf0962b5 100644 --- a/clients/client-appsync/src/AppSync.ts +++ b/clients/client-appsync/src/AppSync.ts @@ -131,6 +131,11 @@ import { GetDataSourceCommandInput, GetDataSourceCommandOutput, } from "./commands/GetDataSourceCommand"; +import { + GetDataSourceIntrospectionCommand, + GetDataSourceIntrospectionCommandInput, + GetDataSourceIntrospectionCommandOutput, +} from "./commands/GetDataSourceIntrospectionCommand"; import { GetDomainNameCommand, GetDomainNameCommandInput, @@ -206,6 +211,11 @@ import { ListTypesByAssociationCommandOutput, } from "./commands/ListTypesByAssociationCommand"; import { ListTypesCommand, ListTypesCommandInput, ListTypesCommandOutput } from "./commands/ListTypesCommand"; +import { + StartDataSourceIntrospectionCommand, + StartDataSourceIntrospectionCommandInput, + StartDataSourceIntrospectionCommandOutput, +} from "./commands/StartDataSourceIntrospectionCommand"; import { StartSchemaCreationCommand, StartSchemaCreationCommandInput, @@ -293,6 +303,7 @@ const commands = { GetApiAssociationCommand, GetApiCacheCommand, GetDataSourceCommand, + GetDataSourceIntrospectionCommand, GetDomainNameCommand, GetFunctionCommand, GetGraphqlApiCommand, @@ -312,6 +323,7 @@ const commands = { ListTagsForResourceCommand, ListTypesCommand, ListTypesByAssociationCommand, + StartDataSourceIntrospectionCommand, StartSchemaCreationCommand, StartSchemaMergeCommand, TagResourceCommand, @@ -729,6 +741,23 @@ export interface AppSync { cb: (err: any, data?: GetDataSourceCommandOutput) => void ): void; + /** + * @see {@link GetDataSourceIntrospectionCommand} + */ + getDataSourceIntrospection( + args: GetDataSourceIntrospectionCommandInput, + options?: __HttpHandlerOptions + ): Promise; + getDataSourceIntrospection( + args: GetDataSourceIntrospectionCommandInput, + cb: (err: any, data?: GetDataSourceIntrospectionCommandOutput) => void + ): void; + getDataSourceIntrospection( + args: GetDataSourceIntrospectionCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetDataSourceIntrospectionCommandOutput) => void + ): void; + /** * @see {@link GetDomainNameCommand} */ @@ -989,6 +1018,23 @@ export interface AppSync { cb: (err: any, data?: ListTypesByAssociationCommandOutput) => void ): void; + /** + * @see {@link StartDataSourceIntrospectionCommand} + */ + startDataSourceIntrospection( + args: StartDataSourceIntrospectionCommandInput, + options?: __HttpHandlerOptions + ): Promise; + startDataSourceIntrospection( + args: StartDataSourceIntrospectionCommandInput, + cb: (err: any, data?: StartDataSourceIntrospectionCommandOutput) => void + ): void; + startDataSourceIntrospection( + args: StartDataSourceIntrospectionCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: StartDataSourceIntrospectionCommandOutput) => void + ): void; + /** * @see {@link StartSchemaCreationCommand} */ diff --git a/clients/client-appsync/src/AppSyncClient.ts b/clients/client-appsync/src/AppSyncClient.ts index a673889954b7..134e114dc5ed 100644 --- a/clients/client-appsync/src/AppSyncClient.ts +++ b/clients/client-appsync/src/AppSyncClient.ts @@ -93,6 +93,10 @@ import { FlushApiCacheCommandInput, FlushApiCacheCommandOutput } from "./command import { GetApiAssociationCommandInput, GetApiAssociationCommandOutput } from "./commands/GetApiAssociationCommand"; import { GetApiCacheCommandInput, GetApiCacheCommandOutput } from "./commands/GetApiCacheCommand"; import { GetDataSourceCommandInput, GetDataSourceCommandOutput } from "./commands/GetDataSourceCommand"; +import { + GetDataSourceIntrospectionCommandInput, + GetDataSourceIntrospectionCommandOutput, +} from "./commands/GetDataSourceIntrospectionCommand"; import { GetDomainNameCommandInput, GetDomainNameCommandOutput } from "./commands/GetDomainNameCommand"; import { GetFunctionCommandInput, GetFunctionCommandOutput } from "./commands/GetFunctionCommand"; import { GetGraphqlApiCommandInput, GetGraphqlApiCommandOutput } from "./commands/GetGraphqlApiCommand"; @@ -133,6 +137,10 @@ import { ListTypesByAssociationCommandOutput, } from "./commands/ListTypesByAssociationCommand"; import { ListTypesCommandInput, ListTypesCommandOutput } from "./commands/ListTypesCommand"; +import { + StartDataSourceIntrospectionCommandInput, + StartDataSourceIntrospectionCommandOutput, +} from "./commands/StartDataSourceIntrospectionCommand"; import { StartSchemaCreationCommandInput, StartSchemaCreationCommandOutput, @@ -195,6 +203,7 @@ export type ServiceInputTypes = | GetApiAssociationCommandInput | GetApiCacheCommandInput | GetDataSourceCommandInput + | GetDataSourceIntrospectionCommandInput | GetDomainNameCommandInput | GetFunctionCommandInput | GetGraphqlApiCommandInput @@ -214,6 +223,7 @@ export type ServiceInputTypes = | ListTagsForResourceCommandInput | ListTypesByAssociationCommandInput | ListTypesCommandInput + | StartDataSourceIntrospectionCommandInput | StartSchemaCreationCommandInput | StartSchemaMergeCommandInput | TagResourceCommandInput @@ -260,6 +270,7 @@ export type ServiceOutputTypes = | GetApiAssociationCommandOutput | GetApiCacheCommandOutput | GetDataSourceCommandOutput + | GetDataSourceIntrospectionCommandOutput | GetDomainNameCommandOutput | GetFunctionCommandOutput | GetGraphqlApiCommandOutput @@ -279,6 +290,7 @@ export type ServiceOutputTypes = | ListTagsForResourceCommandOutput | ListTypesByAssociationCommandOutput | ListTypesCommandOutput + | StartDataSourceIntrospectionCommandOutput | StartSchemaCreationCommandOutput | StartSchemaMergeCommandOutput | TagResourceCommandOutput diff --git a/clients/client-appsync/src/commands/GetDataSourceIntrospectionCommand.ts b/clients/client-appsync/src/commands/GetDataSourceIntrospectionCommand.ts new file mode 100644 index 000000000000..db3f7ff838d5 --- /dev/null +++ b/clients/client-appsync/src/commands/GetDataSourceIntrospectionCommand.ts @@ -0,0 +1,204 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { AppSyncClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AppSyncClient"; +import { GetDataSourceIntrospectionRequest, GetDataSourceIntrospectionResponse } from "../models/models_0"; +import { de_GetDataSourceIntrospectionCommand, se_GetDataSourceIntrospectionCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link GetDataSourceIntrospectionCommand}. + */ +export interface GetDataSourceIntrospectionCommandInput extends GetDataSourceIntrospectionRequest {} +/** + * @public + * + * The output of {@link GetDataSourceIntrospectionCommand}. + */ +export interface GetDataSourceIntrospectionCommandOutput extends GetDataSourceIntrospectionResponse, __MetadataBearer {} + +/** + * @public + *

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: "", + * // values: [ // DataSourceIntrospectionModelFieldTypeValues + * // "STRING_VALUE", + * // ], + * // }, + * // values: [ + * // "STRING_VALUE", + * // ], + * // }, + * // length: Number("long"), + * // }, + * // ], + * // primaryKey: { // DataSourceIntrospectionModelIndex + * // name: "STRING_VALUE", + * // fields: [ // DataSourceIntrospectionModelIndexFields + * // "STRING_VALUE", + * // ], + * // }, + * // indexes: [ // DataSourceIntrospectionModelIndexes + * // { + * // name: "STRING_VALUE", + * // fields: [ + * // "STRING_VALUE", + * // ], + * // }, + * // ], + * // sdl: "STRING_VALUE", + * // }, + * // ], + * // nextToken: "STRING_VALUE", + * // }, + * // }; + * + * ``` + * + * @param GetDataSourceIntrospectionCommandInput - {@link GetDataSourceIntrospectionCommandInput} + * @returns {@link GetDataSourceIntrospectionCommandOutput} + * @see {@link GetDataSourceIntrospectionCommandInput} for command's `input` shape. + * @see {@link GetDataSourceIntrospectionCommandOutput} for command's `response` shape. + * @see {@link AppSyncClientResolvedConfig | config} for AppSyncClient's `config` shape. + * + * @throws {@link BadRequestException} (client fault) + *

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: MiddlewareStack, + configuration: AppSyncClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, GetDataSourceIntrospectionCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "AppSyncClient"; + const commandName = "GetDataSourceIntrospectionCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "AWSDeepdishControlPlaneService", + operation: "GetDataSourceIntrospection", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: GetDataSourceIntrospectionCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_GetDataSourceIntrospectionCommand(input, context); + } + + /** + * @internal + */ + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return de_GetDataSourceIntrospectionCommand(output, context); + } +} diff --git a/clients/client-appsync/src/commands/StartDataSourceIntrospectionCommand.ts b/clients/client-appsync/src/commands/StartDataSourceIntrospectionCommand.ts new file mode 100644 index 000000000000..003e0d050cf6 --- /dev/null +++ b/clients/client-appsync/src/commands/StartDataSourceIntrospectionCommand.ts @@ -0,0 +1,168 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { AppSyncClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AppSyncClient"; +import { StartDataSourceIntrospectionRequest, StartDataSourceIntrospectionResponse } from "../models/models_0"; +import { + de_StartDataSourceIntrospectionCommand, + se_StartDataSourceIntrospectionCommand, +} from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link StartDataSourceIntrospectionCommand}. + */ +export interface StartDataSourceIntrospectionCommandInput extends StartDataSourceIntrospectionRequest {} +/** + * @public + * + * The output of {@link StartDataSourceIntrospectionCommand}. + */ +export interface StartDataSourceIntrospectionCommandOutput + extends StartDataSourceIntrospectionResponse, + __MetadataBearer {} + +/** + * @public + *

Creates a new introspection. Returns the introspectionId of the new introspection after its + * creation.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { AppSyncClient, StartDataSourceIntrospectionCommand } from "@aws-sdk/client-appsync"; // ES Modules import + * // const { AppSyncClient, StartDataSourceIntrospectionCommand } = require("@aws-sdk/client-appsync"); // CommonJS import + * const client = new AppSyncClient(config); + * const input = { // StartDataSourceIntrospectionRequest + * rdsDataApiConfig: { // RdsDataApiConfig + * resourceArn: "STRING_VALUE", // required + * secretArn: "STRING_VALUE", // required + * databaseName: "STRING_VALUE", // required + * }, + * }; + * const command = new StartDataSourceIntrospectionCommand(input); + * const response = await client.send(command); + * // { // StartDataSourceIntrospectionResponse + * // introspectionId: "STRING_VALUE", + * // introspectionStatus: "PROCESSING" || "FAILED" || "SUCCESS", + * // introspectionStatusDetail: "STRING_VALUE", + * // }; + * + * ``` + * + * @param StartDataSourceIntrospectionCommandInput - {@link StartDataSourceIntrospectionCommandInput} + * @returns {@link StartDataSourceIntrospectionCommandOutput} + * @see {@link StartDataSourceIntrospectionCommandInput} for command's `input` shape. + * @see {@link StartDataSourceIntrospectionCommandOutput} for command's `response` shape. + * @see {@link AppSyncClientResolvedConfig | config} for AppSyncClient's `config` shape. + * + * @throws {@link BadRequestException} (client fault) + *

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: MiddlewareStack, + configuration: AppSyncClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, StartDataSourceIntrospectionCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "AppSyncClient"; + const commandName = "StartDataSourceIntrospectionCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "AWSDeepdishControlPlaneService", + operation: "StartDataSourceIntrospection", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: StartDataSourceIntrospectionCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_StartDataSourceIntrospectionCommand(input, context); + } + + /** + * @internal + */ + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return de_StartDataSourceIntrospectionCommand(output, context); + } +} diff --git a/clients/client-appsync/src/commands/index.ts b/clients/client-appsync/src/commands/index.ts index fd8a1b0e2bd2..fb191acfe4fe 100644 --- a/clients/client-appsync/src/commands/index.ts +++ b/clients/client-appsync/src/commands/index.ts @@ -27,6 +27,7 @@ export * from "./FlushApiCacheCommand"; export * from "./GetApiAssociationCommand"; export * from "./GetApiCacheCommand"; export * from "./GetDataSourceCommand"; +export * from "./GetDataSourceIntrospectionCommand"; export * from "./GetDomainNameCommand"; export * from "./GetFunctionCommand"; export * from "./GetGraphqlApiCommand"; @@ -46,6 +47,7 @@ export * from "./ListSourceApiAssociationsCommand"; export * from "./ListTagsForResourceCommand"; export * from "./ListTypesByAssociationCommand"; export * from "./ListTypesCommand"; +export * from "./StartDataSourceIntrospectionCommand"; export * from "./StartSchemaCreationCommand"; export * from "./StartSchemaMergeCommand"; export * from "./TagResourceCommand"; diff --git a/clients/client-appsync/src/models/models_0.ts b/clients/client-appsync/src/models/models_0.ts index d5a036b9b4bd..3822bec7ca8b 100644 --- a/clients/client-appsync/src/models/models_0.ts +++ b/clients/client-appsync/src/models/models_0.ts @@ -3346,6 +3346,73 @@ export interface GetDataSourceResponse { dataSource?: DataSource; } +/** + * @public + */ +export interface GetDataSourceIntrospectionRequest { + /** + * @public + *

The 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.

+ */ + includeModelsSDL?: boolean; + + /** + * @public + *

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.

+ */ + nextToken?: string; + + /** + * @public + *

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.

+ */ + rdsDataApiConfig?: RdsDataApiConfig; +} + +/** + * @public + */ +export interface StartDataSourceIntrospectionResponse { + /** + * @public + *

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.

+ */ + introspectionStatus?: DataSourceIntrospectionStatus; + + /** + * @public + *

The error detail field. When a FAILED + * introspectionStatus is returned, the introspectionStatusDetail will also return the + * exact error that was generated during the operation.

+ */ + introspectionStatusDetail?: string; +} + /** * @public */ @@ -4936,3 +5070,173 @@ export interface UpdateTypeResponse { */ type?: Type; } + +/** + * @public + *

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.

    + *
  • + *
+ */ + kind?: string; + + /** + * @public + *

The name of the data type that represents the field. For example, String is a valid + * name value.

+ */ + name?: string; + + /** + * @public + *

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.

+ */ + type?: DataSourceIntrospectionModelFieldType; + + /** + * @public + *

The values of the type field. This field represents the AppSync data type equivalent of the + * introspected field.

+ */ + values?: string[]; +} + +/** + * @public + *

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.

+ */ + type?: DataSourceIntrospectionModelFieldType; + + /** + * @public + *

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.

+ */ + fields?: DataSourceIntrospectionModelField[]; + + /** + * @public + *

The primary key stored as a DataSourceIntrospectionModelIndex object.

+ */ + primaryKey?: DataSourceIntrospectionModelIndex; + + /** + * @public + *

The array of DataSourceIntrospectionModelIndex objects.

+ */ + indexes?: DataSourceIntrospectionModelIndex[]; + + /** + * @public + *

Contains the output of the SDL that was generated from the introspected types. This is controlled by the + * includeModelsSDL parameter of the GetDataSourceIntrospection operation.

+ */ + sdl?: string; +} + +/** + * @public + *

Represents the output of a DataSourceIntrospectionResult. This is the populated result of a + * GetDataSourceIntrospection operation.

+ */ +export interface DataSourceIntrospectionResult { + /** + * @public + *

The array of DataSourceIntrospectionModel objects.

+ */ + models?: DataSourceIntrospectionModel[]; + + /** + * @public + *

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.

+ */ + nextToken?: string; +} + +/** + * @public + */ +export interface GetDataSourceIntrospectionResponse { + /** + * @public + *

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.

+ */ + introspectionStatus?: DataSourceIntrospectionStatus; + + /** + * @public + *

The error detail field. When a FAILED + * introspectionStatus is returned, the introspectionStatusDetail will also return the + * exact error that was generated during the operation.

+ */ + introspectionStatusDetail?: string; + + /** + * @public + *

The DataSourceIntrospectionResult object data.

+ */ + introspectionResult?: DataSourceIntrospectionResult; +} diff --git a/clients/client-appsync/src/protocols/Aws_restJson1.ts b/clients/client-appsync/src/protocols/Aws_restJson1.ts index ac8c76532755..87ec8b8b0373 100644 --- a/clients/client-appsync/src/protocols/Aws_restJson1.ts +++ b/clients/client-appsync/src/protocols/Aws_restJson1.ts @@ -4,6 +4,7 @@ import { _json, collectBody, decorateServiceException as __decorateServiceException, + expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, @@ -64,6 +65,10 @@ import { FlushApiCacheCommandInput, FlushApiCacheCommandOutput } from "../comman import { GetApiAssociationCommandInput, GetApiAssociationCommandOutput } from "../commands/GetApiAssociationCommand"; import { GetApiCacheCommandInput, GetApiCacheCommandOutput } from "../commands/GetApiCacheCommand"; import { GetDataSourceCommandInput, GetDataSourceCommandOutput } from "../commands/GetDataSourceCommand"; +import { + GetDataSourceIntrospectionCommandInput, + GetDataSourceIntrospectionCommandOutput, +} from "../commands/GetDataSourceIntrospectionCommand"; import { GetDomainNameCommandInput, GetDomainNameCommandOutput } from "../commands/GetDomainNameCommand"; import { GetFunctionCommandInput, GetFunctionCommandOutput } from "../commands/GetFunctionCommand"; import { GetGraphqlApiCommandInput, GetGraphqlApiCommandOutput } from "../commands/GetGraphqlApiCommand"; @@ -104,6 +109,10 @@ import { ListTypesByAssociationCommandOutput, } from "../commands/ListTypesByAssociationCommand"; import { ListTypesCommandInput, ListTypesCommandOutput } from "../commands/ListTypesCommand"; +import { + StartDataSourceIntrospectionCommandInput, + StartDataSourceIntrospectionCommandOutput, +} from "../commands/StartDataSourceIntrospectionCommand"; import { StartSchemaCreationCommandInput, StartSchemaCreationCommandOutput, @@ -137,6 +146,10 @@ import { CachingConfig, CognitoUserPoolConfig, ConcurrentModificationException, + DataSourceIntrospectionModel, + DataSourceIntrospectionModelField, + DataSourceIntrospectionModelFieldType, + DataSourceIntrospectionResult, DeltaSyncConfig, DynamodbDataSourceConfig, ElasticsearchDataSourceConfig, @@ -153,6 +166,7 @@ import { OpenIDConnectConfig, OpenSearchServiceDataSourceConfig, PipelineConfig, + RdsDataApiConfig, RdsHttpEndpointConfig, RelationalDatabaseDataSourceConfig, SourceApiAssociation, @@ -1034,6 +1048,44 @@ export const se_GetDataSourceCommand = async ( }); }; +/** + * serializeAws_restJson1GetDataSourceIntrospectionCommand + */ +export const se_GetDataSourceIntrospectionCommand = async ( + input: GetDataSourceIntrospectionCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/v1/datasources/introspections/{introspectionId}"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "introspectionId", + () => input.introspectionId!, + "{introspectionId}", + false + ); + const query: any = map({ + includeModelsSDL: [() => input.includeModelsSDL !== void 0, () => input.includeModelsSDL!.toString()], + nextToken: [, input.nextToken!], + maxResults: [() => input.maxResults !== void 0, () => input.maxResults!.toString()], + }); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; + /** * serializeAws_restJson1GetDomainNameCommand */ @@ -1585,6 +1637,36 @@ export const se_ListTypesByAssociationCommand = async ( }); }; +/** + * serializeAws_restJson1StartDataSourceIntrospectionCommand + */ +export const se_StartDataSourceIntrospectionCommand = async ( + input: StartDataSourceIntrospectionCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/datasources/introspections"; + let body: any; + body = JSON.stringify( + take(input, { + rdsDataApiConfig: (_) => _json(_), + }) + ); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + /** * serializeAws_restJson1StartSchemaCreationCommand */ @@ -3659,6 +3741,62 @@ const de_GetDataSourceCommandError = async ( } }; +/** + * deserializeAws_restJson1GetDataSourceIntrospectionCommand + */ +export const de_GetDataSourceIntrospectionCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_GetDataSourceIntrospectionCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + introspectionId: __expectString, + introspectionResult: (_) => de_DataSourceIntrospectionResult(_, context), + introspectionStatus: __expectString, + introspectionStatusDetail: __expectString, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1GetDataSourceIntrospectionCommandError + */ +const de_GetDataSourceIntrospectionCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.appsync#BadRequestException": + throw await de_BadRequestExceptionRes(parsedOutput, context); + case "InternalFailureException": + case "com.amazonaws.appsync#InternalFailureException": + throw await de_InternalFailureExceptionRes(parsedOutput, context); + case "NotFoundException": + case "com.amazonaws.appsync#NotFoundException": + throw await de_NotFoundExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + /** * deserializeAws_restJson1GetDomainNameCommand */ @@ -4737,6 +4875,64 @@ const de_ListTypesByAssociationCommandError = async ( } }; +/** + * deserializeAws_restJson1StartDataSourceIntrospectionCommand + */ +export const de_StartDataSourceIntrospectionCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_StartDataSourceIntrospectionCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + introspectionId: __expectString, + introspectionStatus: __expectString, + introspectionStatusDetail: __expectString, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1StartDataSourceIntrospectionCommandError + */ +const de_StartDataSourceIntrospectionCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.appsync#BadRequestException": + throw await de_BadRequestExceptionRes(parsedOutput, context); + case "InternalFailureException": + case "com.amazonaws.appsync#InternalFailureException": + throw await de_InternalFailureExceptionRes(parsedOutput, context); + case "NotFoundException": + case "com.amazonaws.appsync#NotFoundException": + throw await de_NotFoundExceptionRes(parsedOutput, context); + case "UnauthorizedException": + case "com.amazonaws.appsync#UnauthorizedException": + throw await de_UnauthorizedExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + /** * deserializeAws_restJson1StartSchemaCreationCommand */ @@ -5764,6 +5960,8 @@ const de_UnauthorizedExceptionRes = async ( // se_PipelineConfig omitted. +// se_RdsDataApiConfig omitted. + // se_RdsHttpEndpointConfig omitted. // se_RelationalDatabaseDataSourceConfig omitted. @@ -5810,6 +6008,93 @@ const de_UnauthorizedExceptionRes = async ( // de_DataSource omitted. +/** + * deserializeAws_restJson1DataSourceIntrospectionModel + */ +const de_DataSourceIntrospectionModel = (output: any, context: __SerdeContext): DataSourceIntrospectionModel => { + return take(output, { + fields: (_: any) => de_DataSourceIntrospectionModelFields(_, context), + indexes: _json, + name: __expectString, + primaryKey: _json, + sdl: __expectString, + }) as any; +}; + +/** + * deserializeAws_restJson1DataSourceIntrospectionModelField + */ +const de_DataSourceIntrospectionModelField = ( + output: any, + context: __SerdeContext +): DataSourceIntrospectionModelField => { + return take(output, { + length: __expectLong, + name: __expectString, + type: (_: any) => de_DataSourceIntrospectionModelFieldType(_, context), + }) as any; +}; + +/** + * deserializeAws_restJson1DataSourceIntrospectionModelFields + */ +const de_DataSourceIntrospectionModelFields = ( + output: any, + context: __SerdeContext +): DataSourceIntrospectionModelField[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_DataSourceIntrospectionModelField(entry, context); + }); + return retVal; +}; + +/** + * deserializeAws_restJson1DataSourceIntrospectionModelFieldType + */ +const de_DataSourceIntrospectionModelFieldType = ( + output: any, + context: __SerdeContext +): DataSourceIntrospectionModelFieldType => { + return take(output, { + kind: __expectString, + name: __expectString, + type: (_: any) => de_DataSourceIntrospectionModelFieldType(_, context), + values: _json, + }) as any; +}; + +// de_DataSourceIntrospectionModelFieldTypeValues omitted. + +// de_DataSourceIntrospectionModelIndex omitted. + +// de_DataSourceIntrospectionModelIndexes omitted. + +// de_DataSourceIntrospectionModelIndexFields omitted. + +/** + * deserializeAws_restJson1DataSourceIntrospectionModels + */ +const de_DataSourceIntrospectionModels = (output: any, context: __SerdeContext): DataSourceIntrospectionModel[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_DataSourceIntrospectionModel(entry, context); + }); + return retVal; +}; + +/** + * deserializeAws_restJson1DataSourceIntrospectionResult + */ +const de_DataSourceIntrospectionResult = (output: any, context: __SerdeContext): DataSourceIntrospectionResult => { + return take(output, { + models: (_: any) => de_DataSourceIntrospectionModels(_, context), + nextToken: __expectString, + }) as any; +}; + // de_DataSources omitted. // de_DeltaSyncConfig omitted. diff --git a/codegen/sdk-codegen/aws-models/appsync.json b/codegen/sdk-codegen/aws-models/appsync.json index d11f693430c0..d59aca4de869 100644 --- a/codegen/sdk-codegen/aws-models/appsync.json +++ b/codegen/sdk-codegen/aws-models/appsync.json @@ -117,6 +117,9 @@ { "target": "com.amazonaws.appsync#GetDataSource" }, + { + "target": "com.amazonaws.appsync#GetDataSourceIntrospection" + }, { "target": "com.amazonaws.appsync#GetDomainName" }, @@ -174,6 +177,9 @@ { "target": "com.amazonaws.appsync#ListTypesByAssociation" }, + { + "target": "com.amazonaws.appsync#StartDataSourceIntrospection" + }, { "target": "com.amazonaws.appsync#StartSchemaCreation" }, @@ -3071,6 +3077,196 @@ "smithy.api#documentation": "

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.

" + } + }, + "primaryKey": { + "target": "com.amazonaws.appsync#DataSourceIntrospectionModelIndex", + "traits": { + "smithy.api#documentation": "

The primary key stored as a DataSourceIntrospectionModelIndex object.

" + } + }, + "indexes": { + "target": "com.amazonaws.appsync#DataSourceIntrospectionModelIndexes", + "traits": { + "smithy.api#documentation": "

The array of DataSourceIntrospectionModelIndex objects.

" + } + }, + "sdl": { + "target": "com.amazonaws.appsync#String", + "traits": { + "smithy.api#documentation": "

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.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

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.

" + } + }, + "length": { + "target": "com.amazonaws.appsync#Long", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

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.

\n

Valid values include:

\n
    \n
  • \n

    \n Scalar: Indicates the value is a primitive type (scalar).

    \n
  • \n
  • \n

    \n NonNull: Indicates the field cannot be null.

    \n
  • \n
  • \n

    \n List: Indicates the field contains a list.

    \n
  • \n
" + } + }, + "name": { + "target": "com.amazonaws.appsync#String", + "traits": { + "smithy.api#documentation": "

The name of the data type that represents the field. For example, String is a valid\n name value.

" + } + }, + "type": { + "target": "com.amazonaws.appsync#DataSourceIntrospectionModelFieldType", + "traits": { + "smithy.api#documentation": "

The DataSourceIntrospectionModelFieldType object data. The type is only present if\n DataSourceIntrospectionModelFieldType.kind is set to NonNull or List.

\n

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.

" + } + }, + "values": { + "target": "com.amazonaws.appsync#DataSourceIntrospectionModelFieldTypeValues", + "traits": { + "smithy.api#documentation": "

The values of the type field. This field represents the AppSync data type equivalent of the\n introspected field.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

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.

" + } + }, + "nextToken": { + "target": "com.amazonaws.appsync#PaginationToken", + "traits": { + "smithy.api#documentation": "

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.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Represents the output of a DataSourceIntrospectionResult. This is the populated result of a\n GetDataSourceIntrospection operation.

" + } + }, + "com.amazonaws.appsync#DataSourceIntrospectionStatus": { + "type": "enum", + "members": { + "PROCESSING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PROCESSING" + } + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FAILED" + } + }, + "SUCCESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SUCCESS" + } + } + } + }, "com.amazonaws.appsync#DataSourceType": { "type": "enum", "members": { @@ -4567,6 +4763,105 @@ } } }, + "com.amazonaws.appsync#GetDataSourceIntrospection": { + "type": "operation", + "input": { + "target": "com.amazonaws.appsync#GetDataSourceIntrospectionRequest" + }, + "output": { + "target": "com.amazonaws.appsync#GetDataSourceIntrospectionResponse" + }, + "errors": [ + { + "target": "com.amazonaws.appsync#BadRequestException" + }, + { + "target": "com.amazonaws.appsync#InternalFailureException" + }, + { + "target": "com.amazonaws.appsync#NotFoundException" + } + ], + "traits": { + "smithy.api#documentation": "

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.

", + "smithy.api#httpQuery": "includeModelsSDL" + } + }, + "nextToken": { + "target": "com.amazonaws.appsync#PaginationToken", + "traits": { + "smithy.api#documentation": "

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.

", + "smithy.api#httpQuery": "nextToken" + } + }, + "maxResults": { + "target": "com.amazonaws.appsync#MaxResults", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

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.

" + } + }, + "introspectionStatusDetail": { + "target": "com.amazonaws.appsync#String", + "traits": { + "smithy.api#documentation": "

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.

" + } + }, + "introspectionResult": { + "target": "com.amazonaws.appsync#DataSourceIntrospectionResult", + "traits": { + "smithy.api#documentation": "

The DataSourceIntrospectionResult object data.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.appsync#GetDataSourceRequest": { "type": "structure", "members": { @@ -6592,6 +6887,64 @@ "smithy.api#documentation": "

The pipeline configuration for a resolver of kind PIPELINE.

" } }, + "com.amazonaws.appsync#RdsDataApiConfig": { + "type": "structure", + "members": { + "resourceArn": { + "target": "com.amazonaws.appsync#RdsDataApiConfigResourceArn", + "traits": { + "smithy.api#documentation": "

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.

", + "smithy.api#http": { + "method": "POST", + "uri": "/v1/datasources/introspections", + "code": 200 + } + } + }, + "com.amazonaws.appsync#StartDataSourceIntrospectionRequest": { + "type": "structure", + "members": { + "rdsDataApiConfig": { + "target": "com.amazonaws.appsync#RdsDataApiConfig", + "traits": { + "smithy.api#documentation": "

The rdsDataApiConfig object data.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.appsync#StartDataSourceIntrospectionResponse": { + "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 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.

" + } + }, + "introspectionStatusDetail": { + "target": "com.amazonaws.appsync#String", + "traits": { + "smithy.api#documentation": "

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.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.appsync#StartSchemaCreation": { "type": "operation", "input": {