class Fog::AWS::ElasticBeanstalk::Real

Public Class Methods

new(options={}) click to toggle source
# File lib/fog/aws/beanstalk.rb, line 64
def initialize(options={})

  @use_iam_profile = options[:use_iam_profile]

  @connection_options = options[:connection_options] || {}
  options[:region] ||= 'us-east-1'
  @host = options[:host] || "elasticbeanstalk.#{options[:region]}.amazonaws.com"
  @path       = options[:path]        || '/'
  @persistent = options[:persistent]  || false
  @port       = options[:port]        || 443
  @scheme     = options[:scheme]      || 'https'
  @connection = Fog::XML::Connection.new("#{@scheme}://#{@host}:#{@port}#{@path}", @persistent, @connection_options)
  @instrumentor       = options[:instrumentor]
  @instrumentor_name  = options[:instrumentor_name] || 'fog.aws.beanstalk'

  @region = options[:region]
  setup_credentials(options)
end

Public Instance Methods

check_dns_availability(options) click to toggle source

Checks if the specified CNAME is available.

Options

  • CNAMEPrefix<~String>: The prefix used when this CNAME is reserved

Returns

  • response<~Excon::Response>:

See Also

docs.amazonwebservices.com/elasticbeanstalk/latest/api/API_CheckDNSAvailability.html

# File lib/fog/aws/requests/beanstalk/check_dns_availability.rb, line 17
def check_dns_availability(options)
  request({
              'Operation'    => 'CheckDNSAvailability',
              :parser     => Fog::Parsers::AWS::ElasticBeanstalk::CheckDNSAvailability.new
          }.merge(options))
end
create_application(options={}) click to toggle source

Creates an application that has one configuration template named default and no application versions.

Options

  • ApplicationName<~String>: The name of the application.

  • Description<~String>: Describes the application.

Returns

  • response<~Excon::Response>:

See Also

docs.amazonwebservices.com/elasticbeanstalk/latest/api/API_CreateApplication.html

# File lib/fog/aws/requests/beanstalk/create_application.rb, line 19
def create_application(options={})
  request({
              'Operation'    => 'CreateApplication',
              :parser     => Fog::Parsers::AWS::ElasticBeanstalk::CreateApplication.new
          }.merge(options))
end
create_application_version(options={}) click to toggle source

Creates an application version for the specified application.

Options

  • ApplicationName<~String>: The name of the application. If no application is found with this name, and AutoCreateApplication is false, returns an InvalidParameterValue error.

  • AutoCreateApplication<~Boolean>: If true, create the application if it doesn't exist.

  • Description<~String>: Describes this version.

  • SourceBundle<~Hash>: The Amazon S3 bucket and key that identify the location of the source bundle

    for this version.  Use keys 'S3Bucket' and 'S3Key' to describe location.
  • VersionLabel<~String>: A label identifying this version.

Returns

  • response<~Excon::Response>:

See Also

docs.amazonwebservices.com/elasticbeanstalk/latest/api/API_CreateApplicationVersion.html

# File lib/fog/aws/requests/beanstalk/create_application_version.rb, line 24
def create_application_version(options={})
  if source_bundle = options.delete('SourceBundle')
    # flatten hash
    options.merge!({
                       'SourceBundle.S3Bucket' => source_bundle['S3Bucket'],
                       'SourceBundle.S3Key' => source_bundle['S3Key']
                   })
  end
  request({
              'Operation'    => 'CreateApplicationVersion',
              :parser     => Fog::Parsers::AWS::ElasticBeanstalk::CreateApplicationVersion.new
          }.merge(options))
end
create_configuration_template(options={}) click to toggle source

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.

Options

  • ApplicationName<~String>: 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.

  • Description<~String>: Describes this configuration.

  • EnvironmentId<~String>: The ID of the environment used with this configuration template.

  • OptionSettings<~Hash>: 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.
  • SolutionStackName<~String>: 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.
  • SourceConfiguration<~String>: If specified, AWS Elastic Beanstalk uses the configuration values from the

    specified configuration template to create a new configuration.
  • TemplateName<~String>: The name of the configuration template.

Returns

  • response<~Excon::Response>:

See Also

