Adds a source identifier to an existing RDS event notification subscription.
Parameters:
-
subscription_name
(Optional[String], default:
None
)
–
The name of the RDS event notification subscription you want to add a source identifier to.
-
source_identifier
(Optional[String], default:
None
)
–
The identifier of the event source to be added.
Constraints:
-
If the source type is a DB instance, a DBInstanceIdentifier value must be supplied.
-
If the source type is a DB cluster, a DBClusterIdentifier value must be supplied.
-
If the source type is a DB parameter group, a DBParameterGroupName value must be supplied.
-
If the source type is a DB security group, a DBSecurityGroupName value must be supplied.
-
If the source type is a DB snapshot, a DBSnapshotIdentifier value must be supplied.
-
If the source type is a DB cluster snapshot, a DBClusterSnapshotIdentifier value must be supplied.
-
If the source type is an RDS Proxy, a DBProxyName value must be supplied.
Raises:
Examples:
To add a source identifier to a subscription
The following example adds another source identifier to an existing subscription.
>>> await client.add_source_identifier_to_subscription(subscription_name='my-instance-events', source_identifier='test-instance-repl')
Source code in docs_src/capo_rds/_services/async_rds.py
| async def add_source_identifier_to_subscription(
self,
*,
config_overrides: Optional[AsyncRDSClientConfig] = None,
subscription_name: Optional["capo_rds.types.string.String"] = None,
source_identifier: Optional["capo_rds.types.string.String"] = None,
) -> "capo_rds.types.add_source_identifier_to_subscription_result.AddSourceIdentifierToSubscriptionResult":
"""<p>Adds a source identifier to an existing RDS event notification subscription.</p>
Args:
subscription_name: <p>The name of the RDS event notification subscription you want to add a source identifier to.</p>
source_identifier: <p>The identifier of the event source to be added.</p> <p>Constraints:</p> <ul> <li> <p>If the source type is a DB instance, a <code>DBInstanceIdentifier</code> value must be supplied.</p> </li> <li> <p>If the source type is a DB cluster, a <code>DBClusterIdentifier</code> value must be supplied.</p> </li> <li> <p>If the source type is a DB parameter group, a <code>DBParameterGroupName</code> value must be supplied.</p> </li> <li> <p>If the source type is a DB security group, a <code>DBSecurityGroupName</code> value must be supplied.</p> </li> <li> <p>If the source type is a DB snapshot, a <code>DBSnapshotIdentifier</code> value must be supplied.</p> </li> <li> <p>If the source type is a DB cluster snapshot, a <code>DBClusterSnapshotIdentifier</code> value must be supplied.</p> </li> <li> <p>If the source type is an RDS Proxy, a <code>DBProxyName</code> value must be supplied.</p> </li> </ul>
Raises:
capo_rds.errors.source_not_found_fault.SourceNotFoundFault: <p>The requested source could not be found.</p>
capo_rds.errors.subscription_not_found_fault.SubscriptionNotFoundFault: <p>The subscription name does not exist.</p>
capo_rds.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
To add a source identifier to a subscription
The following example adds another source identifier to an existing subscription.
>>> await client.add_source_identifier_to_subscription(subscription_name='my-instance-events', source_identifier='test-instance-repl')
"""
async def _handler(
req: "AsyncOperationRequest[capo_rds.types.add_source_identifier_to_subscription_message.AddSourceIdentifierToSubscriptionMessage]",
) -> AsyncOperationResponse[
"capo_rds.types.add_source_identifier_to_subscription_result.AddSourceIdentifierToSubscriptionResult"
]:
import capo_rds._operations.amazon_rd_sv19.add_source_identifier_to_subscription
(
output,
http_response,
) = await capo_rds._operations.amazon_rd_sv19.add_source_identifier_to_subscription.async_add_source_identifier_to_subscription(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("AddSourceIdentifierToSubscription")
)
input_: capo_rds.types.add_source_identifier_to_subscription_message.AddSourceIdentifierToSubscriptionMessage = {}
if subscription_name is not None:
input_["subscription_name"] = subscription_name
if source_identifier is not None:
input_["source_identifier"] = source_identifier
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|