Skip to content

update_data_source

update_data_source(
    domain_identifier: DomainId,
    identifier: DataSourceId,
    *,
    config_overrides: Optional[DataZoneClientConfig] = None,
    name: Optional[Name] = None,
    description: Optional[Description] = None,
    enable_setting: Optional[EnableSetting] = None,
    publish_on_import: Optional[bool] = None,
    asset_forms_input: Optional[FormInputList] = None,
    schedule: Optional[ScheduleConfiguration] = None,
    configuration: Optional[DataSourceConfigurationInput] = None,
    recommendation: Optional[RecommendationConfiguration] = None,
    retain_permissions_on_revoke_failure: Optional[bool] = None,
) -> UpdateDataSourceOutput

Updates the specified data source in Amazon DataZone.

Parameters:

  • domain_identifier (DomainId) –

    The identifier of the domain in which to update a data source.

  • identifier (DataSourceId) –

    The identifier of the data source to be updated.

  • name (Optional[Name], default: None ) –

    The name to be updated as part of the UpdateDataSource action.

  • description (Optional[Description], default: None ) –

    The description to be updated as part of the UpdateDataSource action.

  • enable_setting (Optional[EnableSetting], default: None ) –

    The enable setting to be updated as part of the UpdateDataSource action.

  • publish_on_import (Optional[bool], default: None ) –

    The publish on import setting to be updated as part of the UpdateDataSource action.

  • asset_forms_input (Optional[FormInputList], default: None ) –

    The asset forms to be updated as part of the UpdateDataSource action.

  • schedule (Optional[ScheduleConfiguration], default: None ) –

    The schedule to be updated as part of the UpdateDataSource action.

  • configuration (Optional[DataSourceConfigurationInput], default: None ) –

    The configuration to be updated as part of the UpdateDataSource action.

  • recommendation (Optional[RecommendationConfiguration], default: None ) –

    The recommendation to be updated as part of the UpdateDataSource action.

  • retain_permissions_on_revoke_failure (Optional[bool], default: None ) –

    Specifies that the granted permissions are retained in case of a self-subscribe functionality failure for a data source.

Raises:

Source code in docs_src/capo_datazone/_services/data_zone.py
def update_data_source(
    self,
    domain_identifier: "capo_datazone.types.domain_id.DomainId",
    identifier: "capo_datazone.types.data_source_id.DataSourceId",
    *,
    config_overrides: Optional[DataZoneClientConfig] = None,
    name: Optional["capo_datazone.types.name.Name"] = None,
    description: Optional["capo_datazone.types.description.Description"] = None,
    enable_setting: Optional[
        "capo_datazone.types.enable_setting.EnableSetting"
    ] = None,
    publish_on_import: Optional[bool] = None,
    asset_forms_input: Optional[
        "capo_datazone.types.form_input_list.FormInputList"
    ] = None,
    schedule: Optional[
        "capo_datazone.types.schedule_configuration.ScheduleConfiguration"
    ] = None,
    configuration: Optional[
        "capo_datazone.types.data_source_configuration_input.DataSourceConfigurationInput"
    ] = None,
    recommendation: Optional[
        "capo_datazone.types.recommendation_configuration.RecommendationConfiguration"
    ] = None,
    retain_permissions_on_revoke_failure: Optional[bool] = None,
) -> "capo_datazone.types.update_data_source_output.UpdateDataSourceOutput":
    """<p>Updates the specified data source in Amazon DataZone.</p>

    Args:
        domain_identifier: <p>The identifier of the domain in which to update a data source.</p>
        identifier: <p>The identifier of the data source to be updated.</p>
        name: <p>The name to be updated as part of the <code>UpdateDataSource</code> action.</p>
        description: <p>The description to be updated as part of the <code>UpdateDataSource</code> action.</p>
        enable_setting: <p>The enable setting to be updated as part of the <code>UpdateDataSource</code> action.</p>
        publish_on_import: <p>The publish on import setting to be updated as part of the <code>UpdateDataSource</code> action.</p>
        asset_forms_input: <p>The asset forms to be updated as part of the <code>UpdateDataSource</code> action.</p>
        schedule: <p>The schedule to be updated as part of the <code>UpdateDataSource</code> action.</p>
        configuration: <p>The configuration to be updated as part of the <code>UpdateDataSource</code> action.</p>
        recommendation: <p>The recommendation to be updated as part of the <code>UpdateDataSource</code> action.</p>
        retain_permissions_on_revoke_failure: <p>Specifies that the granted permissions are retained in case of a self-subscribe functionality failure for a data source.</p>

    Raises:
        capo_datazone.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_datazone.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_datazone.errors.unauthorized_exception.UnauthorizedException: <p>You do not have permission to perform this action.</p>
        capo_datazone.errors.conflict_exception.ConflictException: <p>There is a conflict while performing this action.</p>
        capo_datazone.errors.internal_server_exception.InternalServerException: <p>The request has failed because of an unknown error, exception or failure.</p>
        capo_datazone.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource cannot be found.</p>
        capo_datazone.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request has exceeded the specified service quota.</p>
        capo_datazone.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the Amazon Web Services service.</p>
        capo_datazone.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_datazone.types.update_data_source_input.UpdateDataSourceInput]",
    ) -> OperationResponse[
        "capo_datazone.types.update_data_source_output.UpdateDataSourceOutput"
    ]:
        import capo_datazone._operations.data_zone.update_data_source

        output, http_response = (
            capo_datazone._operations.data_zone.update_data_source.update_data_source(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_datazone.types.update_data_source_input.UpdateDataSourceInput",
    ) -> dict[str, Any]:
        import capo_datazone.types.update_data_source_input

        return capo_datazone.types.update_data_source_input.redact_sensitive(input_)

    def _redact_output(
        output: "capo_datazone.types.update_data_source_output.UpdateDataSourceOutput",
    ) -> dict[str, Any]:
        import capo_datazone.types.update_data_source_output

        return capo_datazone.types.update_data_source_output.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "UpdateDataSource",
            redact_input=_redact_input,
            redact_output=_redact_output,
        ),
    )
    input_: capo_datazone.types.update_data_source_input.UpdateDataSourceInput = {
        "domain_identifier": domain_identifier,
        "identifier": identifier,
    }
    if name is not None:
        input_["name"] = name
    if description is not None:
        input_["description"] = description
    if enable_setting is not None:
        input_["enable_setting"] = enable_setting
    if publish_on_import is not None:
        input_["publish_on_import"] = publish_on_import
    if asset_forms_input is not None:
        input_["asset_forms_input"] = asset_forms_input
    if schedule is not None:
        input_["schedule"] = schedule
    if configuration is not None:
        input_["configuration"] = configuration
    if recommendation is not None:
        input_["recommendation"] = recommendation
    if retain_permissions_on_revoke_failure is not None:
        input_["retain_permissions_on_revoke_failure"] = (
            retain_permissions_on_revoke_failure
        )

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