Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
   * 
   * Licensed under the Apache License, Version 2.0 (the "License").
   * You may not use this file except in compliance with the License.
   * A copy of the License is located at
   * 
   *  http://aws.amazon.com/apache2.0
   * 
  * or in the "license" file accompanying this file. This file is distributed
  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
  * express or implied. See the License for the specific language governing
  * permissions and limitations under the License.
  */
 package com.amazonaws.services.elasticbeanstalk.model;
 
 
Container for the parameters to the CreateConfigurationTemplate operation.

Creates a configuration template. Templates are associated with a specific application and are used to deploy different versions of the application with the same configuration settings.

Related Topics

  • DescribeConfigurationOptions
  • DescribeConfigurationSettings
  • ListAvailableSolutionStacks

 
 public class CreateConfigurationTemplateRequest extends AmazonWebServiceRequest implements SerializableCloneable {

    
The name of the application to associate with this configuration template. If no application is found with this name, AWS Elastic Beanstalk returns an InvalidParameterValue error.

Constraints:
Length: 1 - 100

 
     private String applicationName;

    
The name of the configuration template.

Constraint: This name must be unique per application.

Default: If a configuration template already exists with this name, AWS Elastic Beanstalk returns an InvalidParameterValue error.

Constraints:
Length: 1 - 100

 
     private String templateName;

    
The name of the solution stack used by this configuration. The solution stack specifies the operating system, architecture, and application server for a configuration template. It determines the set of configuration options as well as the possible and default values.

Use ListAvailableSolutionStacks to obtain a list of available solution stacks.

A solution stack name or a source configuration parameter must be specified, otherwise AWS Elastic Beanstalk returns an InvalidParameterValue error.

If a solution stack name is not specified and the source configuration parameter is specified, AWS Elastic Beanstalk uses the same solution stack as the source configuration template.

Constraints:
Length: 0 - 100

 
     private String solutionStackName;

    
If specified, AWS Elastic Beanstalk uses the configuration values from the specified configuration template to create a new configuration.

Values specified in the OptionSettings parameter of this call overrides any values obtained from the SourceConfiguration.

If no configuration template is found, returns an InvalidParameterValue error.

Constraint: If both the solution stack name parameter and the source configuration parameters are specified, the solution stack of the source configuration template must match the specified solution stack name or else AWS Elastic Beanstalk returns an InvalidParameterCombination error.

 
     private SourceConfiguration sourceConfiguration;

    
The ID of the environment used with this configuration template.
 
    private String environmentId;

    
Describes this configuration.

Constraints:
Length: 0 - 200

    private String description;

    
If specified, AWS Elastic Beanstalk sets the specified configuration option to the requested value. The new value overrides the value obtained from the solution stack or the source configuration template.
Default constructor for a new CreateConfigurationTemplateRequest object. Callers should use the setter or fluent setter (with...) methods to initialize this object after creating it.
    public CreateConfigurationTemplateRequest() {}
    
    
Constructs a new CreateConfigurationTemplateRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.

Parameters:
applicationName The name of the application to associate with this configuration template. If no application is found with this name, AWS Elastic Beanstalk returns an InvalidParameterValue error.
templateName The name of the configuration template.

Constraint: This name must be unique per application.

Default: If a configuration template already exists with this name, AWS Elastic Beanstalk returns an InvalidParameterValue error.

    public CreateConfigurationTemplateRequest(String applicationNameString templateName) {
        setApplicationName(applicationName);
        setTemplateName(templateName);
    }

    
The name of the application to associate with this configuration template. If no application is found with this name, AWS Elastic Beanstalk returns an InvalidParameterValue error.

Constraints:
Length: 1 - 100

Returns:
The name of the application to associate with this configuration template. If no application is found with this name, AWS Elastic Beanstalk returns an InvalidParameterValue error.
    public String getApplicationName() {
        return ;
    }
    
    
The name of the application to associate with this configuration template. If no application is found with this name, AWS Elastic Beanstalk returns an InvalidParameterValue error.

Constraints:
Length: 1 - 100

Parameters:
applicationName The name of the application to associate with this configuration template. If no application is found with this name, AWS Elastic Beanstalk returns an InvalidParameterValue error.
    public void setApplicationName(String applicationName) {
        this. = applicationName;
    }
    
    
The name of the application to associate with this configuration template. If no application is found with this name, AWS Elastic Beanstalk returns an InvalidParameterValue error.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 1 - 100

Parameters:
applicationName The name of the application to associate with this configuration template. If no application is found with this name, AWS Elastic Beanstalk returns an InvalidParameterValue error.
Returns:
A reference to this updated object so that method calls can be chained together.
        this. = applicationName;
        return this;
    }

    
