Beispiel #1
0
    def describe_configuration_settings(self,
                                        application_name,
                                        environment_name=None,
                                        template=None,
                                        options=None):
        request = Request()
        request.set_operation('DescribeConfigurationSettings')
        request.set_app_name(application_name)
        if environment_name is not None:
            request.set_env_name(environment_name)
        if template is not None:
            request.set_template(template)
        if options is not None:
            request.set_options(options)

        try:
            response = self.call(request)
        except:
            raise

        result = response['DescribeConfigurationSettingsResponse']\
            ['DescribeConfigurationSettingsResult']['ConfigurationSettings'][0]
        request_id = response['DescribeConfigurationSettingsResponse']\
            ['ResponseMetadata']['RequestId']

        configuration = ConfigurationSettingsDescription.from_json(result)
        return Response(request_id, configuration)
Beispiel #2
0
    def describe_configuration_settings(self,
                                        application_name,
                                        environment_name=None,
                                        template=None,
                                        options=None):
        request = Request()
        request.set_operation('DescribeConfigurationSettings')
        request.set_app_name(application_name)
        if environment_name is not None:
            request.set_env_name(environment_name)
        if template is not None:
            request.set_template(template)
        if options is not None:
            request.set_options(options)

        try:
            response = self.call(request)
        except:
            raise

        result = response['DescribeConfigurationSettingsResponse']\
            ['DescribeConfigurationSettingsResult']['ConfigurationSettings'][0]
        request_id = response['DescribeConfigurationSettingsResponse']\
            ['ResponseMetadata']['RequestId']

        configuration = ConfigurationSettingsDescription.from_json(result)
        return Response(request_id, configuration)
Beispiel #3
0
    def create_configuration_template(self, application, template, 
                                      environment_id = None, solution_stack = None, 
                                      source_configuration = None,
                                      option_settings = None,
                                      option_remove = None,
                                      template_specification = None,
                                      description = None):
        request = Request()
        request.set_operation('CreateConfigurationTemplate')
        request.set_app_name(application)
        request.set_template(template)

        if environment_id is not None:
            request.set_env_id(environment_id)
        if solution_stack is not None:
            request.set_solution_stack(solution_stack)
        if source_configuration is not None:
            request.set_source_configuration(source_configuration)
        if option_settings is not None: 
            request.set_option_settings(option_settings)
        if option_remove is not None: 
            request.set_options_to_remove(option_remove)
        if template_specification is not None: 
            request.set_template_specification(template_specification)
        if description is not None: 
            request.set_description(description)
        
        response = self.call(request)

        result = response['CreateConfigurationTemplateResponse']['CreateConfigurationTemplateResult']
        request_id = response['CreateConfigurationTemplateResponse']\
            ['ResponseMetadata']['RequestId']
                
        configuration = ConfigurationSettingsDescription.from_json(result)
        return Response(request_id, configuration)
Beispiel #4
0
    def create_configuration_template(self, application, template, 
                                      environment_id = None, solution_stack = None, 
                                      source_configuration = None,
                                      option_settings = None,
                                      option_remove = None,
                                      template_specification = None,
                                      description = None):
        request = Request()
        request.set_operation(u'CreateConfigurationTemplate')
        request.set_app_name(application)
        request.set_template(template)

        if environment_id is not None:
            request.set_env_id(environment_id)
        if solution_stack is not None:
            request.set_solution_stack(solution_stack)
        if source_configuration is not None:
            request.set_source_configuration(source_configuration)
        if option_settings is not None: 
            request.set_option_settings(option_settings)
        if option_remove is not None: 
            request.set_options_to_remove(option_remove)
        if template_specification is not None: 
            request.set_template_specification(template_specification)
        if description is not None: 
            request.set_description(description)
        
        response = self.call(request)

        result = response[u'CreateConfigurationTemplateResponse'][u'CreateConfigurationTemplateResult']
        request_id = response[u'CreateConfigurationTemplateResponse']\
            [u'ResponseMetadata'][u'RequestId']
                
        configuration = ConfigurationSettingsDescription.from_json(result)
        return Response(request_id, configuration)
Beispiel #5
0
    def create_configuration_template(
        self,
        application,
        template,
        environment_id=None,
        solution_stack=None,
        source_configuration=None,
        option_settings=None,
        option_remove=None,
        template_specification=None,
        description=None,
    ):

        if (environment_id is None and solution_stack is None and source_configuration is None) or (
            environment_id is not None and source_configuration is not None
        ):
            raise AttributeError("Template source combination is invalid.")

        request = Request()
        request.set_operation("CreateConfigurationTemplate")
        request.set_app_name(application)
        request.set_template(template)

        if environment_id is not None:
            request.set_env_id(environment_id)
        if solution_stack is not None:
            request.set_solution_stack(solution_stack)
        if source_configuration is not None:
            request.set_source_configuration(source_configuration)
        if option_settings is not None:
            request.set_option_settings(option_settings)
        if option_remove is not None:
            request.set_options_to_remove(option_remove)
        if template_specification is not None:
            request.set_template_specification(template_specification)
        if description is not None:
            request.set_description(description)

        response = self.call(request)

        result = response["CreateConfigurationTemplateResponse"]["CreateConfigurationTemplateResult"]
        request_id = response["CreateConfigurationTemplateResponse"]["ResponseMetadata"]["RequestId"]

        configuration = ConfigurationSettingsDescription.from_json(result)
        return Response(request_id, configuration)