update_data_source
¶
update_data_source(
api_id: String,
name: ResourceName,
type: DataSourceType,
*,
config_overrides: Optional[AppSyncClientConfig] = 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/app_sync.py
4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 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 | |