docs.amazonwebservices.com/elasticbeanstalk/latest/api/API_CreateConfigurationTemplate.html

# File lib/fog/aws/requests/beanstalk/create_configuration_template.rb, line 31
def create_configuration_template(options={})
  if option_settings = options.delete('OptionSettings')
    options.merge!(AWS.indexed_param('OptionSettings.member.%d', [*option_settings]))
  end
  if option_settings = options.delete('SourceConfiguration')
    options.merge!(AWS.serialize_keys('SourceConfiguration', option_settings))
  end
  request({
              'Operation'    => 'CreateConfigurationTemplate',
              :parser     => Fog::Parsers::AWS::ElasticBeanstalk::CreateConfigurationTemplate.new
          }.merge(options))
end
create_environment(options={}) click to toggle source

Launches an environment for the specified application using the specified configuration.

Options

  • ApplicationName<~String>: If specified, AWS Elastic Beanstalk restricts the returned descriptions

    to include only those that are associated with this application.
  • CNAMEPrefix<~String>: If specified, the environment attempts to use this value as the prefix for the CNAME.

    If not specified, the environment uses the environment name.
  • Description<~String>: Describes this environment.

  • EnvironmentName<~String>: A unique name for the deployment environment. Used in the application URL.

  • OptionSettings<~Array>: If specified, AWS Elastic Beanstalk sets the specified configuration options to

    the requested value in the configuration set for the new environment. These override the values obtained
    from the solution stack or the configuration template.
  • OptionsToRemove<~Array>: A list of custom user-defined configuration options to remove from the

    configuration set for this new environment.
  • SolutionStackName<~String>: This is an alternative to specifying a configuration name. If specified,

    AWS Elastic Beanstalk sets the configuration values to the default values associated with the
    specified solution stack.
  • TemplateName<~String>: The name of the configuration template to use in deployment. If no configuration

    template is found with this name, AWS Elastic Beanstalk returns an InvalidParameterValue error.
  • VersionLabel<~String>: The name of the application version to deploy.

Returns

  • response<~Excon::Response>:

See Also

docs.amazonwebservices.com/elasticbeanstalk/latest/api/API_CreateEnvironment.html

# File lib/fog/aws/requests/beanstalk/create_environment.rb, line 34
def create_environment(options={})
  if option_settings = options.delete('OptionSettings')
    options.merge!(AWS.indexed_param('OptionSettings.member.%d', [*option_settings]))
  end
  if options_to_remove = options.delete('OptionsToRemove')
    options.merge!(AWS.indexed_param('OptionsToRemove.member.%d', [*options_to_remove]))
  end
  request({
              'Operation'    => 'CreateEnvironment',
              :parser     => Fog::Parsers::AWS::ElasticBeanstalk::CreateEnvironment.new
          }.merge(options))
end
create_storage_location() click to toggle source

Creates the Amazon S3 storage location for the account.

Options

Returns

  • response<~Excon::Response>:

See Also

docs.amazonwebservices.com/elasticbeanstalk/latest/api/API_CreateStorageLocation.html

# File lib/fog/aws/requests/beanstalk/create_storage_location.rb, line 17
def create_storage_location()
  request({
              'Operation'    => 'CreateStorageLocation',
              :parser     => Fog::Parsers::AWS::ElasticBeanstalk::CreateStorageLocation.new
          })
end
delete_application(application_name) click to toggle source

Deletes the specified application along with all associated versions and configurations.

Options

  • application_name<~String>: The name of the application to delete.

Returns

  • response<~Excon::Response>:

See Also

docs.amazonwebservices.com/elasticbeanstalk/latest/api/API_DeleteApplication.html

# File lib/fog/aws/requests/beanstalk/delete_application.rb, line 18
def delete_application(application_name)
  options = { 'ApplicationName' => application_name }
  request({
              'Operation'    => 'DeleteApplication',
              :parser     => Fog::Parsers::AWS::ElasticBeanstalk::Empty.new
          }.merge(options))
end
delete_application_version(application_name, version_label, delete_source_bundle = nil) click to toggle source

Deletes the specified version from the specified application.