The name of the configuration template.

Constraint: This name must be unique per application.

Default: If a configuration template already exists with this name, AWS Elastic Beanstalk returns an InvalidParameterValue error.

Constraints:
Length: 1 - 100

Returns:
The name of the configuration template.

Constraint: This name must be unique per application.

Default: If a configuration template already exists with this name, AWS Elastic Beanstalk returns an InvalidParameterValue error.

    public String getTemplateName() {
        return ;
    }
    
    
The name of the configuration template.

Constraint: This name must be unique per application.

Default: If a configuration template already exists with this name, AWS Elastic Beanstalk returns an InvalidParameterValue error.

Constraints:
Length: 1 - 100

Parameters:
templateName The name of the configuration template.

Constraint: This name must be unique per application.

Default: If a configuration template already exists with this name, AWS Elastic Beanstalk returns an InvalidParameterValue error.

    public void setTemplateName(String templateName) {
        this. = templateName;
    }
    
    
The name of the configuration template.

Constraint: This name must be unique per application.

Default: If a configuration template already exists with this name, AWS Elastic Beanstalk returns an InvalidParameterValue error.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 1 - 100

Parameters:
templateName The name of the configuration template.

Constraint: This name must be unique per application.

Default: If a configuration template already exists with this name, AWS Elastic Beanstalk returns an InvalidParameterValue error.

Returns:
A reference to this updated object so that method calls can be chained together.
        this. = templateName;
        return this;
    }

    
The name of the solution stack used by this configuration. The solution stack specifies the operating system, architecture, and application server for a configuration template. It determines the set of configuration options as well as the possible and default values.

Use ListAvailableSolutionStacks to obtain a list of available solution stacks.

A solution stack name or a source configuration parameter must be specified, otherwise AWS Elastic Beanstalk returns an InvalidParameterValue error.

If a solution stack name is not specified and the source configuration parameter is specified, AWS Elastic Beanstalk uses the same solution stack as the source configuration template.

Constraints:
Length: 0 - 100

Returns:
The name of the solution stack used by this configuration. The solution stack specifies the operating system, architecture, and application server for a configuration template. It determines the set of configuration options as well as the possible and default values.

Use ListAvailableSolutionStacks to obtain a list of available solution stacks.

A solution stack name or a source configuration parameter must be specified, otherwise AWS Elastic Beanstalk returns an InvalidParameterValue error.

If a solution stack name is not specified and the source configuration parameter is specified, AWS Elastic Beanstalk uses the same solution stack as the source configuration template.

    public String getSolutionStackName() {
        return ;
    }
    
    
The name of the solution stack used by this configuration. The solution stack specifies the operating system, architecture, and application server for a configuration template. It determines the set of configuration options as well as the possible and default values.

Use ListAvailableSolutionStacks to obtain a list of available solution stacks.

A solution stack name or a source configuration parameter must be specified, otherwise AWS Elastic Beanstalk returns an InvalidParameterValue error.

If a solution stack name is not specified and the source configuration parameter is specified, AWS Elastic Beanstalk uses the same solution stack as the source configuration template.

Constraints:
Length: 0 - 100

