ElasticBeanstalk / Client / update_configuration_template

update_configuration_template#

ElasticBeanstalk.Client.update_configuration_template(**kwargs)#

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

Note

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

Related Topics

  • DescribeConfigurationOptions

See also: AWS API Documentation

Request Syntax

response = client.update_configuration_template(
    ApplicationName='string',
    TemplateName='string',
    Description='string',
    OptionSettings=[
        {
            'ResourceName': 'string',
            'Namespace': 'string',
            'OptionName': 'string',
            'Value': 'string'
        },
    ],
    OptionsToRemove=[
        {
            'ResourceName': 'string',
            'Namespace': 'string',
            'OptionName': 'string'
        },
    ]
)
Parameters:
  • ApplicationName (string) –

    [REQUIRED]

    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.

  • TemplateName (string) –

    [REQUIRED]

    The name of the configuration template to update.

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

  • Description (string) – A new description for the configuration.

  • OptionSettings (list) –

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

    • (dict) –

      A specification identifying an individual configuration option along with its current value. For a list of possible namespaces and option values, see Option Values in the AWS Elastic Beanstalk Developer Guide.

      • ResourceName (string) –

        A unique resource name for the option setting. Use it for a time–based scaling configuration option.

      • Namespace (string) –

        A unique namespace that identifies the option’s associated AWS resource.

      • OptionName (string) –

        The name of the configuration option.

      • Value (string) –

        The current value for the configuration option.

  • OptionsToRemove (list) –

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

    Constraint: You can remove only UserDefined configuration options.

    • (dict) –

      A specification identifying an individual configuration option.

      • ResourceName (string) –

        A unique resource name for a time-based scaling configuration option.

      • Namespace (string) –

        A unique namespace identifying the option’s associated AWS resource.

      • OptionName (string) –

        The name of the configuration option.

Return type:

dict

Returns:

Response Syntax

{
    'SolutionStackName': 'string',
    'PlatformArn': 'string',
    'ApplicationName': 'string',
    'TemplateName': 'string',
    'Description': 'string',
    'EnvironmentName': 'string',
    'DeploymentStatus': 'deployed'|'pending'|'failed',
    'DateCreated': datetime(2015, 1, 1),
    'DateUpdated': datetime(2015, 1, 1),
    'OptionSettings': [
        {
            'ResourceName': 'string',
            'Namespace': 'string',
            'OptionName': 'string',
            'Value': 'string'
        },
    ]
}

Response Structure

  • (dict) –

    Describes the settings for a configuration set.

    • SolutionStackName (string) –

      The name of the solution stack this configuration set uses.

    • PlatformArn (string) –

      The ARN of the platform version.

    • ApplicationName (string) –

      The name of the application associated with this configuration set.

    • TemplateName (string) –

      If not null, the name of the configuration template for this configuration set.

    • Description (string) –

      Describes this configuration set.

    • EnvironmentName (string) –

      If not null, the name of the environment for this configuration set.

    • DeploymentStatus (string) –

      If this configuration set is associated with an environment, the DeploymentStatus parameter indicates the deployment status of this configuration set:

      • null: This configuration is not associated with a running environment.

      • pending: This is a draft configuration that is not deployed to the associated environment but is in the process of deploying.

      • deployed: This is the configuration that is currently deployed to the associated running environment.

      • failed: This is a draft configuration that failed to successfully deploy.

    • DateCreated (datetime) –

      The date (in UTC time) when this configuration set was created.

    • DateUpdated (datetime) –

      The date (in UTC time) when this configuration set was last modified.

    • OptionSettings (list) –

      A list of the configuration options and their values in this configuration set.

      • (dict) –

        A specification identifying an individual configuration option along with its current value. For a list of possible namespaces and option values, see Option Values in the AWS Elastic Beanstalk Developer Guide.

        • ResourceName (string) –

          A unique resource name for the option setting. Use it for a time–based scaling configuration option.

        • Namespace (string) –

          A unique namespace that identifies the option’s associated AWS resource.

        • OptionName (string) –

          The name of the configuration option.

        • Value (string) –

          The current value for the configuration option.

Exceptions

Examples

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

response = client.update_configuration_template(
    ApplicationName='my-app',
    OptionsToRemove=[
        {
            'Namespace': 'aws:elasticbeanstalk:healthreporting:system',
            'OptionName': 'ConfigDocument',
        },
    ],
    TemplateName='my-template',
)

print(response)

Expected Output:

{
    'ApplicationName': 'my-app',
    'DateCreated': datetime(2015, 8, 20, 22, 39, 31, 3, 232, 0),
    'DateUpdated': datetime(2015, 8, 20, 22, 43, 11, 3, 232, 0),
    'SolutionStackName': '64bit Amazon Linux 2015.03 v2.0.0 running Tomcat 8 Java 8',
    'TemplateName': 'my-template',
    'ResponseMetadata': {
        '...': '...',
    },
}