o
    rMf                     @   s  d Z ddlZddlZddlmZ ddlmZmZmZ ddlm	Z	 ddl
mZ ddlmZ ddlmZ dd	lmZ dd
lmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddl m!Z! e "di Z#dd Z$dd Z%G dd deZ&dS )z\
This module provides an interface to the Elastic Compute Cloud (EC2)
Auto Scaling service.
    N)AWSQueryConnection)
RegionInfoget_regionsload_regions)connect)Request)LaunchConfiguration)AutoScalingGroup)ProcessType)Activity)AdjustmentType)MetricCollectionTypes)ScalingPolicy)TerminationPolicies)Instance)ScheduledUpdateGroupAction)Tag)AccountLimits)sixautoscalingc                   C   s   t dtdS )z
    Get all available regions for the Auto Scaling service.

    :rtype: list
    :return: A list of :class:`boto.RegionInfo` instances
    r   )connection_cls)r   AutoScaleConnection r   r   ]/var/www/html/analyze/labelStudio/lib/python3.10/site-packages/boto/ec2/autoscale/__init__.pyregions6   s   r   c                 K   s   t d| fdti|S )aF  
    Given a valid region name, return a
    :class:`boto.ec2.autoscale.AutoScaleConnection`.

    :param str region_name: The name of the region to connect to.

    :rtype: :class:`boto.ec2.AutoScaleConnection` or ``None``
    :return: A connection to the given region, or None if an invalid region
        name is given
    r   r   )r   r   )region_name	kw_paramsr   r   r   connect_to_region@   s
   
r   c                       s  e Zd ZejdddZejdddZejdddZ			
			dY fdd	Z	dd Z
dd Zdd Zdd ZdZddZdd Zd[ddZdd Zdd  Zd!d" Zd#d$ Zd\d%d&Zd'd( Z		d\d)d*Zd+d, Z	d]d-d.ZdZd/d0Zd]d1d2Zd3d4 Z		d\d5d6Zd7d8 Z		d^d9d:Zd;d< Z d]d=d>Z!d]d?d@Z"					d_dAdBZ#			d`dCdDZ$d]dEdFZ%d]dGdHZ&dadIdJZ'dKdL Z(dMdN Z)		dZdOdPZ*d[dQdRZ+d\dSdTZ,dUdV Z-dWdX Z.  Z/S )br   Botoautoscale_versionz
2011-01-01autoscale_endpointz#autoscaling.us-east-1.amazonaws.comautoscale_region_namez	us-east-1NTr   /Fc                    sX   |st | | j| jt}|| _|| _tt| j||||||||| jj|	|
||||d dS )z
        Init method to create a new connection to the AutoScaling service.

        B{Note:} The host argument is overridden by the host specified in the
                 boto configuration file.


        )pathsecurity_tokenvalidate_certsprofile_nameN)	r   DefaultRegionNameDefaultRegionEndpointr   regionuse_block_device_typessuper__init__endpoint)selfaws_access_key_idaws_secret_access_key	is_secureportproxy
proxy_port
proxy_user
proxy_passdebughttps_connection_factoryr)   r#   r$   r%   r&   r*   	__class__r   r   r,   V   s"   
zAutoScaleConnection.__init__c                 C   s   dgS )Nzhmac-v4r   r.   r   r   r   _required_auth_capabilityt   s   z-AutoScaleConnection._required_auth_capabilityc           	   
   C   s   t dt|d D ]S}t||d  trFt||d  D ]'\}}t|tr;t|D ]\}}||d||||f < q+q||d|||f < qq	t||d  tjr\||d  |d||f < q	dS )aH  
        Items is a list of dictionaries or strings::

            [
                {
                    'Protocol' : 'HTTP',
                    'LoadBalancerPort' : '80',
                    'InstancePort' : '80'
                },
                ..
            ] etc.

        or::

            ['us-east-1b',...]
           z%s.member.%d.%s.%sz%s.member.%d.%sz%s.member.%dN)rangelen
