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
DescribeConfigurationOptions
Access
Parameters
Parameter |
Type |
Required |
Description |
$application_name
|
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. |
$template_name
|
string
|
Required
|
The name of the configuration template to update. If no configuration template is found with this name, UpdateConfigurationTemplate returns an InvalidParameterValue error. |
$opt
|
array
|
Optional
|
An associative array of parameters that can have the following keys:
Description - string - Optional - A new description for the configuration.OptionSettings - array - Optional - A list of configuration option settings to update with the new specified option value. x - array - Optional - This represents a simple array index. Namespace - string - Optional - A unique namespace identifying the option’s associated AWS resource.OptionName - string - Optional - The name of the configuration option.Value - string - Optional - The current value for the configuration option.
OptionsToRemove - array - Optional - A list of configuration options to remove from the configuration set. Constraint: You can remove only UserDefined configuration options. x - array - Optional - This represents a simple array index. Namespace - string - Optional - A unique namespace identifying the option’s associated AWS resource.OptionName - string - Optional - The name of the configuration option.
curlopts - array - Optional - A set of values to pass directly into curl_setopt() , where the key is a pre-defined CURLOPT_* constant.returnCurlHandle - boolean - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests. |
Returns
Examples
Update a configuration template.
// Instantiate the class
$bean = new AmazonElasticBeanstalk();
$response = $bean->update_configuration_template('my-application', 'my-template', array(
'Description' => 'This is an updated configuration template description.'
));
// Success?
var_dump($response->isOK());
Result:
bool(true)
Related Methods
Source
Method defined in services/elasticbeanstalk.class.php | Toggle source view (26 lines) | View on GitHub
public function update_configuration_template($application_name, $template_name, $opt = null)
{
if (!$opt) $opt = array();
$opt['ApplicationName'] = $application_name;
$opt['TemplateName'] = $template_name;
// Optional list + map
if (isset($opt['OptionSettings']))
{
$opt = array_merge($opt, CFComplexType::map(array(
'OptionSettings' => $opt['OptionSettings']
), 'member'));
unset($opt['OptionSettings']);
}
// Optional list + map
if (isset($opt['OptionsToRemove']))
{
$opt = array_merge($opt, CFComplexType::map(array(
'OptionsToRemove' => $opt['OptionsToRemove']
), 'member'));
unset($opt['OptionsToRemove']);
}
return $this->authenticate('UpdateConfigurationTemplate', $opt);
}