Skip to content

update_resource_data_sync

update_resource_data_sync(
    sync_name: ResourceDataSyncName,
    sync_type: ResourceDataSyncType,
    sync_source: ResourceDataSyncSource,
    *,
    config_overrides: Optional[SSMClientConfig] = None,
) -> UpdateResourceDataSyncResult

Update a resource data sync. After you create a resource data sync for a Region, you can't change the account options for that sync. For example, if you create a sync in the us-east-2 (Ohio) Region and you choose the Include only the current account option, you can't edit that sync later and choose the Include all accounts from my Organizations configuration option. Instead, you must delete the first resource data sync, and create a new one.

This API operation only supports a resource data sync that was created with a SyncFromSource SyncType.

Parameters:

Raises:

Source code in docs_src/capo_ssm/_services/ssm.py
def update_resource_data_sync(
    self,
    sync_name: "capo_ssm.types.resource_data_sync_name.ResourceDataSyncName",
    sync_type: "capo_ssm.types.resource_data_sync_type.ResourceDataSyncType",
    sync_source: "capo_ssm.types.resource_data_sync_source.ResourceDataSyncSource",
    *,
    config_overrides: Optional[SSMClientConfig] = None,
) -> "capo_ssm.types.update_resource_data_sync_result.UpdateResourceDataSyncResult":
    """<p>Update a resource data sync. After you create a resource data sync for a Region, you can't change the account options for that sync. For example, if you create a sync in the us-east-2 (Ohio) Region and you choose the <code>Include only the current account</code> option, you can't edit that sync later and choose the <code>Include all accounts from my Organizations configuration</code> option. Instead, you must delete the first resource data sync, and create a new one.</p> <note> <p>This API operation only supports a resource data sync that was created with a SyncFromSource <code>SyncType</code>.</p> </note>

    Args:
        sync_name: <p>The name of the resource data sync you want to update.</p>
        sync_type: <p>The type of resource data sync. The supported <code>SyncType</code> is SyncFromSource.</p>
        sync_source: <p>Specify information about the data sources to synchronize.</p>

    Raises:
        capo_ssm.errors.internal_server_error.InternalServerError: <p>An error occurred on the server side.</p>
        capo_ssm.errors.resource_data_sync_conflict_exception.ResourceDataSyncConflictException: <p>Another <code>UpdateResourceDataSync</code> request is being processed. Wait a few minutes and try again.</p>
        capo_ssm.errors.resource_data_sync_invalid_configuration_exception.ResourceDataSyncInvalidConfigurationException: <p>The specified sync configuration is invalid.</p>
        capo_ssm.errors.resource_data_sync_not_found_exception.ResourceDataSyncNotFoundException: <p>The specified sync name wasn't found.</p>
        capo_ssm.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_ssm.types.update_resource_data_sync_request.UpdateResourceDataSyncRequest]",
    ) -> OperationResponse[
        "capo_ssm.types.update_resource_data_sync_result.UpdateResourceDataSyncResult"
    ]:
        import capo_ssm._operations.amazon_ssm.update_resource_data_sync

        output, http_response = (
            capo_ssm._operations.amazon_ssm.update_resource_data_sync.update_resource_data_sync(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateResourceDataSync")
    )
    input_: capo_ssm.types.update_resource_data_sync_request.UpdateResourceDataSyncRequest = {
        "sync_name": sync_name,
        "sync_type": sync_type,
        "sync_source": sync_source,
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output