Options

  • application_name<~String>: The name of the application to delete releases from.

  • version_label<~String>: The label of the version to delete.

  • delete_source_bundle<~Boolean>: Indicates whether to delete the associated source bundle from Amazon S3.

Returns

  • response<~Excon::Response>:

See Also

docs.amazonwebservices.com/elasticbeanstalk/latest/api/API_DeleteApplication.html

# File lib/fog/aws/requests/beanstalk/delete_application_version.rb, line 20
def delete_application_version(application_name, version_label, delete_source_bundle = nil)
  options = {
      'ApplicationName' => application_name,
      'VersionLabel' => version_label
  }
  options['DeleteSourceBundle'] = delete_source_bundle unless delete_source_bundle.nil?

  request({
              'Operation'    => 'DeleteApplicationVersion',
              :parser     => Fog::Parsers::AWS::ElasticBeanstalk::Empty.new
          }.merge(options))
end
delete_configuration_template(application_name, template_name) click to toggle source

Deletes the specified configuration template.

Options

  • application_name<~String>: The name of the application to delete the configuration template from.

  • template_name<~String>: The name of the configuration template to delete.

Returns

  • response<~Excon::Response>:

See Also

docs.amazonwebservices.com/elasticbeanstalk/latest/api/API_DeleteConfigurationTemplate.html

# File lib/fog/aws/requests/beanstalk/delete_configuration_template.rb, line 19
def delete_configuration_template(application_name, template_name)
  options = {
      'ApplicationName' => application_name,
      'TemplateName' => template_name
  }

  request({
              'Operation'    => 'DeleteConfigurationTemplate',
              :parser     => Fog::Parsers::AWS::ElasticBeanstalk::Empty.new
          }.merge(options))
end
delete_environment_configuration(application_name, environment_name) click to toggle source

Deletes the draft configuration associated with the running environment.

Options

  • application_name<~String>: The name of the application the environment is associated with.

  • environment_name<~String>: The name of the environment to delete the draft configuration from.

Returns

  • response<~Excon::Response>:

See Also

docs.amazonwebservices.com/elasticbeanstalk/latest/api/API_DeleteConfigurationTemplate.html

# File lib/fog/aws/requests/beanstalk/delete_environment_configuration.rb, line 19
def delete_environment_configuration(application_name, environment_name)
  options = {
      'ApplicationName' => application_name,
      'EnvironmentName' => environment_name
  }

  request({
              'Operation'    => 'DeleteEnvironmentConfiguration',
              :parser     => Fog::Parsers::AWS::ElasticBeanstalk::Empty.new
          }.merge(options))
end
describe_application_versions(options={}) click to toggle source

Returns descriptions for existing application versions.

Options

  • ApplicationName<~String>: If specified, AWS Elastic Beanstalk restricts the returned descriptions to

    only include ones that are associated with the specified application.
  • VersionLabels<~Array>: If specified, restricts the returned descriptions to only include ones that have

    the specified version labels.

Returns

  • response<~Excon::Response>:

See Also

docs.amazonwebservices.com/elasticbeanstalk/latest/api/API_DescribeApplicationVersions.html

# File lib/fog/aws/requests/beanstalk/describe_application_versions.rb, line 21
def describe_application_versions(options={})
  if version_labels = options.delete('VersionLabels')
    options.merge!(AWS.indexed_param('VersionLabels.member.%d', [*version_labels]))
  end
  request({
              'Operation'    => 'DescribeApplicationVersions',
              :parser     => Fog::Parsers::AWS::ElasticBeanstalk::DescribeApplicationVersions.new
          }.merge(options))
end
describe_applications(application_names=[]) click to toggle source

Returns the descriptions of existing applications.

Options

  • application_names<~Array>: If specified, AWS Elastic Beanstalk restricts the returned descriptions

    to only include those with the specified names.

Returns

  • response<~Excon::Response>:

See Also

docs.amazonwebservices.com/elasticbeanstalk/latest/api/API_DescribeApplications.html

# File lib/fog/aws/requests/beanstalk/describe_applications.rb, line 18
def describe_applications(application_names=[])
  options = {}
  options.merge!(AWS.indexed_param('ApplicationNames.member.%d', [*application_names]))
  request({
              'Operation'    => 'DescribeApplications',
              :parser     => Fog::Parsers::AWS::ElasticBeanstalk::DescribeApplications.new
          }.merge(options))