Parameters:
solutionStackName The name of the solution stack used by this configuration. The solution stack specifies the operating system, architecture, and application server for a configuration template. It determines the set of configuration options as well as the possible and default values.

Use ListAvailableSolutionStacks to obtain a list of available solution stacks.

A solution stack name or a source configuration parameter must be specified, otherwise AWS Elastic Beanstalk returns an InvalidParameterValue error.

If a solution stack name is not specified and the source configuration parameter is specified, AWS Elastic Beanstalk uses the same solution stack as the source configuration template.

    public void setSolutionStackName(String solutionStackName) {
        this. = solutionStackName;
    }
    
    
The name of the solution stack used by this configuration. The solution stack specifies the operating system, architecture, and application server for a configuration template. It determines the set of configuration options as well as the possible and default values.

Use ListAvailableSolutionStacks to obtain a list of available solution stacks.

A solution stack name or a source configuration parameter must be specified, otherwise AWS Elastic Beanstalk returns an InvalidParameterValue error.

If a solution stack name is not specified and the source configuration parameter is specified, AWS Elastic Beanstalk uses the same solution stack as the source configuration template.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 0 - 100

Parameters:
solutionStackName The name of the solution stack used by this configuration. The solution stack specifies the operating system, architecture, and application server for a configuration template. It determines the set of configuration options as well as the possible and default values.

Use ListAvailableSolutionStacks to obtain a list of available solution stacks.

A solution stack name or a source configuration parameter must be specified, otherwise AWS Elastic Beanstalk returns an InvalidParameterValue error.

If a solution stack name is not specified and the source configuration parameter is specified, AWS Elastic Beanstalk uses the same solution stack as the source configuration template.

Returns:
A reference to this updated object so that method calls can be chained together.
        this. = solutionStackName;
        return this;
    }

    
If specified, AWS Elastic Beanstalk uses the configuration values from the specified configuration template to create a new configuration.

Values specified in the OptionSettings parameter of this call overrides any values obtained from the SourceConfiguration.

If no configuration template is found, returns an InvalidParameterValue error.

Constraint: If both the solution stack name parameter and the source configuration parameters are specified, the solution stack of the source configuration template must match the specified solution stack name or else AWS Elastic Beanstalk returns an InvalidParameterCombination error.

Returns:
If specified, AWS Elastic Beanstalk uses the configuration values from the specified configuration template to create a new configuration.

Values specified in the OptionSettings parameter of this call overrides any values obtained from the SourceConfiguration.

If no configuration template is found, returns an InvalidParameterValue error.

Constraint: If both the solution stack name parameter and the source configuration parameters are specified, the solution stack of the source configuration template must match the specified solution stack name or else AWS Elastic Beanstalk returns an InvalidParameterCombination error.

        return ;
    }
    
    
If specified, AWS Elastic Beanstalk uses the configuration values from the specified configuration template to create a new configuration.

Values specified in the OptionSettings parameter of this call overrides any values obtained from the SourceConfiguration.

If no configuration template is found, returns an InvalidParameterValue error.

Constraint: If both the solution stack name parameter and the source configuration parameters are specified, the solution stack of the source configuration template must match the specified solution stack name or else AWS Elastic Beanstalk returns an InvalidParameterCombination error.

Parameters:
sourceConfiguration If specified, AWS Elastic Beanstalk uses the configuration values from the specified configuration template to create a new configuration.

Values specified in the OptionSettings parameter of this call overrides any values obtained from the SourceConfiguration.

If no configuration template is found, returns an InvalidParameterValue error.

Constraint: If both the solution stack name parameter and the source configuration parameters are specified, the solution stack of the source configuration template must match the specified solution stack name or else AWS Elastic Beanstalk returns an InvalidParameterCombination error.

    public void setSourceConfiguration(SourceConfiguration sourceConfiguration) {
        this. = sourceConfiguration;
    }
    
    
If specified, AWS Elastic Beanstalk uses the configuration values from the specified configuration template to create a new configuration.

