Skip to content

update_configuration_template async

update_configuration_template(
    application_name: ApplicationName,
    template_name: ConfigurationTemplateName,
    *,
    config_overrides: Optional[AsyncElasticBeanstalkClientConfig] = None,
    description: Optional[Description] = None,
    option_settings: Optional[ConfigurationOptionSettingsList] = None,
    options_to_remove: Optional[OptionsSpecifierList] = None,
) -> ConfigurationSettingsDescription

Updates the specified configuration template to have the specified properties or configuration option values.

If a property (for example, ApplicationName) is not provided, its value remains unchanged. To clear such properties, specify an empty string.

Related Topics

Parameters:

  • application_name (ApplicationName) –

    The name of the application associated with the configuration template to update.

    If no application is found with this name, UpdateConfigurationTemplate returns an InvalidParameterValue error.

  • template_name (ConfigurationTemplateName) –

    The name of the configuration template to update.

    If no configuration template is found with this name, UpdateConfigurationTemplate returns an InvalidParameterValue error.

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

    A new description for the configuration.

  • option_settings (Optional[ConfigurationOptionSettingsList], default: None ) –

    A list of configuration option settings to update with the new specified option value.

  • options_to_remove (Optional[OptionsSpecifierList], default: None ) –

    A list of configuration options to remove from the configuration set.

    Constraint: You can remove only UserDefined configuration options.

Raises:

Examples:

To update a configuration template The following operation removes the configured CloudWatch custom health metrics configuration ConfigDocument from a saved configuration template named my-template:

>>> await client.update_configuration_template(application_name='my-app', template_name='my-template', options_to_remove=[{'Namespace': 'aws:elasticbeanstalk:healthreporting:system', 'OptionName': 'ConfigDocument'}])
Source code in docs_src/capo_elastic_beanstalk/_services/async_elastic_beanstalk.py
async def update_configuration_template(
    self,
    application_name: "capo_elastic_beanstalk.types.application_name.ApplicationName",
    template_name: "capo_elastic_beanstalk.types.configuration_template_name.ConfigurationTemplateName",
    *,
    config_overrides: Optional[AsyncElasticBeanstalkClientConfig] = None,
    description: Optional[
        "capo_elastic_beanstalk.types.description.Description"
    ] = None,
    option_settings: Optional[
        "capo_elastic_beanstalk.types.configuration_option_settings_list.ConfigurationOptionSettingsList"
    ] = None,
    options_to_remove: Optional[
        "capo_elastic_beanstalk.types.options_specifier_list.OptionsSpecifierList"
    ] = None,
) -> "capo_elastic_beanstalk.types.configuration_settings_description.ConfigurationSettingsDescription":
    """<p>Updates the specified configuration template to have the specified properties or configuration option values.</p> <note> <p>If a property (for example, <code>ApplicationName</code>) is not provided, its value remains unchanged. To clear such properties, specify an empty string.</p> </note> <p>Related Topics</p> <ul> <li> <p> <a>DescribeConfigurationOptions</a> </p> </li> </ul>

    Args:
        application_name: <p>The name of the application associated with the configuration template to update.</p> <p> If no application is found with this name, <code>UpdateConfigurationTemplate</code> returns an <code>InvalidParameterValue</code> error. </p>
        template_name: <p>The name of the configuration template to update.</p> <p> If no configuration template is found with this name, <code>UpdateConfigurationTemplate</code> returns an <code>InvalidParameterValue</code> error. </p>
        description: <p>A new description for the configuration.</p>
        option_settings: <p>A list of configuration option settings to update with the new specified option value.</p>
        options_to_remove: <p>A list of configuration options to remove from the configuration set.</p> <p> Constraint: You can remove only <code>UserDefined</code> configuration options. </p>

    Raises:
        capo_elastic_beanstalk.errors.insufficient_privileges_exception.InsufficientPrivilegesException: <p>The specified account does not have sufficient privileges for one or more Amazon Web Services services.</p>
        capo_elastic_beanstalk.errors.too_many_buckets_exception.TooManyBucketsException: <p>The specified account has reached its limit of Amazon S3 buckets.</p>
        capo_elastic_beanstalk.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        To update a configuration template
        The following operation removes the configured CloudWatch custom health metrics configuration ConfigDocument from a saved configuration template named my-template:

        >>> await client.update_configuration_template(application_name='my-app', template_name='my-template', options_to_remove=[{'Namespace': 'aws:elasticbeanstalk:healthreporting:system', 'OptionName': 'ConfigDocument'}])
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_elastic_beanstalk.types.update_configuration_template_message.UpdateConfigurationTemplateMessage]",
    ) -> AsyncOperationResponse[
        "capo_elastic_beanstalk.types.configuration_settings_description.ConfigurationSettingsDescription"
    ]:
        import capo_elastic_beanstalk._operations.aws_elastic_beanstalk_service.update_configuration_template

        (
            output,
            http_response,
        ) = await capo_elastic_beanstalk._operations.aws_elastic_beanstalk_service.update_configuration_template.async_update_configuration_template(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateConfigurationTemplate")
    )
    input_: capo_elastic_beanstalk.types.update_configuration_template_message.UpdateConfigurationTemplateMessage = {
        "application_name": application_name,
        "template_name": template_name,
    }
    if description is not None:
        input_["description"] = description
    if option_settings is not None:
        input_["option_settings"] = option_settings
    if options_to_remove is not None:
        input_["options_to_remove"] = options_to_remove

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