end
describe_configuration_options(options={}) click to toggle source

Describes the configuration options that are used in a particular configuration template or environment, or that a specified solution stack defines. The description includes the values the options, their default values, and an indication of the required action on a running environment if an option value is changed.

Options

  • ApplicationName<~String>: The name of the application associated with the configuration template or environment. Only needed if you want to describe the configuration options associated with either the configuration template or environment.

  • EnvironmentName<~String>: The name of the environment whose configuration options you want to describe.

  • Options<~Array>: If specified, restricts the descriptions to only the specified options.

  • SolutionStackName<~String>: The name of the solution stack whose configuration options you want to describe.

  • TemplateName<~String>: The name of the configuration template whose configuration options you want to describe.

Returns

  • response<~Excon::Response>:

See Also

docs.amazonwebservices.com/elasticbeanstalk/latest/api/API_DescribeConfigurationOptions.html

# File lib/fog/aws/requests/beanstalk/describe_configuration_options.rb, line 27
def describe_configuration_options(options={})
  if option_filters = options.delete('Options')
    options.merge!(AWS.indexed_param('Options.member.%d', [*option_filters]))
  end
  request({
              'Operation'    => 'DescribeConfigurationOptions',
              :parser     => Fog::Parsers::AWS::ElasticBeanstalk::DescribeConfigurationOptions.new
          }.merge(options))
end
describe_configuration_settings(options={}) click to toggle source

Returns a description of the settings for the specified configuration set, that is, either a configuration template or the configuration set associated with a running environment.

Options

  • ApplicationName<~String>: The application for the environment or configuration template.

  • EnvironmentName<~String>: The name of the environment to describe.

  • TemplateName<~String>: The name of the configuration template to describe.

Returns

  • response<~Excon::Response>:

See Also

docs.amazonwebservices.com/elasticbeanstalk/latest/api/API_DescribeConfigurationSettings.html

# File lib/fog/aws/requests/beanstalk/describe_configuration_settings.rb, line 21
def describe_configuration_settings(options={})
  request({
              'Operation'    => 'DescribeConfigurationSettings',
              :parser     => Fog::Parsers::AWS::ElasticBeanstalk::DescribeConfigurationSettings.new
          }.merge(options))
end
describe_environment_resources(options={}) click to toggle source

Returns AWS resources for this environment.

Options

  • EnvironmentId

  • EnvironmentName

Returns

  • response<~Excon::Response>:

See Also

docs.amazonwebservices.com/elasticbeanstalk/latest/api/API_DescribeEnvironmentResources.html

# File lib/fog/aws/requests/beanstalk/describe_environment_resources.rb, line 19
def describe_environment_resources(options={})
  request({
              'Operation'    => 'DescribeEnvironmentResources',
              :parser     => Fog::Parsers::AWS::ElasticBeanstalk::DescribeEnvironmentResources.new
          }.merge(options))
end
describe_environments(options={}) click to toggle source

Returns descriptions for existing environments.

Options

  • ApplicationName<~String>: If specified, AWS Elastic Beanstalk restricts the returned descriptions to include only those that are associated with this application.

  • EnvironmentIds

  • EnvironmentNames

  • IncludeDeleted

  • IncludedDeletedBackTo

  • VersionLabel<~String>:

Returns

  • response<~Excon::Response>:

See Also

docs.amazonwebservices.com/elasticbeanstalk/latest/api/API_DescribeEnvironments.html

# File lib/fog/aws/requests/beanstalk/describe_environments.rb, line 24
def describe_environments(options={})
  if environment_ids = options.delete('EnvironmentIds')
    options.merge!(AWS.indexed_param('EnvironmentIds.member.%d', [*environment_ids]))
  end
  if environment_names = options.delete('EnvironmentNames')
    options.merge!(AWS.indexed_param('EnvironmentNames.member.%d', [*environment_names]))
  end
  request({
              'Operation'    => 'DescribeEnvironments',
              :parser     => Fog::Parsers::AWS::ElasticBeanstalk::DescribeEnvironments.new
          }.merge(options))