isinstancedictr   	iteritemsstring_types)	r.   paramsitemslabelikvkkvvr   r   r   build_list_paramsw   s   
z%AutoScaleConnection.build_list_paramsc                 C   s  |j |j|j|jd}|j}| ||d |jd ur|j|d< |jr'|j|d< |jr/|j|d< |j	r7|j	|d< |j
r?|j
|d< |jrG|j|d< |jrO|j|d	< |jrZ| ||jd
 |dr|jrj| ||jd |jrt|jD ]\}}|||d  qr| ||tS )N)AutoScalingGroupNameLaunchConfigurationNameMinSizeMaxSizeAvailabilityZonesDesiredCapacityVPCZoneIdentifierHealthCheckGracePeriodHealthCheckTypeDefaultCooldownPlacementGroup
InstanceIdr   CreateLoadBalancerNamesr=   )namelaunch_config_namemin_sizemax_sizeavailability_zonesrL   desired_capacityvpc_zone_identifierhealth_check_periodhealth_check_typedefault_cooldownplacement_groupinstance_idtermination_policies
startswithload_balancerstags	enumeratebuild_params
get_objectr   )r.   opas_grouprD   zonesrG   tagr   r   r   _update_group   sD   










z!AutoScaleConnection._update_groupc                 C   s"   d|i}|  ||d | d|S )z;
        Attach instances to an autoscaling group.
        rM   InstanceIdsAttachInstancesrL   
get_status)r.   r[   instance_idsrD   r   r   r   attach_instances   s   z$AutoScaleConnection.attach_instancesc                 C   s2   d|i}|rdnd|d< |  ||d | d|S )a  
        Detach instances from an Auto Scaling group.

        :type name: str
        :param name: The name of the Auto Scaling group from which to detach instances.

        :type instance_ids: list
        :param instance_ids: Instance ids to be detached from the Auto Scaling group.

        :type decrement_capacity: bool
        :param decrement_capacity: Whether to decrement the size of the
            Auto Scaling group or not.
        rM   truefalseShouldDecrementDesiredCapacityrs   DetachInstancesru   )r.   r[   rw   decrement_capacityrD   r   r   r   detach_instances   s   z$AutoScaleConnection.detach_instancesc                 C   s   |  d|S )z,
        Create auto scaling group.
        CreateAutoScalingGroup)rr   )r.   ro   r   r   r   create_auto_scaling_group   s   z-AutoScaleConnection.create_auto_scaling_groupc                 C   s&   |r|dd}nd|i}|  d|tS )z
        Deletes the specified auto scaling group if the group has no instances
        and no scaling activities in progress.
        ry   )rM   ForceDeleterM   DeleteAutoScalingGrouprm   r   )r.   r[   force_deleterD   r   r   r   delete_auto_scaling_group   s   z-AutoScaleConnection.delete_auto_scaling_groupc                    s  |j |j|jd |jr|j d< |jr,|j}t|tjr"|d}t	
|d d< |jr4|j d< |jr<|j d< |jrI fdd|jD  |jrT|  |jd	 |jr\d
 d< nd d< |jdurlt|j d< |jdurv|j d< |jr~d
 d< nd d< |jdu rd
 d< n	|jdu rd d< |jr|j d< |jrd
 d< nd d< |jr|j d< |jr|j d< |jr|  |jd | jd tddS )z
        Creates a new Launch Configuration.

        :type launch_config: :class:`boto.ec2.autoscale.launchconfig.LaunchConfiguration`
        :param launch_config: LaunchConfiguration object.
        )ImageIdrN   InstanceTypeKeyNamezutf-8UserDataKernelId	RamdiskIdc                    s   g | ]}|  qS r   )autoscale_build_list_params).0xrD   r   r   
