-
Notifications
You must be signed in to change notification settings - Fork 592
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(client-appsync): This update enables introspection of Aurora clu…
…ster databases using the RDS Data API
- Loading branch information
awstools
committed
Nov 27, 2023
1 parent
59a2041
commit defc236
Showing
9 changed files
with
1,461 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
204 changes: 204 additions & 0 deletions
204
clients/client-appsync/src/commands/GetDataSourceIntrospectionCommand.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
* <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> | ||
* @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: "<DataSourceIntrospectionModelFieldType>", | ||
* // 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) | ||
* <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> | ||
* | ||
* @throws {@link InternalFailureException} (server fault) | ||
* <p>An internal AppSync error occurred. Try your request again.</p> | ||
* | ||
* @throws {@link NotFoundException} (client fault) | ||
* <p>The resource specified in the request was not found. Check the resource, and then try | ||
* again.</p> | ||
* | ||
* @throws {@link AppSyncServiceException} | ||
* <p>Base exception class for all service exceptions from AppSync service.</p> | ||
* | ||
*/ | ||
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<ServiceInputTypes, ServiceOutputTypes>, | ||
configuration: AppSyncClientResolvedConfig, | ||
options?: __HttpHandlerOptions | ||
): Handler<GetDataSourceIntrospectionCommandInput, GetDataSourceIntrospectionCommandOutput> { | ||
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<any>) => | ||
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<GetDataSourceIntrospectionCommandOutput> { | ||
return de_GetDataSourceIntrospectionCommand(output, context); | ||
} | ||
} |
Oops, something went wrong.