OpenSearchService / Client / add_direct_query_data_source
add_direct_query_data_source¶
- OpenSearchService.Client.add_direct_query_data_source(**kwargs)¶
Adds a new data source in Amazon OpenSearch Service so that you can perform direct queries on external data.
See also: AWS API Documentation
Request Syntax
response = client.add_direct_query_data_source( DataSourceName='string', DataSourceType={ 'CloudWatchLog': { 'RoleArn': 'string' }, 'SecurityLake': { 'RoleArn': 'string' }, 'Prometheus': { 'RoleArn': 'string', 'WorkspaceArn': 'string' } }, Description='string', OpenSearchArns=[ 'string', ], DataSourceAccessPolicy='string', TagList=[ { 'Key': 'string', 'Value': 'string' }, ] )
- Parameters:
DataSourceName (string) –
[REQUIRED]
A unique, user-defined label to identify the data source within your OpenSearch Service environment.
DataSourceType (dict) –
[REQUIRED]
The supported Amazon Web Services service that you want to use as the source for direct queries in OpenSearch Service.
Note
This is a Tagged Union structure. Only one of the following top level keys can be set:
CloudWatchLog,SecurityLake,Prometheus.CloudWatchLog (dict) –
Specifies CloudWatch Logs as a type of data source for direct queries.
RoleArn (string) – [REQUIRED]
The unique identifier of the IAM role that grants OpenSearch Service permission to access the specified data source.
SecurityLake (dict) –
Specifies Security Lake as a type of data source for direct queries.
RoleArn (string) – [REQUIRED]
The unique identifier of the IAM role that grants OpenSearch Service permission to access the specified data source.
Prometheus (dict) –
Specifies Prometheus as a type of data source for direct queries.
RoleArn (string) – [REQUIRED]
The unique identifier of the IAM role that grants OpenSearch Service permission to access the specified data source.
WorkspaceArn (string) – [REQUIRED]
The unique identifier of the Amazon Managed Prometheus Workspace that is associated with the specified data source.
Description (string) – An optional text field for providing additional context and details about the data source.
OpenSearchArns (list) –
An optional list of Amazon Resource Names (ARNs) for the OpenSearch collections that are associated with the direct query data source. This field is required for CloudWatchLogs and SecurityLake datasource types.
(string) –
The Amazon Resource Name (ARN) of the domain. See Identifiers for IAM Entities in Using Amazon Web Services Identity and Access Management for more information.
DataSourceAccessPolicy (string) – An optional IAM access policy document that defines the permissions for accessing the data source. The policy document must be in valid JSON format and follow IAM policy syntax.
TagList (list) –
A list of tags attached to a domain.
(dict) –
A tag (key-value pair) for an Amazon OpenSearch Service resource.
Key (string) – [REQUIRED]
The tag key. Tag keys must be unique for the domain to which they are attached.
Value (string) – [REQUIRED]
The value assigned to the corresponding tag key. Tag values can be null and don’t have to be unique in a tag set. For example, you can have a key value pair in a tag set of
project : Trinityandcost-center : Trinity
- Return type:
dict
- Returns:
Response Syntax
{ 'DataSourceArn': 'string' }
Response Structure
(dict) –
DataSourceArn (string) –
The unique, system-generated identifier that represents the data source.
Exceptions
OpenSearchService.Client.exceptions.BaseExceptionOpenSearchService.Client.exceptions.InternalExceptionOpenSearchService.Client.exceptions.ResourceNotFoundExceptionOpenSearchService.Client.exceptions.ValidationExceptionOpenSearchService.Client.exceptions.DisabledOperationExceptionOpenSearchService.Client.exceptions.LimitExceededException