end
describe_events(options={}) click to toggle source

Returns list of event descriptions matching criteria up to the last 6 weeks.

Options

  • ApplicationName<~String>: If specified, AWS Elastic Beanstalk restricts the returned descriptions to include only those that are associated with this application.

Returns

  • response<~Excon::Response>:

See Also

docs.amazonwebservices.com/elasticbeanstalk/latest/api/API_DescribeEnvironments.html

# File lib/fog/aws/requests/beanstalk/describe_events.rb, line 19
def describe_events(options={})
  request({
              'Operation'    => 'DescribeEvents',
              :parser     => Fog::Parsers::AWS::ElasticBeanstalk::DescribeEvents.new
          }.merge(options))
end
list_available_solution_stacks() click to toggle source

Checks if the specified CNAME is available.

Options

Returns

  • response<~Excon::Response>:

See Also

docs.amazonwebservices.com/elasticbeanstalk/latest/api/API_CheckDNSAvailability.html

# File lib/fog/aws/requests/beanstalk/list_available_solution_stacks.rb, line 17
def list_available_solution_stacks()
  request({
              'Operation'    => 'ListAvailableSolutionStacks',
              :parser     => Fog::Parsers::AWS::ElasticBeanstalk::ListAvailableSolutionStacks.new
          })
end
rebuild_environment(options={}) click to toggle source

Deletes and recreates all of the AWS resources (for example: the Auto Scaling group, load balancer, etc.) for a specified environment and forces a restart.

Options

  • EnvironmentId

  • EnvironmentName

Returns

  • response<~Excon::Response>:

See Also

docs.amazonwebservices.com/elasticbeanstalk/latest/api/API_RebuildEnvironment.html

# File lib/fog/aws/requests/beanstalk/rebuild_environment.rb, line 20
def rebuild_environment(options={})
  request({
              'Operation'    => 'RebuildEnvironment',
              :parser     => Fog::Parsers::AWS::ElasticBeanstalk::Empty.new
          }.merge(options))
end
reload() click to toggle source
# File lib/fog/aws/beanstalk.rb, line 83
def reload
  @connection.reset
end
request_environment_info(options={}) click to toggle source

Returns AWS resources for this environment.

Options

  • EnvironmentId

  • EnvironmentName

Returns

  • response<~Excon::Response>:

See Also

docs.amazonwebservices.com/elasticbeanstalk/latest/api/API_RequestEnvironmentInfo.html

# File lib/fog/aws/requests/beanstalk/request_environment_info.rb, line 19
def request_environment_info(options={})
  request({
              'Operation'    => 'RequestEnvironmentInfo',
              :parser     => Fog::Parsers::AWS::ElasticBeanstalk::Empty.new
          }.merge(options))
end
restart_app_server(options={}) click to toggle source

Returns AWS resources for this environment.

Options

  • EnvironmentId

  • EnvironmentName

Returns

  • response<~Excon::Response>:

See Also

docs.amazonwebservices.com/elasticbeanstalk/latest/api/API_RestartAppServer.html

# File lib/fog/aws/requests/beanstalk/restart_app_server.rb, line 19
def restart_app_server(options={})
  request({
              'Operation'    => 'RestartAppServer',
              :parser     => Fog::Parsers::AWS::ElasticBeanstalk::Empty.new
          }.merge(options))
end
retrieve_environment_info(options={}) click to toggle source

Returns AWS resources for this environment.

Options

  • EnvironmentId

  • EnvironmentName

Returns

  • response<~Excon::Response>:

See Also

docs.amazonwebservices.com/elasticbeanstalk/latest/api/API_RetrieveEnvironmentInfo.html

# File lib/fog/aws/requests/beanstalk/retrieve_environment_info.rb, line 19
def retrieve_environment_info(options={})
  request({
              'Operation'    => 'RetrieveEnvironmentInfo',
              :parser     => Fog::Parsers::AWS::ElasticBeanstalk::RetrieveEnvironmentInfo.new
          }.merge(options))
end
solution_stacks() click to toggle source

Returns an array of available solutions stack details

# File lib/fog/aws/beanstalk.rb, line 88
def solution_stacks
  list_available_solution_stacks.body['ListAvailableSolutionStacksResult']['SolutionStackDetails']
