Skip to content

update_application_component_config async

update_application_component_config(
    application_component_id: ApplicationComponentId,
    *,
    config_overrides: Optional[AsyncMigrationHubStrategyClientConfig] = None,
    inclusion_status: Optional[InclusionStatus] = None,
    strategy_option: Optional[StrategyOption] = None,
    source_code_list: Optional[SourceCodeList] = None,
    secrets_manager_key: Optional[SecretsManagerKey] = None,
    configure_only: Optional[Boolean] = None,
    app_type: Optional[AppType] = None,
) -> UpdateApplicationComponentConfigResponse

Updates the configuration of an application component.

Parameters:

  • application_component_id (ApplicationComponentId) –

    The ID of the application component. The ID is unique within an AWS account.

  • inclusion_status (Optional[InclusionStatus], default: None ) –

    Indicates whether the application component has been included for server recommendation or not.

  • strategy_option (Optional[StrategyOption], default: None ) –

    The preferred strategy options for the application component. Use values from the GetApplicationComponentStrategies response.

  • source_code_list (Optional[SourceCodeList], default: None ) –

    The list of source code configurations to update for the application component.

  • secrets_manager_key (Optional[SecretsManagerKey], default: None ) –

    Database credentials.

  • configure_only (Optional[Boolean], default: None ) –

    Update the configuration request of an application component. If it is set to true, the source code and/or database credentials are updated. If it is set to false, the source code and/or database credentials are updated and an analysis is initiated.

  • app_type (Optional[AppType], default: None ) –

    The type of known component.

Raises:

Source code in docs_src/capo_migrationhubstrategy/_services/async_migration_hub_strategy.py
async def update_application_component_config(
    self,
    application_component_id: "capo_migrationhubstrategy.types.application_component_id.ApplicationComponentId",
    *,
    config_overrides: Optional[AsyncMigrationHubStrategyClientConfig] = None,
    inclusion_status: Optional[
        "capo_migrationhubstrategy.types.inclusion_status.InclusionStatus"
    ] = None,
    strategy_option: Optional[
        "capo_migrationhubstrategy.types.strategy_option.StrategyOption"
    ] = None,
    source_code_list: Optional[
        "capo_migrationhubstrategy.types.source_code_list.SourceCodeList"
    ] = None,
    secrets_manager_key: Optional[
        "capo_migrationhubstrategy.types.secrets_manager_key.SecretsManagerKey"
    ] = None,
    configure_only: Optional[
        "capo_migrationhubstrategy.types.boolean.Boolean"
    ] = None,
    app_type: Optional["capo_migrationhubstrategy.types.app_type.AppType"] = None,
) -> "capo_migrationhubstrategy.types.update_application_component_config_response.UpdateApplicationComponentConfigResponse":
    """<p> Updates the configuration of an application component. </p>

    Args:
        application_component_id: <p> The ID of the application component. The ID is unique within an AWS account. </p>
        inclusion_status: <p> Indicates whether the application component has been included for server recommendation or not. </p>
        strategy_option: <p> The preferred strategy options for the application component. Use values from the <a>GetApplicationComponentStrategies</a> response. </p>
        source_code_list: <p> The list of source code configurations to update for the application component. </p>
        secrets_manager_key: <p> Database credentials. </p>
        configure_only: <p>Update the configuration request of an application component. If it is set to true, the source code and/or database credentials are updated. If it is set to false, the source code and/or database credentials are updated and an analysis is initiated.</p>
        app_type: <p>The type of known component.</p>

    Raises:
        capo_migrationhubstrategy.errors.internal_server_exception.InternalServerException: <p> The server experienced an internal error. Try again. </p>
        capo_migrationhubstrategy.errors.resource_not_found_exception.ResourceNotFoundException: <p> The specified ID in the request is not found. </p>
        capo_migrationhubstrategy.errors.throttling_exception.ThrottlingException: <p> The request was denied due to request throttling. </p>
        capo_migrationhubstrategy.errors.validation_exception.ValidationException: <p> The request body isn't valid. </p>
        capo_migrationhubstrategy.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_migrationhubstrategy.types.update_application_component_config_request.UpdateApplicationComponentConfigRequest]",
    ) -> AsyncOperationResponse[
        "capo_migrationhubstrategy.types.update_application_component_config_response.UpdateApplicationComponentConfigResponse"
    ]:
        import capo_migrationhubstrategy._operations.aws_migration_hub_strategy_recommendation.update_application_component_config

        (
            output,
            http_response,
        ) = await capo_migrationhubstrategy._operations.aws_migration_hub_strategy_recommendation.update_application_component_config.async_update_application_component_config(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_migrationhubstrategy.types.update_application_component_config_request.UpdateApplicationComponentConfigRequest",
    ) -> dict[str, Any]:
        import capo_migrationhubstrategy.types.update_application_component_config_request

        return capo_migrationhubstrategy.types.update_application_component_config_request.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "UpdateApplicationComponentConfig", redact_input=_redact_input
        ),
    )
    input_: capo_migrationhubstrategy.types.update_application_component_config_request.UpdateApplicationComponentConfigRequest = {
        "application_component_id": application_component_id
    }
    if inclusion_status is not None:
        input_["inclusion_status"] = inclusion_status
    if strategy_option is not None:
        input_["strategy_option"] = strategy_option
    if source_code_list is not None:
        input_["source_code_list"] = source_code_list
    if secrets_manager_key is not None:
        input_["secrets_manager_key"] = secrets_manager_key
    if configure_only is not None:
        input_["configure_only"] = configure_only
    if app_type is not None:
        input_["app_type"] = app_type

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output