o ckF[~@sXddlZddlmZddlmZddlmZddlmZddl m Z GdddeZ dS) N)json)AWSQueryConnection) RegionInfo)JSONResponseError) exceptionscseZdZdZdZdZdZdZdZe Z e j e j e je je je jdZfdd Zd d Zd)d dZddZddZddZddZd*ddZd*ddZ d+ddZddZ d,dd Z d-d!d"Z d-d#d$Z d%d&Z!d'd(Z"Z#S).Route53DomainsConnectionz z 2014-05-15z us-east-1z&route53domains.us-east-1.amazonaws.comRoute53DomainsRoute53Domains_v20140515)DuplicateRequestDomainLimitExceeded InvalidInputOperationLimitExceededUnsupportedTLDTLDRulesViolationc s^|dd}|st||j|j}d|vs|ddur|j|d<tt|jdi|||_dS)Nregionhost) poprDefaultRegionNameDefaultRegionEndpointendpointsuperr__init__r)selfkwargsr __class__r=/usr/lib/python3/dist-packages/boto/route53/domains/layer1.pyr4s   z!Route53DomainsConnection.__init__cCsdgS)Nzhmac-v4r)rrrr_required_auth_capability@sz2Route53DomainsConnection._required_auth_capabilityNcCs,d|i}|dur ||d<|jdt|dS)a This operation checks the availability of one domain name. You can access this API without authenticating. Note that if the availability status of a domain is pending, you must submit another request to determine the availability of the domain name. :type domain_name: string :param domain_name: The name of a domain. Type: String Default: None Constraints: The domain name can contain only the letters a through z, the numbers 0 through 9, and hyphen (-). Internationalized Domain Names are not supported. Required: Yes :type idn_lang_code: string :param idn_lang_code: Reserved for future use. DomainNameN IdnLangCodeCheckDomainAvailabilityactionbody make_requestrdumps)r domain_name idn_lang_codeparamsrrrcheck_domain_availabilityCs z2Route53DomainsConnection.check_domain_availabilitycCd|i}|jdt|dS)av This operation removes the transfer lock on the domain (specifically the `clientTransferProhibited` status) to allow domain transfers. We recommend you refrain from performing this action unless you intend to transfer the domain to a different registrar. Successful submission returns an operation ID that you can use to track the progress and completion of the action. If the request is not completed successfully, the domain registrant will be notified by email. :type domain_name: string :param domain_name: The name of a domain. Type: String Default: None Constraints: The domain name can contain only the letters a through z, the numbers 0 through 9, and hyphen (-). Internationalized Domain Names are not supported. Required: Yes rDisableDomainTransferLockr"r%rr(r*rrrdisable_domain_transfer_lockasz5Route53DomainsConnection.disable_domain_transfer_lockcCr,)a This operation sets the transfer lock on the domain (specifically the `clientTransferProhibited` status) to prevent domain transfers. Successful submission returns an operation ID that you can use to track the progress and completion of the action. If the request is not completed successfully, the domain registrant will be notified by email. :type domain_name: string :param domain_name: The name of a domain. Type: String Default: None Constraints: The domain name can contain only the letters a through z, the numbers 0 through 9, and hyphen (-). Internationalized Domain Names are not supported. Required: Yes rEnableDomainTransferLockr"r%r.rrrenable_domain_transfer_lock}sz4Route53DomainsConnection.enable_domain_transfer_lockcCr,)a This operation returns detailed information about the domain. The domain's contact information is also returned as part of the output. :type domain_name: string :param domain_name: The name of a domain. Type: String Default: None Constraints: The domain name can contain only the letters a through z, the numbers 0 through 9, and hyphen (-). Internationalized Domain Names are not supported. Required: Yes rGetDomainDetailr"r%r.rrrget_domain_detailz*Route53DomainsConnection.get_domain_detailcCr,)a This operation returns the current status of an operation that is not completed. :type operation_id: string :param operation_id: The identifier for the operation for which you want to get the status. Amazon Route 53 returned the identifier in the response to the original request. Type: String Default: None Required: Yes OperationIdGetOperationDetailr"r%)r operation_idr*rrrget_operation_detailsz-Route53DomainsConnection.get_operation_detailcC8i}|dur ||d<|dur||d<|jdt|dS)a This operation returns all the domain names registered with Amazon Route 53 for the current AWS account. :type marker: string :param marker: For an initial request for a list of domains, omit this element. If the number of domains that are associated with the current AWS account is greater than the value that you specified for `MaxItems`, you can use `Marker` to return additional domains. Get the value of `NextPageMarker` from the previous response, and submit another request that includes the value of `NextPageMarker` in the `Marker` element. Type: String Default: None Constraints: The marker must match the value specified in the previous request. Required: No :type max_items: integer :param max_items: Number of domains to be returned. Type: Integer Default: 20 Constraints: A numeral between 1 and 100. Required: No NMarkerMaxItems ListDomainsr"r%rmarker max_itemsr*rrr list_domainss!z%Route53DomainsConnection.list_domainscCr9)a This operation returns the operation IDs of operations that are not yet complete. :type marker: string :param marker: For an initial request for a list of operations, omit this element. If the number of operations that are not yet complete is greater than the value that you specified for `MaxItems`, you can use `Marker` to return additional operations. Get the value of `NextPageMarker` from the previous response, and submit another request that includes the value of `NextPageMarker` in the `Marker` element. Type: String Default: None Required: No :type max_items: integer :param max_items: Number of domains to be returned. Type: Integer Default: 20 Constraints: A value between 1 and 100. Required: No Nr:r;ListOperationsr"r%r=rrrlist_operationssz(Route53DomainsConnection.list_operationsc Cst|||||d} |dur|| d<|dur|| d<|dur || d<| dur(| | d<| dur0| | d<|jdt| d S) an This operation registers a domain. Domains are registered by the AWS registrar partner, Gandi. For some top-level domains (TLDs), this operation requires extra parameters. When you register a domain, Amazon Route 53 does the following: + Creates a Amazon Route 53 hosted zone that has the same name as the domain. Amazon Route 53 assigns four name servers to your hosted zone and automatically updates your domain registration with the names of these name servers. + Enables autorenew, so your domain registration will renew automatically each year. We'll notify you in advance of the renewal date so you can choose whether to renew the registration. + Optionally enables privacy protection, so WHOIS queries return contact information for our registrar partner, Gandi, instead of the information you entered for registrant, admin, and tech contacts. + If registration is successful, returns an operation ID that you can use to track the progress and completion of the action. If the request is not completed successfully, the domain registrant is notified by email. + Charges your AWS account an amount based on the top-level domain. For more information, see `Amazon Route 53 Pricing`_. :type domain_name: string :param domain_name: The name of a domain. Type: String Default: None Constraints: The domain name can contain only the letters a through z, the numbers 0 through 9, and hyphen (-). Internationalized Domain Names are not supported. Required: Yes :type idn_lang_code: string :param idn_lang_code: Reserved for future use. :type duration_in_years: integer :param duration_in_years: The number of years the domain will be registered. Domains are registered for a minimum of one year. The maximum period depends on the top-level domain. Type: Integer Default: 1 Valid values: Integer from 1 to 10 Required: Yes :type auto_renew: boolean :param auto_renew: Indicates whether the domain will be automatically renewed ( `True`) or not ( `False`). Autorenewal only takes effect after the account is charged. Type: Boolean Valid values: `True` | `False` Default: `True` Required: No :type admin_contact: dict :param admin_contact: Provides detailed contact information. Type: Complex Children: `FirstName`, `MiddleName`, `LastName`, `ContactType`, `OrganizationName`, `AddressLine1`, `AddressLine2`, `City`, `State`, `CountryCode`, `ZipCode`, `PhoneNumber`, `Email`, `Fax`, `ExtraParams` Required: Yes :type registrant_contact: dict :param registrant_contact: Provides detailed contact information. Type: Complex Children: `FirstName`, `MiddleName`, `LastName`, `ContactType`, `OrganizationName`, `AddressLine1`, `AddressLine2`, `City`, `State`, `CountryCode`, `ZipCode`, `PhoneNumber`, `Email`, `Fax`, `ExtraParams` Required: Yes :type tech_contact: dict :param tech_contact: Provides detailed contact information. Type: Complex Children: `FirstName`, `MiddleName`, `LastName`, `ContactType`, `OrganizationName`, `AddressLine1`, `AddressLine2`, `City`, `State`, `CountryCode`, `ZipCode`, `PhoneNumber`, `Email`, `Fax`, `ExtraParams` Required: Yes :type privacy_protect_admin_contact: boolean :param privacy_protect_admin_contact: Whether you want to conceal contact information from WHOIS queries. If you specify true, WHOIS ("who is") queries will return contact information for our registrar partner, Gandi, instead of the contact information that you enter. Type: Boolean Default: `True` Valid values: `True` | `False` Required: No :type privacy_protect_registrant_contact: boolean :param privacy_protect_registrant_contact: Whether you want to conceal contact information from WHOIS queries. If you specify true, WHOIS ("who is") queries will return contact information for our registrar partner, Gandi, instead of the contact information that you enter. Type: Boolean Default: `True` Valid values: `True` | `False` Required: No :type privacy_protect_tech_contact: boolean :param privacy_protect_tech_contact: Whether you want to conceal contact information from WHOIS queries. If you specify true, WHOIS ("who is") queries will return contact information for our registrar partner, Gandi, instead of the contact information that you enter. Type: Boolean Default: `True` Valid values: `True` | `False` Required: No )rDurationInYears AdminContactRegistrantContact TechContactNr AutoRenewPrivacyProtectAdminContactPrivacyProtectRegistrantContactPrivacyProtectTechContactRegisterDomainr"r%) rr(duration_in_years admin_contactregistrant_contact tech_contactr) auto_renewprivacy_protect_admin_contact"privacy_protect_registrant_contactprivacy_protect_tech_contactr*rrrregister_domains(z(Route53DomainsConnection.register_domaincCr,)a  This operation returns the AuthCode for the domain. To transfer a domain to another registrar, you provide this value to the new registrar. :type domain_name: string :param domain_name: The name of a domain. Type: String Default: None Constraints: The domain name can contain only the letters a through z, the numbers 0 through 9, and hyphen (-). Internationalized Domain Names are not supported. Required: Yes rRetrieveDomainAuthCoder"r%r.rrrretrieve_domain_auth_coder4z2Route53DomainsConnection.retrieve_domain_auth_codec Cs||||||d} |dur|| d<|dur|| d<| dur!| | d<| dur)| | d<| dur1| | d<| dur9| | d<|jd t| d S) a This operation transfers a domain from another registrar to Amazon Route 53. Domains are registered by the AWS registrar, Gandi upon transfer. To transfer a domain, you need to meet all the domain transfer criteria, including the following: + You must supply nameservers to transfer a domain. + You must disable the domain transfer lock (if any) before transferring the domain. + A minimum of 60 days must have elapsed since the domain's registration or last transfer. We recommend you use the Amazon Route 53 as the DNS service for your domain. You can create a hosted zone in Amazon Route 53 for your current domain before transferring your domain. Note that upon transfer, the domain duration is extended for a year if not otherwise specified. Autorenew is enabled by default. If the transfer is successful, this method returns an operation ID that you can use to track the progress and completion of the action. If the request is not completed successfully, the domain registrant will be notified by email. Transferring domains charges your AWS account an amount based on the top-level domain. For more information, see `Amazon Route 53 Pricing`_. :type domain_name: string :param domain_name: The name of a domain. Type: String Default: None Constraints: The domain name can contain only the letters a through z, the numbers 0 through 9, and hyphen (-). Internationalized Domain Names are not supported. Required: Yes :type idn_lang_code: string :param idn_lang_code: Reserved for future use. :type duration_in_years: integer :param duration_in_years: The number of years the domain will be registered. Domains are registered for a minimum of one year. The maximum period depends on the top-level domain. Type: Integer Default: 1 Valid values: Integer from 1 to 10 Required: Yes :type nameservers: list :param nameservers: Contains details for the host and glue IP addresses. Type: Complex Children: `GlueIps`, `Name` :type auth_code: string :param auth_code: The authorization code for the domain. You get this value from the current registrar. Type: String Required: Yes :type auto_renew: boolean :param auto_renew: Indicates whether the domain will be automatically renewed (true) or not (false). Autorenewal only takes effect after the account is charged. Type: Boolean Valid values: `True` | `False` Default: true Required: No :type admin_contact: dict :param admin_contact: Provides detailed contact information. Type: Complex Children: `FirstName`, `MiddleName`, `LastName`, `ContactType`, `OrganizationName`, `AddressLine1`, `AddressLine2`, `City`, `State`, `CountryCode`, `ZipCode`, `PhoneNumber`, `Email`, `Fax`, `ExtraParams` Required: Yes :type registrant_contact: dict :param registrant_contact: Provides detailed contact information. Type: Complex Children: `FirstName`, `MiddleName`, `LastName`, `ContactType`, `OrganizationName`, `AddressLine1`, `AddressLine2`, `City`, `State`, `CountryCode`, `ZipCode`, `PhoneNumber`, `Email`, `Fax`, `ExtraParams` Required: Yes :type tech_contact: dict :param tech_contact: Provides detailed contact information. Type: Complex Children: `FirstName`, `MiddleName`, `LastName`, `ContactType`, `OrganizationName`, `AddressLine1`, `AddressLine2`, `City`, `State`, `CountryCode`, `ZipCode`, `PhoneNumber`, `Email`, `Fax`, `ExtraParams` Required: Yes :type privacy_protect_admin_contact: boolean :param privacy_protect_admin_contact: Whether you want to conceal contact information from WHOIS queries. If you specify true, WHOIS ("who is") queries will return contact information for our registrar partner, Gandi, instead of the contact information that you enter. Type: Boolean Default: `True` Valid values: `True` | `False` Required: No :type privacy_protect_registrant_contact: boolean :param privacy_protect_registrant_contact: Whether you want to conceal contact information from WHOIS queries. If you specify true, WHOIS ("who is") queries will return contact information for our registrar partner, Gandi, instead of the contact information that you enter. Type: Boolean Default: `True` Valid values: `True` | `False` Required: No :type privacy_protect_tech_contact: boolean :param privacy_protect_tech_contact: Whether you want to conceal contact information from WHOIS queries. If you specify true, WHOIS ("who is") queries will return contact information for our registrar partner, Gandi, instead of the contact information that you enter. Type: Boolean Default: `True` Valid values: `True` | `False` Required: No )rrC NameserversrDrErFNr AuthCoderGrHrIrJTransferDomainr"r%)rr(rL nameserversrMrNrOr) auth_coderPrQrRrSr*rrrtransfer_domains.*z(Route53DomainsConnection.transfer_domaincCLd|i}|dur ||d<|dur||d<|dur||d<|jdt|dS)a This operation updates the contact information for a particular domain. Information for at least one contact (registrant, administrator, or technical) must be supplied for update. If the update is successful, this method returns an operation ID that you can use to track the progress and completion of the action. If the request is not completed successfully, the domain registrant will be notified by email. :type domain_name: string :param domain_name: The name of a domain. Type: String Default: None Constraints: The domain name can contain only the letters a through z, the numbers 0 through 9, and hyphen (-). Internationalized Domain Names are not supported. Required: Yes :type admin_contact: dict :param admin_contact: Provides detailed contact information. Type: Complex Children: `FirstName`, `MiddleName`, `LastName`, `ContactType`, `OrganizationName`, `AddressLine1`, `AddressLine2`, `City`, `State`, `CountryCode`, `ZipCode`, `PhoneNumber`, `Email`, `Fax`, `ExtraParams` Required: Yes :type registrant_contact: dict :param registrant_contact: Provides detailed contact information. Type: Complex Children: `FirstName`, `MiddleName`, `LastName`, `ContactType`, `OrganizationName`, `AddressLine1`, `AddressLine2`, `City`, `State`, `CountryCode`, `ZipCode`, `PhoneNumber`, `Email`, `Fax`, `ExtraParams` Required: Yes :type tech_contact: dict :param tech_contact: Provides detailed contact information. Type: Complex Children: `FirstName`, `MiddleName`, `LastName`, `ContactType`, `OrganizationName`, `AddressLine1`, `AddressLine2`, `City`, `State`, `CountryCode`, `ZipCode`, `PhoneNumber`, `Email`, `Fax`, `ExtraParams` Required: Yes rNrDrErFUpdateDomainContactr"r%)rr(rMrNrOr*rrrupdate_domain_contacts;z.Route53DomainsConnection.update_domain_contactcCr])a This operation updates the specified domain contact's privacy setting. When the privacy option is enabled, personal information such as postal or email address is hidden from the results of a public WHOIS query. The privacy services are provided by the AWS registrar, Gandi. For more information, see the `Gandi privacy features`_. This operation only affects the privacy of the specified contact type (registrant, administrator, or tech). Successful acceptance returns an operation ID that you can use with GetOperationDetail to track the progress and completion of the action. If the request is not completed successfully, the domain registrant will be notified by email. :type domain_name: string :param domain_name: The name of a domain. Type: String Default: None Constraints: The domain name can contain only the letters a through z, the numbers 0 through 9, and hyphen (-). Internationalized Domain Names are not supported. Required: Yes :type admin_privacy: boolean :param admin_privacy: Whether you want to conceal contact information from WHOIS queries. If you specify true, WHOIS ("who is") queries will return contact information for our registrar partner, Gandi, instead of the contact information that you enter. Type: Boolean Default: None Valid values: `True` | `False` Required: No :type registrant_privacy: boolean :param registrant_privacy: Whether you want to conceal contact information from WHOIS queries. If you specify true, WHOIS ("who is") queries will return contact information for our registrar partner, Gandi, instead of the contact information that you enter. Type: Boolean Default: None Valid values: `True` | `False` Required: No :type tech_privacy: boolean :param tech_privacy: Whether you want to conceal contact information from WHOIS queries. If you specify true, WHOIS ("who is") queries will return contact information for our registrar partner, Gandi, instead of the contact information that you enter. Type: Boolean Default: None Valid values: `True` | `False` Required: No rN AdminPrivacyRegistrantPrivacy TechPrivacyUpdateDomainContactPrivacyr"r%)rr( admin_privacyregistrant_privacy tech_privacyr*rrrupdate_domain_contact_privacysFz6Route53DomainsConnection.update_domain_contact_privacycCs||d}|jdt|dS)a9 This operation replaces the current set of name servers for the domain with the specified set of name servers. If you use Amazon Route 53 as your DNS service, specify the four name servers in the delegation set for the hosted zone for the domain. If successful, this operation returns an operation ID that you can use to track the progress and completion of the action. If the request is not completed successfully, the domain registrant will be notified by email. :type domain_name: string :param domain_name: The name of a domain. Type: String Default: None Constraints: The domain name can contain only the letters a through z, the numbers 0 through 9, and hyphen (-). Internationalized Domain Names are not supported. Required: Yes :type nameservers: list :param nameservers: A list of new name servers for the domain. Type: Complex Children: `Name`, `GlueIps` Required: Yes )rrWUpdateDomainNameserversr"r%)rr(rZr*rrrupdate_domain_nameservers$s #z2Route53DomainsConnection.update_domain_nameserversc Csd|j|f|jjdtt|d}|jdddi||d}|j|ddd}|d }t j ||j d kr@|r>t |SdSt |}|d d}|j||j} | |j |j|d ) Nz%s.%szapplication/x-amz-json-1.1)z X-Amz-TargetHostz Content-TypezContent-LengthPOST/)methodpath auth_pathr*headersdata )senderoverride_num_retrieszutf-8__type)r$) TargetPrefixrrstrlenbuild_base_http_request_mexereaddecodebotologdebugstatusrloadsget_faults ResponseErrorreason) rr#r$rp http_requestresponse response_body json_body fault_nameexception_classrrrr&Ms0        z%Route53DomainsConnection.make_request)N)NN)NNNNN)NNNNNN)NNN)$__name__ __module__ __qualname____doc__ APIVersionrr ServiceNamerwrrrr r r r rrrrrr+r/r1r3r8r@rBrTrVr\r_rgrir& __classcell__rrrrrs\    )' ) @ E P)r) r~ boto.compatrboto.connectionrboto.regioninforboto.exceptionrboto.route53.domainsrrrrrrs