<listcomp>   s    zCAutoScaleConnection.create_launch_configuration.<locals>.<listcomp>SecurityGroupsry   zInstanceMonitoring.Enabledrz   N	SpotPriceIamInstanceProfileEbsOptimizedTAssociatePublicIpAddressF
VolumeTypeDeleteOnTerminationIopsClassicLinkVPCIdClassicLinkVPCSecurityGroupsCreateLaunchConfigurationPOSTverb)image_idr[   instance_typekey_name	user_datar@   r   	text_typeencodebase64	b64encodedecode	kernel_id
ramdisk_idblock_device_mappingssecurity_groupsrL   instance_monitoring
spot_pricestrinstance_profile_nameebs_optimizedassociate_public_ip_addressvolume_typedelete_on_terminationiopsclassic_link_vpc_id classic_link_vpc_security_groupsrm   r   )r.   launch_configr   r   r   r   create_launch_configuration   sj   
















z/AutoScaleConnection.create_launch_configurationc                 C   s   i }|  d|tS )zs
        Returns the limits for the Auto Scaling resources currently granted for
        your AWS account.
        DescribeAccountLimits)rm   r   )r.   rD   r   r   r   get_account_limits%  s   z&AutoScaleConnection.get_account_limitsc                 C   sV   |j |j|j|jd}|j dkr|jdur|j|d< |jdur$|j|d< | d|tS )z
        Creates a new Scaling Policy.

        :type scaling_policy: :class:`boto.ec2.autoscale.policy.ScalingPolicy`
        :param scaling_policy: ScalingPolicy object.
        )r   rM   
PolicyNameScalingAdjustmentPercentChangeInCapacityNMinAdjustmentStepCooldownPutScalingPolicy)adjustment_typeas_namer[   scaling_adjustmentmin_adjustment_stepcooldownrm   r   )r.   scaling_policyrD   r   r   r   create_scaling_policy-  s   




z)AutoScaleConnection.create_scaling_policyc                 C   s   d|i}|  d|tS )z
        Deletes the specified LaunchConfiguration.

        The specified launch configuration must not be attached to an Auto
        Scaling group. Once this call completes, the launch configuration is no
        longer available for use.
        rN   DeleteLaunchConfigurationr   )r.   r\   rD   r   r   r   delete_launch_configurationB  s   z/AutoScaleConnection.delete_launch_configurationc                 C   sB   i }|r||d< |r||d< |r|  ||d | d|dtfgS )a.  
        Returns a full description of each Auto Scaling group in the given
        list. This includes all Amazon EC2 instances that are members of the
        group. If a list of names is not provided, the service returns the full
        details of all Auto Scaling groups.

        This action supports pagination by returning a token if there are more
        pages to retrieve. To get the next page, call this action again with
        the returned token as the NextToken parameter.

        :type names: list
        :param names: List of group names which should be searched for.

        :type max_records: int
        :param max_records: Maximum amount of groups to return.

        :rtype: list
        :returns: List of :class:`boto.ec2.autoscale.group.AutoScalingGroup`
            instances.
        
MaxRecords	NextTokenAutoScalingGroupNamesDescribeAutoScalingGroupsmember)rL   get_listr	   )r.   namesmax_records
next_tokenrD   r   r   r   get_all_groupsM  s   z"AutoScaleConnection.get_all_groupsc                 K   sh   i }| dd}| dd}|dur||d< |r| ||d | d}|r*||d< | d|d	tfgS )
a  
        Returns a full description of the launch configurations given the
        specified names.

        If no names are specified, then the full details of all launch
        configurations are returned.

        :type names: list
        :param names: List of configuration names which should be searched for.

        :type max_records: int
        :param max_records: Maximum amount of configurations to return.

        :type next_token: str
        :param next_token: If you have more results than can be returned
            at once, pass in this  parameter to page through all results.

        :rtype: list
        :returns: List of
            :class:`boto.ec2.autoscale.launchconfig.LaunchConfiguration`
            instances.
        r   Nr   r   LaunchConfigurationNamesr   r   DescribeLaunchConfigurationsr   )getrL   r   r   )r.   kwargsrD   r   r   r   r   r   r   get_all_launch_configurationsl  s   