Values specified in the OptionSettings parameter of this call overrides any values obtained from the SourceConfiguration.

If no configuration template is found, returns an InvalidParameterValue error.

Constraint: If both the solution stack name parameter and the source configuration parameters are specified, the solution stack of the source configuration template must match the specified solution stack name or else AWS Elastic Beanstalk returns an InvalidParameterCombination error.

Returns a reference to this object so that method calls can be chained together.

Parameters:
sourceConfiguration If specified, AWS Elastic Beanstalk uses the configuration values from the specified configuration template to create a new configuration.

Values specified in the OptionSettings parameter of this call overrides any values obtained from the SourceConfiguration.

If no configuration template is found, returns an InvalidParameterValue error.

Constraint: If both the solution stack name parameter and the source configuration parameters are specified, the solution stack of the source configuration template must match the specified solution stack name or else AWS Elastic Beanstalk returns an InvalidParameterCombination error.

Returns:
A reference to this updated object so that method calls can be chained together.
        this. = sourceConfiguration;
        return this;
    }

    
The ID of the environment used with this configuration template.

Returns:
The ID of the environment used with this configuration template.
    public String getEnvironmentId() {
        return ;
    }
    
    
The ID of the environment used with this configuration template.

Parameters:
environmentId The ID of the environment used with this configuration template.
    public void setEnvironmentId(String environmentId) {
        this. = environmentId;
    }
    
    
The ID of the environment used with this configuration template.

Returns a reference to this object so that method calls can be chained together.

Parameters:
environmentId The ID of the environment used with this configuration template.
Returns:
A reference to this updated object so that method calls can be chained together.
        this. = environmentId;
        return this;
    }

    
Describes this configuration.

Constraints:
Length: 0 - 200

Returns:
Describes this configuration.
    public String getDescription() {
        return ;
    }
    
    
Describes this configuration.

Constraints:
Length: 0 - 200

Parameters:
description Describes this configuration.
    public void setDescription(String description) {
        this. = description;
    }
    
    
Describes this configuration.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 0 - 200

Parameters:
description Describes this configuration.
Returns:
A reference to this updated object so that method calls can be chained together.
        this. = description;
        return this;
    }

    
If specified, AWS Elastic Beanstalk sets the specified configuration option to the requested value. The new value overrides the value obtained from the solution stack or the source configuration template.

Returns:
If specified, AWS Elastic Beanstalk sets the specified configuration option to the requested value. The new value overrides the value obtained from the solution stack or the source configuration template.
        if ( == null) {
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
If specified, AWS Elastic Beanstalk sets the specified configuration option to the requested value. The new value overrides the value obtained from the solution stack or the source configuration template.

Parameters:
optionSettings If specified, AWS Elastic Beanstalk sets the specified configuration option to the requested value. The new value overrides the value obtained from the solution stack or the source configuration template.
    public void setOptionSettings(java.util.Collection<ConfigurationOptionSettingoptionSettings) {
        if (optionSettings == null) {
            this. = null;
            return;
        }
        optionSettingsCopy.addAll(optionSettings);
        this. = optionSettingsCopy;
    }
    
    
If specified, AWS Elastic Beanstalk sets the specified configuration option to the requested value. The new value overrides the value obtained from the solution stack or the source configuration template.

NOTE: This method appends the values to the existing list (if any). Use setOptionSettings(java.util.Collection) or withOptionSettings(java.util.Collection) if you want to override the existing values.

Returns a reference to this object so that method calls can be chained together.

Parameters:
optionSettings If specified, AWS Elastic Beanstalk sets the specified configuration option to the requested value. The new value overrides the value obtained from the solution stack or the source configuration template.
Returns:
A reference to this updated object so that method calls can be chained together.
        if (getOptionSettings() == nullsetOptionSettings(new java.util.ArrayList<ConfigurationOptionSetting>(optionSettings.length));
        for (ConfigurationOptionSetting value : optionSettings) {
            getOptionSettings().add(value);
        }
        return this;
    }
    
    
If specified, AWS Elastic Beanstalk sets the specified configuration option to the requested value. The new value overrides the value obtained from the solution stack or the source configuration template.

Returns a reference to this object so that method calls can be chained together.

Parameters:
optionSettings If specified, AWS Elastic Beanstalk sets the specified configuration option to the requested value. The new value overrides the value obtained from the solution stack or the source configuration template.
Returns:
A reference to this updated object so that method calls can be chained together.
        if (optionSettings == null) {
            this. = null;
        } else {
            optionSettingsCopy.addAll(optionSettings);
            this. = optionSettingsCopy;
        }
        return this;
    }

    
