Browse Source

DOMAIN SDK Auto Released By huizeng.zh,Version:1.57.0

Signed-off-by: haowei.yao <haowei.yao@alibaba-inc.com>
haowei.yao 6 years ago
parent
commit
869ba2801b

+ 3 - 0
ChangeLog.txt

@@ -1,3 +1,6 @@
+2019-04-22 Version: 1.57.0
+1, Add a new api, QueryDomainByDomainName.
+
 2019-04-22 Version: 1.56.14
 1, This is an example of release-log.
 2, Please strictly follow this format to edit in English.

+ 28 - 5
services/domain/client.go

@@ -18,6 +18,7 @@ package domain
 import (
 	"github.com/aliyun/alibaba-cloud-sdk-go/sdk"
 	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth/credentials/provider"
 )
 
 // Client is the sdk client struct, each func corresponds to an OpenAPI
@@ -32,6 +33,20 @@ func NewClient() (client *Client, err error) {
 	return
 }
 
+// NewClientWithProvider creates a sdk client with providers
+// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md
+func NewClientWithProvider(regionId string, providers ...provider.Provider) (client *Client, err error) {
+	client = &Client{}
+	var pc provider.Provider
+	if len(providers) == 0 {
+		pc = provider.DefaultChain
+	} else {
+		pc = provider.NewProviderChain(providers)
+	}
+	err = client.InitWithProviderChain(regionId, pc)
+	return
+}
+
 // NewClientWithOptions creates a sdk client with regionId/sdkConfig/credential
 // this is the common api to create a sdk client
 func NewClientWithOptions(regionId string, config *sdk.Config, credential auth.Credential) (client *Client, err error) {
@@ -41,7 +56,7 @@ func NewClientWithOptions(regionId string, config *sdk.Config, credential auth.C
 }
 
 // NewClientWithAccessKey is a shortcut to create sdk client with accesskey
-// usage: https://help.aliyun.com/document_detail/66217.html
+// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md
 func NewClientWithAccessKey(regionId, accessKeyId, accessKeySecret string) (client *Client, err error) {
 	client = &Client{}
 	err = client.InitWithAccessKey(regionId, accessKeyId, accessKeySecret)
@@ -49,7 +64,7 @@ func NewClientWithAccessKey(regionId, accessKeyId, accessKeySecret string) (clie
 }
 
 // NewClientWithStsToken is a shortcut to create sdk client with sts token
-// usage: https://help.aliyun.com/document_detail/66222.html
+// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md
 func NewClientWithStsToken(regionId, stsAccessKeyId, stsAccessKeySecret, stsToken string) (client *Client, err error) {
 	client = &Client{}
 	err = client.InitWithStsToken(regionId, stsAccessKeyId, stsAccessKeySecret, stsToken)
@@ -57,15 +72,23 @@ func NewClientWithStsToken(regionId, stsAccessKeyId, stsAccessKeySecret, stsToke
 }
 
 // NewClientWithRamRoleArn is a shortcut to create sdk client with ram roleArn
-// usage: https://help.aliyun.com/document_detail/66222.html
+// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md
 func NewClientWithRamRoleArn(regionId string, accessKeyId, accessKeySecret, roleArn, roleSessionName string) (client *Client, err error) {
 	client = &Client{}
 	err = client.InitWithRamRoleArn(regionId, accessKeyId, accessKeySecret, roleArn, roleSessionName)
 	return
 }
 
+// NewClientWithRamRoleArn is a shortcut to create sdk client with ram roleArn and policy
+// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md
+func NewClientWithRamRoleArnAndPolicy(regionId string, accessKeyId, accessKeySecret, roleArn, roleSessionName, policy string) (client *Client, err error) {
+	client = &Client{}
+	err = client.InitWithRamRoleArnAndPolicy(regionId, accessKeyId, accessKeySecret, roleArn, roleSessionName, policy)
+	return
+}
+
 // NewClientWithEcsRamRole is a shortcut to create sdk client with ecs ram role
-// usage: https://help.aliyun.com/document_detail/66223.html
+// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md
 func NewClientWithEcsRamRole(regionId string, roleName string) (client *Client, err error) {
 	client = &Client{}
 	err = client.InitWithEcsRamRole(regionId, roleName)
@@ -73,7 +96,7 @@ func NewClientWithEcsRamRole(regionId string, roleName string) (client *Client,
 }
 
 // NewClientWithRsaKeyPair is a shortcut to create sdk client with rsa key pair
-// attention: rsa key pair auth is only Japan regions available
+// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md
 func NewClientWithRsaKeyPair(regionId string, publicKeyId, privateKey string, sessionExpiration int) (client *Client, err error) {
 	client = &Client{}
 	err = client.InitWithRsaKeyPair(regionId, publicKeyId, privateKey, sessionExpiration)

+ 129 - 0
services/domain/query_domain_by_domain_name.go

@@ -0,0 +1,129 @@
+package domain
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// QueryDomainByDomainName invokes the domain.QueryDomainByDomainName API synchronously
+// api document: https://help.aliyun.com/api/domain/querydomainbydomainname.html
+func (client *Client) QueryDomainByDomainName(request *QueryDomainByDomainNameRequest) (response *QueryDomainByDomainNameResponse, err error) {
+	response = CreateQueryDomainByDomainNameResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// QueryDomainByDomainNameWithChan invokes the domain.QueryDomainByDomainName API asynchronously
+// api document: https://help.aliyun.com/api/domain/querydomainbydomainname.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryDomainByDomainNameWithChan(request *QueryDomainByDomainNameRequest) (<-chan *QueryDomainByDomainNameResponse, <-chan error) {
+	responseChan := make(chan *QueryDomainByDomainNameResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.QueryDomainByDomainName(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// QueryDomainByDomainNameWithCallback invokes the domain.QueryDomainByDomainName API asynchronously
+// api document: https://help.aliyun.com/api/domain/querydomainbydomainname.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryDomainByDomainNameWithCallback(request *QueryDomainByDomainNameRequest, callback func(response *QueryDomainByDomainNameResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *QueryDomainByDomainNameResponse
+		var err error
+		defer close(result)
+		response, err = client.QueryDomainByDomainName(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// QueryDomainByDomainNameRequest is the request struct for api QueryDomainByDomainName
+type QueryDomainByDomainNameRequest struct {
+	*requests.RpcRequest
+	UserClientIp string `position:"Query" name:"UserClientIp"`
+	DomainName   string `position:"Query" name:"DomainName"`
+	Lang         string `position:"Query" name:"Lang"`
+}
+
+// QueryDomainByDomainNameResponse is the response struct for api QueryDomainByDomainName
+type QueryDomainByDomainNameResponse struct {
+	*responses.BaseResponse
+	UserId                       string                           `json:"UserId" xml:"UserId"`
+	DomainName                   string                           `json:"DomainName" xml:"DomainName"`
+	InstanceId                   string                           `json:"InstanceId" xml:"InstanceId"`
+	RegistrationDate             string                           `json:"RegistrationDate" xml:"RegistrationDate"`
+	ExpirationDate               string                           `json:"ExpirationDate" xml:"ExpirationDate"`
+	RegistrantOrganization       string                           `json:"RegistrantOrganization" xml:"RegistrantOrganization"`
+	RegistrantName               string                           `json:"RegistrantName" xml:"RegistrantName"`
+	Email                        string                           `json:"Email" xml:"Email"`
+	UpdateProhibitionLock        string                           `json:"UpdateProhibitionLock" xml:"UpdateProhibitionLock"`
+	TransferProhibitionLock      string                           `json:"TransferProhibitionLock" xml:"TransferProhibitionLock"`
+	DomainNameProxyService       bool                             `json:"DomainNameProxyService" xml:"DomainNameProxyService"`
+	Premium                      bool                             `json:"Premium" xml:"Premium"`
+	EmailVerificationStatus      int                              `json:"EmailVerificationStatus" xml:"EmailVerificationStatus"`
+	EmailVerificationClientHold  bool                             `json:"EmailVerificationClientHold" xml:"EmailVerificationClientHold"`
+	RealNameStatus               string                           `json:"RealNameStatus" xml:"RealNameStatus"`
+	RegistrantUpdatingStatus     string                           `json:"RegistrantUpdatingStatus" xml:"RegistrantUpdatingStatus"`
+	TransferOutStatus            string                           `json:"TransferOutStatus" xml:"TransferOutStatus"`
+	RegistrantType               string                           `json:"RegistrantType" xml:"RegistrantType"`
+	DomainNameVerificationStatus string                           `json:"DomainNameVerificationStatus" xml:"DomainNameVerificationStatus"`
+	RequestId                    string                           `json:"RequestId" xml:"RequestId"`
+	ZhRegistrantOrganization     string                           `json:"ZhRegistrantOrganization" xml:"ZhRegistrantOrganization"`
+	ZhRegistrantName             string                           `json:"ZhRegistrantName" xml:"ZhRegistrantName"`
+	RegistrationDateLong         int                              `json:"RegistrationDateLong" xml:"RegistrationDateLong"`
+	ExpirationDateLong           int                              `json:"ExpirationDateLong" xml:"ExpirationDateLong"`
+	DnsList                      DnsListInQueryDomainByDomainName `json:"DnsList" xml:"DnsList"`
+}
+
+// CreateQueryDomainByDomainNameRequest creates a request to invoke QueryDomainByDomainName API
+func CreateQueryDomainByDomainNameRequest() (request *QueryDomainByDomainNameRequest) {
+	request = &QueryDomainByDomainNameRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Domain", "2018-01-29", "QueryDomainByDomainName", "", "")
+	return
+}
+
+// CreateQueryDomainByDomainNameResponse creates a response to parse from QueryDomainByDomainName response
+func CreateQueryDomainByDomainNameResponse() (response *QueryDomainByDomainNameResponse) {
+	response = &QueryDomainByDomainNameResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 1 - 0
services/domain/query_registrant_profiles.go

@@ -81,6 +81,7 @@ type QueryRegistrantProfilesRequest struct {
 	RegistrantProfileId      requests.Integer `position:"Query" name:"RegistrantProfileId"`
 	PageSize                 requests.Integer `position:"Query" name:"PageSize"`
 	RegistrantType           string           `position:"Query" name:"RegistrantType"`
+	RegistrantProfileType    string           `position:"Query" name:"RegistrantProfileType"`
 	RealNameStatus           string           `position:"Query" name:"RealNameStatus"`
 	Lang                     string           `position:"Query" name:"Lang"`
 	PageNum                  requests.Integer `position:"Query" name:"PageNum"`

+ 1 - 0
services/domain/save_registrant_profile.go

@@ -83,6 +83,7 @@ type SaveRegistrantProfileRequest struct {
 	RegistrantProfileId      requests.Integer `position:"Query" name:"RegistrantProfileId"`
 	ZhAddress                string           `position:"Query" name:"ZhAddress"`
 	RegistrantType           string           `position:"Query" name:"RegistrantType"`
+	RegistrantProfileType    string           `position:"Query" name:"RegistrantProfileType"`
 	Telephone                string           `position:"Query" name:"Telephone"`
 	DefaultRegistrantProfile requests.Boolean `position:"Query" name:"DefaultRegistrantProfile"`
 	ZhCity                   string           `position:"Query" name:"ZhCity"`

+ 21 - 0
services/domain/struct_dns_list_in_query_domain_by_domain_name.go

@@ -0,0 +1,21 @@
+package domain
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+// DnsListInQueryDomainByDomainName is a nested struct in domain response
+type DnsListInQueryDomainByDomainName struct {
+	Dns []string `json:"Dns" xml:"Dns"`
+}

+ 1 - 0
services/domain/struct_registrant_profile.go

@@ -40,4 +40,5 @@ type RegistrantProfile struct {
 	ZhAddress                string `json:"ZhAddress" xml:"ZhAddress"`
 	RegistrantType           string `json:"RegistrantType" xml:"RegistrantType"`
 	RealNameStatus           string `json:"RealNameStatus" xml:"RealNameStatus"`
+	RegistrantProfileType    string `json:"RegistrantProfileType" xml:"RegistrantProfileType"`
 }

+ 1 - 0
services/domain/verify_contact_field.go

@@ -82,6 +82,7 @@ type VerifyContactFieldRequest struct {
 	City                     string `position:"Query" name:"City"`
 	ZhAddress                string `position:"Query" name:"ZhAddress"`
 	RegistrantType           string `position:"Query" name:"RegistrantType"`
+	DomainName               string `position:"Query" name:"DomainName"`
 	Telephone                string `position:"Query" name:"Telephone"`
 	ZhCity                   string `position:"Query" name:"ZhCity"`
 	ZhProvince               string `position:"Query" name:"ZhProvince"`