z1AutoScaleConnection.get_all_launch_configurationsc                 C   sZ   |}t |tr
|j}d|i}|r||d< |r||d< |r#| ||d | d|dtfgS )a  
        Get all activities for the given autoscaling group.

        This action supports pagination by returning a token if there are more
        pages to retrieve. To get the next page, call this action again with
        the returned token as the NextToken parameter

        :type autoscale_group: str or
            :class:`boto.ec2.autoscale.group.AutoScalingGroup` object
        :param autoscale_group: The auto scaling group to get activities on.

        :type max_records: int
        :param max_records: Maximum amount of activities to return.

        :rtype: list
        :returns: List of
            :class:`boto.ec2.autoscale.activity.Activity` instances.
        rM   r   r   ActivityIdsDescribeScalingActivitiesr   )r@   r	   r[   rL   r   r   )r.   autoscale_groupactivity_idsr   r   r[   rD   r   r   r   get_all_activities  s   

z&AutoScaleConnection.get_all_activitiesc                 C      |  di tS )zGets all valid termination policies.

        These values can then be used as the termination_policies arg
        when creating and updating autoscale groups.
        DescribeTerminationPolicyTypes)rm   r   r;   r   r   r   get_termination_policies  s   z,AutoScaleConnection.get_termination_policiesc                 C       d|i}|r
||d< |  d|S )a$  
        Deletes a previously scheduled action.

        :type scheduled_action_name: str
        :param scheduled_action_name: The name of the action you want
            to delete.

        :type autoscale_group: str
        :param autoscale_group: The name of the autoscale group.
        ScheduledActionNamerM   DeleteScheduledActionrv   )r.   scheduled_action_namer   rD   r   r   r   delete_scheduled_action  s   z+AutoScaleConnection.delete_scheduled_actionc                 C   s,   d|i}|rd|d< nd|d< |  d|tS )ar  
        Terminates the specified instance. The desired group size can
        also be adjusted, if desired.

        :type instance_id: str
        :param instance_id: The ID of the instance to be terminated.

        :type decrement_capability: bool
        :param decrement_capacity: Whether to decrement the size of the
            autoscaling group or not.
        rX   ry   r{   rz   #TerminateInstanceInAutoScalingGroup)rm   r   )r.   rf   r}   rD   r   r   r   terminate_instance  s   
z&AutoScaleConnection.terminate_instancec                 C   r   )z
        Delete a policy.

        :type policy_name: str
        :param policy_name: The name or ARN of the policy to delete.

        :type autoscale_group: str
        :param autoscale_group: The name of the autoscale group.
        r   rM   DeletePolicyr   )r.   policy_namer   rD   r   r   r   delete_policy  s   
z!AutoScaleConnection.delete_policyc                 C      |  di dtfgS )NDescribeAdjustmentTypesr   )r   r   r;   r   r   r   get_all_adjustment_types  s   z,AutoScaleConnection.get_all_adjustment_typesc                 C   sB   i }|r|  ||d |r||d< |r||d< | d|dtfgS )a  
        Returns a description of each Auto Scaling instance in the instance_ids
        list. If a list is not provided, the service returns the full details
        of all instances up to a maximum of fifty.

        This action supports pagination by returning a token if there are more
        pages to retrieve. To get the next page, call this action again with
        the returned token as the NextToken parameter.

        :type instance_ids: list
        :param instance_ids: List of Autoscaling Instance IDs which should be
            searched for.

        :type max_records: int
        :param max_records: Maximum number of results to return.

        :rtype: list
        :returns: List of
            :class:`boto.ec2.autoscale.instance.Instance` objects.
        rs   r   r   DescribeAutoScalingInstancesr   )rL   r   r   )r.   rw   r   r   rD   r   r   r   get_all_autoscaling_instances  s   
