update_data_source
async
¶
update_data_source(
api_id: String,
name: ResourceName,
type: DataSourceType,
*,
config_overrides: Optional[AsyncAppSyncClientConfig] = None,
description: Optional[String] = None,
service_role_arn: Optional[String] = None,
dynamodb_config: Optional[DynamodbDataSourceConfig] = None,
lambda_config: Optional[LambdaDataSourceConfig] = None,
elasticsearch_config: Optional[ElasticsearchDataSourceConfig] = None,
open_search_service_config: Optional[OpenSearchServiceDataSourceConfig] = None,
http_config: Optional[HttpDataSourceConfig] = None,
relational_database_config: Optional[RelationalDatabaseDataSourceConfig] = None,
event_bridge_config: Optional[EventBridgeDataSourceConfig] = None,
metrics_config: Optional[DataSourceLevelMetricsConfig] = None,
) -> UpdateDataSourceResponse
Updates a DataSource object.
Parameters:
-
api_id(String) –The API ID.
-
name(ResourceName) –The new name for the data source.
-
description(Optional[String], default:None) –The new description for the data source.
-
type(DataSourceType) –The new data source type.
-
service_role_arn(Optional[String], default:None) –The new service role Amazon Resource Name (ARN) for the data source.
-
dynamodb_config(Optional[DynamodbDataSourceConfig], default:None) –The new Amazon DynamoDB configuration.
-
lambda_config(Optional[LambdaDataSourceConfig], default:None) –The new Lambda configuration.
-
elasticsearch_config(Optional[ElasticsearchDataSourceConfig], default:None) –The new OpenSearch configuration.
As of September 2021, Amazon Elasticsearch service is Amazon OpenSearch Service. This configuration is deprecated. Instead, use UpdateDataSourceRequest$openSearchServiceConfig to update an OpenSearch data source.
-
open_search_service_config(Optional[OpenSearchServiceDataSourceConfig], default:None) –The new OpenSearch configuration.
-
http_config(Optional[HttpDataSourceConfig], default:None) –The new HTTP endpoint configuration.
-
relational_database_config(Optional[RelationalDatabaseDataSourceConfig], default:None) –The new relational database configuration.
-
event_bridge_config(Optional[EventBridgeDataSourceConfig], default:None) –The new Amazon EventBridge settings.
-
metrics_config(Optional[DataSourceLevelMetricsConfig], default:None) –Enables or disables enhanced data source metrics for specified data sources. Note that
metricsConfigwon't be used unless thedataSourceLevelMetricsBehaviorvalue is set toPER_DATA_SOURCE_METRICS. If thedataSourceLevelMetricsBehavioris set toFULL_REQUEST_DATA_SOURCE_METRICSinstead,metricsConfigwill be ignored. However, you can still set its value.metricsConfigcan beENABLEDorDISABLED.
Raises:
-
BadRequestException–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.
-
ConcurrentModificationException–Another modification is in progress at this time and it must complete before you can make your change.
-
InternalFailureException–An internal AppSync error occurred. Try your request again.
-
NotFoundException–The resource specified in the request was not found. Check the resource, and then try again.
-
UnauthorizedException–You aren't authorized to perform this operation.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_appsync/_services/async_app_sync.py
4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 | |