Server : Apache System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64 User : dh_edsupp ( 6597262) PHP Version : 8.2.26 Disable Function : NONE Directory : /lib/python3/dist-packages/boto/cloudsearch2/__pycache__/ |
Upload File : |
o ckF[� � @ s8 d dl mZ d dlmZ d dlmZ G dd� de�ZdS )� )�CloudSearchConnection)�Domain)�sixc @ s8 e Zd Z d dd�Zddd�Zd d � Zdd� ZdS )�Layer2NTr Fc C s\ t | tj�rdd l} | j�� D ]}|j| kr|} nqt||||||||| | ||d�| _d S )Nr )�aws_access_key_id�aws_secret_access_key� is_secure�port�proxy� proxy_port�host�debug�security_token�region�validate_certs�sign_request) � isinstancer �string_types�boto.cloudsearch2�cloudsearch2�regions�namer �layer1)�selfr r r r r r r r � session_tokenr r r �boto�region_info� r �:/usr/lib/python3/dist-packages/boto/cloudsearch2/layer2.py�__init__ s* ��zLayer2.__init__c s. � j �|�}|d d d }� fdd�|D �S )z� Return a list of objects for each domain defined in the current account. :rtype: list of :class:`boto.cloudsearch2.domain.Domain` �DescribeDomainsResponse�DescribeDomainsResult�DomainStatusListc s g | ]}t � j|��qS r )r r )�.0�data�r r r � <listcomp>F s z'Layer2.list_domains.<locals>.<listcomp>)r �describe_domains)r �domain_names�domain_datar r% r �list_domains: s ��zLayer2.list_domainsc C s$ | j �|�}t| j |d d d �S )z� Create a new CloudSearch domain and return the corresponding object. :return: Domain object, or None if the domain isn't found :rtype: :class:`boto.cloudsearch2.domain.Domain` �CreateDomainResponse�CreateDomainResult�DomainStatus)r � create_domainr )r �domain_namer$ r r r r. H s ��zLayer2.create_domainc C s&