Skip to content

associate_configuration_items_to_application

associate_configuration_items_to_application(
    application_configuration_id: ApplicationId,
    configuration_ids: ConfigurationIdList,
    *,
    config_overrides: Optional[ApplicationDiscoveryServiceClientConfig] = None,
) -> AssociateConfigurationItemsToApplicationResponse

Associates one or more configuration items with an application.

Parameters:

  • application_configuration_id (ApplicationId) –

    The configuration ID of an application with which items are to be associated.

  • configuration_ids (ConfigurationIdList) –

    The ID of each configuration item to be associated with an application.

Raises:

Source code in docs_src/capo_application_discovery_service/_services/application_discovery_service.py
def associate_configuration_items_to_application(
    self,
    application_configuration_id: "capo_application_discovery_service.types.application_id.ApplicationId",
    configuration_ids: "capo_application_discovery_service.types.configuration_id_list.ConfigurationIdList",
    *,
    config_overrides: Optional[ApplicationDiscoveryServiceClientConfig] = None,
) -> "capo_application_discovery_service.types.associate_configuration_items_to_application_response.AssociateConfigurationItemsToApplicationResponse":
    """<p>Associates one or more configuration items with an application.</p>

    Args:
        application_configuration_id: <p>The configuration ID of an application with which items are to be associated.</p>
        configuration_ids: <p>The ID of each configuration item to be associated with an application.</p>

    Raises:
        capo_application_discovery_service.errors.authorization_error_exception.AuthorizationErrorException: <p>The user does not have permission to perform the action. Check the IAM policy associated with this user.</p>
        capo_application_discovery_service.errors.home_region_not_set_exception.HomeRegionNotSetException: <p>The home Region is not set. Set the home Region to continue.</p>
        capo_application_discovery_service.errors.invalid_parameter_exception.InvalidParameterException: <p>One or more parameters are not valid. Verify the parameters and try again.</p>
        capo_application_discovery_service.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>The value of one or more parameters are either invalid or out of range. Verify the parameter values and try again.</p>
        capo_application_discovery_service.errors.server_internal_error_exception.ServerInternalErrorException: <p>The server experienced an internal error. Try again.</p>
        capo_application_discovery_service.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_application_discovery_service.types.associate_configuration_items_to_application_request.AssociateConfigurationItemsToApplicationRequest]",
    ) -> OperationResponse[
        "capo_application_discovery_service.types.associate_configuration_items_to_application_response.AssociateConfigurationItemsToApplicationResponse"
    ]:
        import capo_application_discovery_service._operations.aws_poseidon_service_v2015_11_01.associate_configuration_items_to_application

        output, http_response = (
            capo_application_discovery_service._operations.aws_poseidon_service_v2015_11_01.associate_configuration_items_to_application.associate_configuration_items_to_application(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("AssociateConfigurationItemsToApplication"),
    )
    input_: capo_application_discovery_service.types.associate_configuration_items_to_application_request.AssociateConfigurationItemsToApplicationRequest = {
        "application_configuration_id": application_configuration_id,
        "configuration_ids": configuration_ids,
    }

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