end
swap_environment_cnames(options={}) click to toggle source

Swaps the CNAMEs of two environments.

Options

  • EnvironmentId

  • EnvironmentName

Returns

  • response<~Excon::Response>:

See Also

docs.amazonwebservices.com/elasticbeanstalk/latest/api/API_SwapEnvironmentCNAMEs.html

# File lib/fog/aws/requests/beanstalk/swap_environment_cnames.rb, line 19
def swap_environment_cnames(options={})
  request({
              'Operation'    => 'SwapEnvironmentCNAMEs',
              :parser     => Fog::Parsers::AWS::ElasticBeanstalk::Empty.new
          }.merge(options))
end
terminate_environment(options={}) click to toggle source

Terminates the specified environment.

Options

  • EnvironmentId<~String>: The ID of the environment to terminate.

  • EnvironmentName<~String>: The name of the environment to terminate.

  • TerminateResources<~Boolean>: Indicates whether the associated AWS resources should shut down when the

    environment is terminated
    

Returns

  • response<~Excon::Response>:

See Also

docs.amazonwebservices.com/elasticbeanstalk/latest/api/API_TerminateEnvironment.html

# File lib/fog/aws/requests/beanstalk/terminate_environment.rb, line 21
def terminate_environment(options={})
  request({
              'Operation'    => 'TerminateEnvironment',
              :parser     => Fog::Parsers::AWS::ElasticBeanstalk::TerminateEnvironment.new
          }.merge(options))
end
update_application(options) click to toggle source

Updates the specified application to have the specified properties.

Options

  • ApplicationName<~String>: The name of the application to update. If no such application is found, UpdateApplication returns an InvalidParameterValue error.

  • Description<~String>: A new description for the application.

Returns

  • response<~Excon::Response>:

See Also

docs.amazonwebservices.com/elasticbeanstalk/latest/api/API_UpdateApplication.html

# File lib/fog/aws/requests/beanstalk/update_application.rb, line 20
def update_application(options)
  request({
              'Operation'    => 'UpdateApplication',
              :parser     => Fog::Parsers::AWS::ElasticBeanstalk::UpdateApplication.new
          }.merge(options))
end
update_application_version(options) click to toggle source

Updates the specified application version to have the specified properties.

Options

  • ApplicationName<~String>: The name of the application associated with this version.

  • VersionLabel<~String>: The name of the version to update.

  • Description<~String>: A new description for this release.

Returns

  • response<~Excon::Response>:

See Also

docs.amazonwebservices.com/elasticbeanstalk/latest/api/API_UpdateApplicationVersion.html

# File lib/fog/aws/requests/beanstalk/update_application_version.rb, line 20
def update_application_version(options)
  request({
              'Operation'    => 'UpdateApplicationVersion',
              :parser     => Fog::Parsers::AWS::ElasticBeanstalk::UpdateApplicationVersion.new
          }.merge(options))
end
update_configuration_template(options={}) click to toggle source

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

Options

  • ApplicationName<~String>: If specified, AWS Elastic Beanstalk restricts the returned descriptions to include only those that are associated with this application.

  • VersionLabel<~String>:

Returns

  • response<~Excon::Response>:

See Also

docs.amazonwebservices.com/elasticbeanstalk/latest/api/API_CreateConfigurationTemplate.html

# File lib/fog/aws/requests/beanstalk/update_configuration_template.rb, line 20
def update_configuration_template(options={})
  if option_settings = options.delete('OptionSettings')
    options.merge!(AWS.indexed_param('OptionSettings.member.%d', [*option_settings]))
  end
  if options_to_remove = options.delete('OptionsToRemove')
    options.merge!(AWS.indexed_param('OptionsToRemove.member.%d', [*options_to_remove]))
  end
  request({
              'Operation'    => 'UpdateConfigurationTemplate',
              :parser     => Fog::Parsers::AWS::ElasticBeanstalk::UpdateConfigurationTemplate.new
          }.merge(options))
end
update_environment(options={}) click to toggle source

Updates the environment description, deploys a new application version, updates the configuration settings to an entirely new configuration template, or updates select configuration option values in the running environment.