z1AutoScaleConnection.get_all_autoscaling_instancesc                 C   r   )zn
        Returns a list of metrics and a corresponding list of granularities
        for each metric.
        DescribeMetricCollectionTypes)rm   r   r;   r   r   r   get_all_metric_collection_types  s   z3AutoScaleConnection.get_all_metric_collection_typesc                 C   sN   i }|r||d< |r|  ||d |r||d< |r||d< | d|dtfgS )a  
        Returns descriptions of what each policy does. This action supports
        pagination. If the response includes a token, there are more records
        available. To get the additional records, repeat the request with the
        response token as the NextToken parameter.

        If no group name or list of policy names are provided, all
        available policies are returned.

        :type as_group: str
        :param as_group: The name of the
            :class:`boto.ec2.autoscale.group.AutoScalingGroup` to filter for.

        :type policy_names: list
        :param policy_names: List of policy names which should be searched for.

        :type max_records: int
        :param max_records: Maximum amount of groups to return.

        :type next_token: str
        :param next_token: If you have more results than can be returned
            at once, pass in this  parameter to page through all results.
        rM   PolicyNamesr   r   DescribePoliciesr   )rL   r   r   )r.   ro   policy_namesr   r   rD   r   r   r   get_all_policies  s   z$AutoScaleConnection.get_all_policiesc                 C   r   )zt
        Returns scaling process types for use in the ResumeProcesses and
        SuspendProcesses actions.
        DescribeScalingProcessTypesr   )r   r
   r;   r   r   r   get_all_scaling_process_types?  s   z1AutoScaleConnection.get_all_scaling_process_typesc                 C   &   d|i}|r|  ||d | d|S )aV  
        Suspends Auto Scaling processes for an Auto Scaling group.

        :type as_group: string
        :param as_group: The auto scaling group to suspend processes on.

        :type scaling_processes: list
        :param scaling_processes: Processes you want to suspend. If omitted,
            all processes will be suspended.
        rM   ScalingProcessesSuspendProcessesru   r.   ro   scaling_processesrD   r   r   r   suspend_processesG  s   z%AutoScaleConnection.suspend_processesc                 C   r   )aQ  
        Resumes Auto Scaling processes for an Auto Scaling group.

        :type as_group: string
        :param as_group: The auto scaling group to resume processes on.

        :type scaling_processes: list
        :param scaling_processes: Processes you want to resume. If omitted, all
            processes will be resumed.
        rM   r   ResumeProcessesru   r   r   r   r   resume_processesX  s   z$AutoScaleConnection.resume_processesc
                 C   s   ||d}
|dur|  |
d< |dur|  |
d< |	dur!|	|
d< |r)|  |
d< |dur1||
d< |dur9||
d< |durA||
d	< | d
|
S )a  
        Creates a scheduled scaling action for a Auto Scaling group. If you
        leave a parameter unspecified, the corresponding value remains
        unchanged in the affected Auto Scaling group.

        :type as_group: string
        :param as_group: The auto scaling group to get activities on.

        :type name: string
        :param name: Scheduled action name.

        :type time: datetime.datetime
        :param time: The time for this action to start. (Depracated)

        :type desired_capacity: int
        :param desired_capacity: The number of EC2 instances that should
            be running in this group.

        :type min_size: int
        :param min_size: The minimum size for the new auto scaling group.

        :type max_size: int
        :param max_size: The minimum size for the new auto scaling group.

        :type start_time: datetime.datetime
        :param start_time: The time for this action to start. When StartTime and EndTime are specified with Recurrence, they form the boundaries of when the recurring action will start and stop.

        :type end_time: datetime.datetime
        :param end_time: The time for this action to end. When StartTime and EndTime are specified with Recurrence, they form the boundaries of when the recurring action will start and stop.

        :type recurrence: string
        :param recurrence: The time when recurring future actions will start. Start time is specified by the user following the Unix cron syntax format. EXAMPLE: '0 10 * * *'
        )rM   r   N	StartTimeEndTime