Returns a string representation of this object; useful for testing and debugging.

Returns:
A string representation of this object.
See also:
java.lang.Object.toString()
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getApplicationName() != nullsb.append("ApplicationName: " + getApplicationName() + ",");
        if (getTemplateName() != nullsb.append("TemplateName: " + getTemplateName() + ",");
        if (getSolutionStackName() != nullsb.append("SolutionStackName: " + getSolutionStackName() + ",");
        if (getSourceConfiguration() != nullsb.append("SourceConfiguration: " + getSourceConfiguration() + ",");
        if (getEnvironmentId() != nullsb.append("EnvironmentId: " + getEnvironmentId() + ",");
        if (getDescription() != nullsb.append("Description: " + getDescription() + ",");
        if (getOptionSettings() != nullsb.append("OptionSettings: " + getOptionSettings() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getApplicationName() == null) ? 0 : getApplicationName().hashCode()); 
        hashCode = prime * hashCode + ((getTemplateName() == null) ? 0 : getTemplateName().hashCode()); 
        hashCode = prime * hashCode + ((getSolutionStackName() == null) ? 0 : getSolutionStackName().hashCode()); 
        hashCode = prime * hashCode + ((getSourceConfiguration() == null) ? 0 : getSourceConfiguration().hashCode()); 
        hashCode = prime * hashCode + ((getEnvironmentId() == null) ? 0 : getEnvironmentId().hashCode()); 
        hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); 
        hashCode = prime * hashCode + ((getOptionSettings() == null) ? 0 : getOptionSettings().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof CreateConfigurationTemplateRequest == falsereturn false;
        
        if (other.getApplicationName() == null ^ this.getApplicationName() == nullreturn false;
        if (other.getApplicationName() != null && other.getApplicationName().equals(this.getApplicationName()) == falsereturn false
        if (other.getTemplateName() == null ^ this.getTemplateName() == nullreturn false;
        if (other.getTemplateName() != null && other.getTemplateName().equals(this.getTemplateName()) == falsereturn false
        if (other.getSolutionStackName() == null ^ this.getSolutionStackName() == nullreturn false;
        if (other.getSolutionStackName() != null && other.getSolutionStackName().equals(this.getSolutionStackName()) == falsereturn false
        if (other.getSourceConfiguration() == null ^ this.getSourceConfiguration() == nullreturn false;
        if (other.getSourceConfiguration() != null && other.getSourceConfiguration().equals(this.getSourceConfiguration()) == falsereturn false
        if (other.getEnvironmentId() == null ^ this.getEnvironmentId() == nullreturn false;
        if (other.getEnvironmentId() != null && other.getEnvironmentId().equals(this.getEnvironmentId()) == falsereturn false
        if (other.getDescription() == null ^ this.getDescription() == nullreturn false;
        if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == falsereturn false
        if (other.getOptionSettings() == null ^ this.getOptionSettings() == nullreturn false;
        if (other.getOptionSettings() != null && other.getOptionSettings().equals(this.getOptionSettings()) == falsereturn false
        return true;
    }
    
    @Override
        
            return (CreateConfigurationTemplateRequestsuper.clone();
    }
}
    
New to GrepCode? Check out our FAQ X