Options

  • ApplicationName<~String>: If specified, AWS Elastic Beanstalk restricts the returned descriptions to include only those that are associated with this application.

  • EnvironmentIds

  • EnvironmentNames

  • IncludeDeleted

  • IncludedDeletedBackTo

  • VersionLabel<~String>:

Returns

  • response<~Excon::Response>:

See Also

docs.amazonwebservices.com/elasticbeanstalk/latest/api/API_CreateEnvironment.html

# File lib/fog/aws/requests/beanstalk/update_environment.rb, line 26
def update_environment(options={})
  if option_settings = options.delete('OptionSettings')
    options.merge!(AWS.indexed_param('OptionSettings.member.%d', [*option_settings]))
  end
  if options_to_remove = options.delete('OptionsToRemove')
    options.merge!(AWS.indexed_param('OptionsToRemove.member.%d', [*options_to_remove]))
  end
  request({
              'Operation'    => 'UpdateEnvironment',
              :parser     => Fog::Parsers::AWS::ElasticBeanstalk::UpdateEnvironment.new
          }.merge(options))
end
validate_configuration_settings(options={}) click to toggle source

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

Options

  • ApplicationName<~String>: If specified, AWS Elastic Beanstalk restricts the returned descriptions to include only those that are associated with this application.

  • VersionLabel<~String>:

Returns

  • response<~Excon::Response>:

See Also

docs.amazonwebservices.com/elasticbeanstalk/latest/api/API_CreateConfigurationTemplate.html

# File lib/fog/aws/requests/beanstalk/validate_configuration_settings.rb, line 20
def validate_configuration_settings(options={})
  if option_settings = options.delete('OptionSettings')
    options.merge!(AWS.indexed_param('OptionSettings.member.%d', [*option_settings]))
  end
  request({
              'Operation'    => 'ValidateConfigurationSettings',
              :parser     => Fog::Parsers::AWS::ElasticBeanstalk::ValidateConfigurationSettings.new
          }.merge(options))
end

Private Instance Methods

_request(body, headers, idempotent, parser) click to toggle source
# File lib/fog/aws/beanstalk.rb, line 132
def _request(body, headers, idempotent, parser)
  @connection.request({
      :body       => body,
      :expects    => 200,
      :headers    => headers,
      :idempotent => idempotent,
      :method     => 'POST',
      :parser     => parser
  })
rescue Excon::Errors::HTTPStatusError => error
  match = Fog::AWS::Errors.match_error(error)
  raise if match.empty?
  raise case match[:code]
        when 'InvalidParameterValue'
          Fog::AWS::ElasticBeanstalk::InvalidParameterError.slurp(error, match[:message])
        else
          Fog::AWS::ElasticBeanstalk::Error.slurp(error, "#{match[:code]} => #{match[:message]}")
        end
end
request(params) click to toggle source
# File lib/fog/aws/beanstalk.rb, line 103
def request(params)
  refresh_credentials_if_expired

  idempotent  = params.delete(:idempotent)
  parser      = params.delete(:parser)

  body, headers = AWS.signed_params_v4(
      params,
      { 'Content-Type' => 'application/x-www-form-urlencoded' },
      {
          :signer             => @signer,
          :aws_session_token  => @aws_session_token,
          :method             => "POST",
          :host               => @host,
          :path               => @path,
          :port               => @port,
          :version            => '2010-12-01'
      }
  )

  if @instrumentor
    @instrumentor.instrument("#{@instrumentor_name}.request", params) do
      _request(body, headers, idempotent, parser)
    end
  else
    _request(body, headers, idempotent, parser)
  end
end
setup_credentials(options) click to toggle source
# File lib/fog/aws/beanstalk.rb, line 94
def setup_credentials(options)
  @aws_access_key_id      = options[:aws_access_key_id]
  @aws_secret_access_key  = options[:aws_secret_access_key]
  @aws_session_token      = options[:aws_session_token]
  @aws_credentials_expire_at = options[:aws_credentials_expire_at]

  @signer = Fog::AWS::SignatureV4.new( @aws_access_key_id, @aws_secret_access_key, @region, 'elasticbeanstalk')
end