- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
GetDirectQueryDataSourceCommand
Returns detailed configuration information for a specific direct query data source in Amazon OpenSearch Service.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { OpenSearchClient, GetDirectQueryDataSourceCommand } from "@aws-sdk/client-opensearch"; // ES Modules import
// const { OpenSearchClient, GetDirectQueryDataSourceCommand } = require("@aws-sdk/client-opensearch"); // CommonJS import
const client = new OpenSearchClient(config);
const input = { // GetDirectQueryDataSourceRequest
DataSourceName: "STRING_VALUE", // required
};
const command = new GetDirectQueryDataSourceCommand(input);
const response = await client.send(command);
// { // GetDirectQueryDataSourceResponse
// DataSourceName: "STRING_VALUE",
// DataSourceType: { // DirectQueryDataSourceType Union: only one key present
// CloudWatchLog: { // CloudWatchDirectQueryDataSource
// RoleArn: "STRING_VALUE", // required
// },
// SecurityLake: { // SecurityLakeDirectQueryDataSource
// RoleArn: "STRING_VALUE", // required
// },
// },
// Description: "STRING_VALUE",
// OpenSearchArns: [ // DirectQueryOpenSearchARNList
// "STRING_VALUE",
// ],
// DataSourceArn: "STRING_VALUE",
// };
GetDirectQueryDataSourceCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
DataSourceName Required | string | undefined | A unique, user-defined label that identifies the data source within your OpenSearch Service environment. |
GetDirectQueryDataSourceCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
DataSourceArn | string | undefined | The unique, system-generated identifier that represents the data source. |
DataSourceName | string | undefined | A unique, user-defined label to identify the data source within your OpenSearch Service environment. |
DataSourceType | DirectQueryDataSourceType | undefined | The supported Amazon Web Services service that is used as the source for direct queries in OpenSearch Service. |
Description | string | undefined | A description that provides additional context and details about the data source. |
OpenSearchArns | string[] | undefined | A list of Amazon Resource Names (ARNs) for the OpenSearch collections that are associated with the direct query data source. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
BaseException | client | An error occurred while processing the request. |
DisabledOperationException | client | An error occured because the client wanted to access an unsupported operation. |
InternalException | server | Request processing failed because of an unknown error, exception, or internal failure. |
ResourceNotFoundException | client | An exception for accessing or deleting a resource that doesn't exist. |
ValidationException | client | An exception for accessing or deleting a resource that doesn't exist. |
OpenSearchServiceException | Base exception class for all service exceptions from OpenSearch service. |