Skip to content

update_component_configuration async

update_component_configuration(
    resource_group_name: ResourceGroupName,
    component_name: ComponentName,
    *,
    config_overrides: Optional[AsyncApplicationInsightsClientConfig] = None,
    monitor: Optional[Monitor] = None,
    tier: Optional[Tier] = None,
    component_configuration: Optional[ComponentConfiguration] = None,
    auto_config_enabled: Optional[AutoConfigEnabled] = None,
) -> UpdateComponentConfigurationResponse

Updates the monitoring configurations for the component. The configuration input parameter is an escaped JSON of the configuration and should match the schema of what is returned by DescribeComponentConfigurationRecommendation.

Parameters:

  • resource_group_name (ResourceGroupName) –

    The name of the resource group.

  • component_name (ComponentName) –

    The name of the component.

  • monitor (Optional[Monitor], default: None ) –

    Indicates whether the application component is monitored.

  • tier (Optional[Tier], default: None ) –

    The tier of the application component.

  • component_configuration (Optional[ComponentConfiguration], default: None ) –

    The configuration settings of the component. The value is the escaped JSON of the configuration. For more information about the JSON format, see Working with JSON. You can send a request to DescribeComponentConfigurationRecommendation to see the recommended configuration for a component. For the complete format of the component configuration file, see Component Configuration.

  • auto_config_enabled (Optional[AutoConfigEnabled], default: None ) –

    Automatically configures the component by applying the recommended configurations.

Raises:

Source code in docs_src/capo_application_insights/_services/async_application_insights.py
async def update_component_configuration(
    self,
    resource_group_name: "capo_application_insights.types.resource_group_name.ResourceGroupName",
    component_name: "capo_application_insights.types.component_name.ComponentName",
    *,
    config_overrides: Optional[AsyncApplicationInsightsClientConfig] = None,
    monitor: Optional["capo_application_insights.types.monitor.Monitor"] = None,
    tier: Optional["capo_application_insights.types.tier.Tier"] = None,
    component_configuration: Optional[
        "capo_application_insights.types.component_configuration.ComponentConfiguration"
    ] = None,
    auto_config_enabled: Optional[
        "capo_application_insights.types.auto_config_enabled.AutoConfigEnabled"
    ] = None,
) -> "capo_application_insights.types.update_component_configuration_response.UpdateComponentConfigurationResponse":
    """<p>Updates the monitoring configurations for the component. The configuration input parameter is an escaped JSON of the configuration and should match the schema of what is returned by <code>DescribeComponentConfigurationRecommendation</code>. </p>

    Args:
        resource_group_name: <p>The name of the resource group.</p>
        component_name: <p>The name of the component.</p>
        monitor: <p>Indicates whether the application component is monitored.</p>
        tier: <p>The tier of the application component.</p>
        component_configuration: <p>The configuration settings of the component. The value is the escaped JSON of the configuration. For more information about the JSON format, see <a href="https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/working-with-json.html">Working with JSON</a>. You can send a request to <code>DescribeComponentConfigurationRecommendation</code> to see the recommended configuration for a component. For the complete format of the component configuration file, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/component-config.html">Component Configuration</a>.</p>
        auto_config_enabled: <p> Automatically configures the component by applying the recommended configurations. </p>

    Raises:
        capo_application_insights.errors.internal_server_exception.InternalServerException: <p>The server encountered an internal error and is unable to complete the request.</p>
        capo_application_insights.errors.resource_in_use_exception.ResourceInUseException: <p>The resource is already created or in use.</p>
        capo_application_insights.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource does not exist in the customer account.</p>
        capo_application_insights.errors.validation_exception.ValidationException: <p>The parameter is not valid.</p>
        capo_application_insights.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_application_insights.types.update_component_configuration_request.UpdateComponentConfigurationRequest]",
    ) -> AsyncOperationResponse[
        "capo_application_insights.types.update_component_configuration_response.UpdateComponentConfigurationResponse"
    ]:
        import capo_application_insights._operations.ec2_windows_barley_service.update_component_configuration

        (
            output,
            http_response,
        ) = await capo_application_insights._operations.ec2_windows_barley_service.update_component_configuration.async_update_component_configuration(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateComponentConfiguration")
    )
    input_: capo_application_insights.types.update_component_configuration_request.UpdateComponentConfigurationRequest = {
        "resource_group_name": resource_group_name,
        "component_name": component_name,
    }
    if monitor is not None:
        input_["monitor"] = monitor
    if tier is not None:
        input_["tier"] = tier
    if component_configuration is not None:
        input_["component_configuration"] = component_configuration
    if auto_config_enabled is not None:
        input_["auto_config_enabled"] = auto_config_enabled

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