RecurrenceTimerR   rO   rP   PutScheduledUpdateGroupAction)	isoformatrv   )r.   ro   r[   timer`   r]   r^   
start_timeend_time
recurrencerD   r   r   r   create_scheduled_group_actionj  s$   &z1AutoScaleConnection.create_scheduled_group_actionc                 C   sN   i }|r||d< |r|  ||d |r||d< |r||d< | d|dtfgS )NrM   ScheduledActionNamesr   r   DescribeScheduledActionsr   )rL   r   r   )r.   ro   r  r	  scheduled_actionsr   r   rD   r   r   r   get_all_scheduled_actions  s   z-AutoScaleConnection.get_all_scheduled_actionsc                 C   r   )z
        Disables monitoring of group metrics for the Auto Scaling group
        specified in AutoScalingGroupName. You can specify the list of affected
        metrics with the Metrics parameter.
        rM   MetricsDisableMetricsCollectionru   )r.   ro   metricsrD   r   r   r   disable_metrics_collection  s   z.AutoScaleConnection.disable_metrics_collectionc                 C   s(   ||d}|r|  ||d | d|S )a[  
        Enables monitoring of group metrics for the Auto Scaling group
        specified in AutoScalingGroupName. You can specify the list of enabled
        metrics with the Metrics parameter.

        Auto scaling metrics collection can be turned on only if the
        InstanceMonitoring.Enabled flag, in the Auto Scaling group's launch
        configuration, is set to true.

        :type autoscale_group: string
        :param autoscale_group: The auto scaling group to get activities on.

        :type granularity: string
        :param granularity: The granularity to associate with the metrics to
            collect. Currently, the only legal granularity is "1Minute".

        :type metrics: string list
        :param metrics: The list of metrics to collect. If no metrics are
                        specified, all metrics are enabled.
        )rM   Granularityr  EnableMetricsCollectionru   )r.   ro   granularityr  rD   r   r   r   enable_metrics_collection  s   z-AutoScaleConnection.enable_metrics_collectionc                 C   s,   d|i}|r
||d< |r||d< |  d|S )Nr   rM   HonorCooldownExecutePolicyr   )r.   r   ro   honor_cooldownrD   r   r   r   execute_policy  s   z"AutoScaleConnection.execute_policyc                 C   s8   |}t |tr
|j}||d}| ||d | d|S )as  
        Configures an Auto Scaling group to send notifications when
        specified events take place.

        :type autoscale_group: str or
            :class:`boto.ec2.autoscale.group.AutoScalingGroup` object
        :param autoscale_group: The Auto Scaling group to put notification
            configuration on.

        :type topic: str
        :param topic: The Amazon Resource Name (ARN) of the Amazon Simple
            Notification Service (SNS) topic.

        :type notification_types: list
        :param notification_types: The type of events that will trigger
            the notification. Valid types are:
            'autoscaling:EC2_INSTANCE_LAUNCH',
            'autoscaling:EC2_INSTANCE_LAUNCH_ERROR',
            'autoscaling:EC2_INSTANCE_TERMINATE',
            'autoscaling:EC2_INSTANCE_TERMINATE_ERROR',
            'autoscaling:TEST_NOTIFICATION'
        rM   TopicARNNotificationTypesPutNotificationConfiguration)r@   r	   r[   rL   rv   )r.   r   topicnotification_typesr[   rD   r   r   r   put_notification_configuration  s   
z2AutoScaleConnection.put_notification_configurationc                 C   s*   |}t |tr
|j}||d}| d|S )a  
        Deletes notifications created by put_notification_configuration.

        :type autoscale_group: str or
            :class:`boto.ec2.autoscale.group.AutoScalingGroup` object
        :param autoscale_group: The Auto Scaling group to put notification
            configuration on.

        :type topic: str
        :param topic: The Amazon Resource Name (ARN) of the Amazon Simple
            Notification Service (SNS) topic.
        r  DeleteNotificationConfiguration)r@   r	   r[   rv   )r.   r   r   r[   rD   r   r   r   !delete_notification_configuration  s   
z5AutoScaleConnection.delete_notification_configurationc                 C   s,   ||d}|rd|d< nd|d< |  d|S )a  
        Explicitly set the health status of an instance.

        :type instance_id: str
        :param instance_id: The identifier of the EC2 instance.

        :type health_status: str
        :param health_status: The health status of the instance.
            "Healthy" means that the instance is healthy and should remain
            in service. "Unhealthy" means that the instance is unhealthy.
            Auto Scaling should terminate and replace it.

        :type should_respect_grace_period: bool
        :param should_respect_grace_period: If True, this call should
            respect the grace period associated with the group.
        )rX   HealthStatusry   ShouldRespectGracePeriodrz   SetInstanceHealthr   )r.   rf   health_statusshould_respect_grace_periodrD   r   r   r   set_instance_health  s   
z'AutoScaleConnection.set_instance_healthc                 C   s"   ||d}|rd|d< |  d|S )a  
        Adjusts the desired size of the AutoScalingGroup by initiating scaling
        activities. When reducing the size of the group, it is not possible to define
        which Amazon EC2 instances will be terminated. This applies to any Auto Scaling
        decisions that might result in terminating instances.

        :type group_name: string
        :param group_name: name of the auto scaling group

        :type desired_capacity: integer
        :param desired_capacity: new capacity setting for auto scaling group

        :type honor_cooldown: boolean
        :param honor_cooldown: by default, overrides any cooldown period
        )rM   rR   ry   r  SetDesiredCapacityr   )r.   
group_namer`   r  rD   r   r   r   set_desired_capacity3  s   z(AutoScaleConnection.set_desired_capacityc                 C   s0   i }|r||d< |r||d< |  d|dtfgS )aw  
        Lists the Auto Scaling group tags.

        This action supports pagination by returning a token if there
        are more pages to retrieve. To get the next page, call this
        action again with the returned token as the NextToken
        parameter.

        :type filters: dict
        :param filters: The value of the filter type used to identify
            the tags to be returned.  NOT IMPLEMENTED YET.

        :type max_records: int
        :param max_records: Maximum number of tags to return.

        :rtype: list
        :returns: List of :class:`boto.ec2.autoscale.tag.Tag`
            instances.
        r   r   DescribeTagsr   )r   r   )r.   filtersr   r   rD   r   r   r   get_all_tagsL  s   z AutoScaleConnection.get_all_tagsc                 C   6   i }t |D ]\}}|||d  q| jd|ddS )z
        Creates new tags or updates existing tags for an Auto Scaling group.

        :type tags: List of :class:`boto.ec2.autoscale.tag.Tag`
        :param tags: The new or updated tags.
        r=   CreateOrUpdateTagsr   r   rk   rl   rv   r.   rj   rD   rG   rq   r   r   r   create_or_update_tagsh     z)AutoScaleConnection.create_or_update_tagsc                 C   r1  )z
        Deletes existing tags for an Auto Scaling group.

        :type tags: List of :class:`boto.ec2.autoscale.tag.Tag`
        :param tags: The new or updated tags.
        r=   
DeleteTagsr   r   r3  r4  r   r   r   delete_tagst  r6  zAutoScaleConnection.delete_tags)NNTNNNNNr   NNr"   NTNF)T)F)NNN)N)NNNN)NNNNNNN)NNNNNN)NN)0__name__
__module____qualname__botoconfigr   
APIVersionr(   r'   r,   r<   rL   rr   rx   r~   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r  r  r  r  r"  r$  r*  r-  r0  r5  r8  __classcell__r   r   r9   r   r   O   s    

$


=
$
!




 
%


8



!


r   )'__doc__r   r<  boto.connectionr   boto.regioninfor   r   r   r   boto.ec2.autoscale.requestr   boto.ec2.autoscale.launchconfigr   boto.ec2.autoscale.groupr	   r
   boto.ec2.autoscale.activityr   boto.ec2.autoscale.policyr   r   r   r   boto.ec2.autoscale.instancer   boto.ec2.autoscale.scheduledr   boto.ec2.autoscale.tagr   boto.ec2.autoscale.limitsr   boto.compatr   r   
RegionDatar   r   r   r   r   r   r   <module>   s0   
