本文整理汇总了Golang中github.com/aws/aws-sdk-go/service/route53domains.New函数的典型用法代码示例。如果您正苦于以下问题:Golang New函数的具体用法?Golang New怎么用?Golang New使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了New函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Golang代码示例。
示例1: ExampleRoute53Domains_DisableDomainAutoRenew
func ExampleRoute53Domains_DisableDomainAutoRenew() {
svc := route53domains.New(nil)
params := &route53domains.DisableDomainAutoRenewInput{
DomainName: aws.String("DomainName"), // Required
}
resp, err := svc.DisableDomainAutoRenew(params)
if err != nil {
if awsErr, ok := err.(awserr.Error); ok {
// Generic AWS error with Code, Message, and original error (if any)
fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
if reqErr, ok := err.(awserr.RequestFailure); ok {
// A service error occurred
fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
}
} else {
// This case should never be hit, the SDK should always return an
// error which satisfies the awserr.Error interface.
fmt.Println(err.Error())
}
}
// Pretty-print the response data.
fmt.Println(awsutil.StringValue(resp))
}
开发者ID:reyco,项目名称:aws-sdk-go,代码行数:26,代码来源:examples_test.go
示例2: ExampleRoute53Domains_UpdateTagsForDomain
func ExampleRoute53Domains_UpdateTagsForDomain() {
svc := route53domains.New(nil)
params := &route53domains.UpdateTagsForDomainInput{
DomainName: aws.String("DomainName"), // Required
TagsToUpdate: []*route53domains.Tag{
{ // Required
Key: aws.String("TagKey"),
Value: aws.String("TagValue"),
},
// More values...
},
}
resp, err := svc.UpdateTagsForDomain(params)
if err != nil {
if awsErr, ok := err.(awserr.Error); ok {
// Generic AWS Error with Code, Message, and original error (if any)
fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
if reqErr, ok := err.(awserr.RequestFailure); ok {
// A service error occurred
fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
}
} else {
// This case should never be hit, the SDK should always return an
// error which satisfies the awserr.Error interface.
fmt.Println(err.Error())
}
}
// Pretty-print the response data.
fmt.Println(awsutil.StringValue(resp))
}
开发者ID:jasonmoo,项目名称:aws-sdk-go,代码行数:33,代码来源:examples_test.go
示例3: ExampleRoute53Domains_UpdateDomainNameservers
func ExampleRoute53Domains_UpdateDomainNameservers() {
svc := route53domains.New(nil)
params := &route53domains.UpdateDomainNameserversInput{
DomainName: aws.String("DomainName"), // Required
Nameservers: []*route53domains.Nameserver{ // Required
{ // Required
Name: aws.String("HostName"), // Required
GlueIps: []*string{
aws.String("GlueIp"), // Required
// More values...
},
},
// More values...
},
FIAuthKey: aws.String("FIAuthKey"),
}
resp, err := svc.UpdateDomainNameservers(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
开发者ID:jloper3,项目名称:amazon-ecs-cli,代码行数:29,代码来源:examples_test.go
示例4: ExampleRoute53Domains_UpdateDomainContactPrivacy
func ExampleRoute53Domains_UpdateDomainContactPrivacy() {
sess, err := session.NewSession()
if err != nil {
fmt.Println("failed to create session,", err)
return
}
svc := route53domains.New(sess)
params := &route53domains.UpdateDomainContactPrivacyInput{
DomainName: aws.String("DomainName"), // Required
AdminPrivacy: aws.Bool(true),
RegistrantPrivacy: aws.Bool(true),
TechPrivacy: aws.Bool(true),
}
resp, err := svc.UpdateDomainContactPrivacy(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
开发者ID:acquia,项目名称:fifo2kinesis,代码行数:27,代码来源:examples_test.go
示例5: ExampleRoute53Domains_ViewBilling
func ExampleRoute53Domains_ViewBilling() {
sess, err := session.NewSession()
if err != nil {
fmt.Println("failed to create session,", err)
return
}
svc := route53domains.New(sess)
params := &route53domains.ViewBillingInput{
End: aws.Time(time.Now()),
Marker: aws.String("PageMarker"),
MaxItems: aws.Int64(1),
Start: aws.Time(time.Now()),
}
resp, err := svc.ViewBilling(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
开发者ID:acquia,项目名称:fifo2kinesis,代码行数:27,代码来源:examples_test.go
示例6: ExampleRoute53Domains_DeleteTagsForDomain
func ExampleRoute53Domains_DeleteTagsForDomain() {
sess, err := session.NewSession()
if err != nil {
fmt.Println("failed to create session,", err)
return
}
svc := route53domains.New(sess)
params := &route53domains.DeleteTagsForDomainInput{
DomainName: aws.String("DomainName"), // Required
TagsToDelete: []*string{ // Required
aws.String("TagKey"), // Required
// More values...
},
}
resp, err := svc.DeleteTagsForDomain(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
开发者ID:acquia,项目名称:fifo2kinesis,代码行数:28,代码来源:examples_test.go
示例7: ExampleRoute53Domains_RenewDomain
func ExampleRoute53Domains_RenewDomain() {
sess, err := session.NewSession()
if err != nil {
fmt.Println("failed to create session,", err)
return
}
svc := route53domains.New(sess)
params := &route53domains.RenewDomainInput{
CurrentExpiryYear: aws.Int64(1), // Required
DomainName: aws.String("DomainName"), // Required
DurationInYears: aws.Int64(1),
}
resp, err := svc.RenewDomain(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
开发者ID:acquia,项目名称:fifo2kinesis,代码行数:26,代码来源:examples_test.go
示例8: ExampleRoute53Domains_GetDomainSuggestions
func ExampleRoute53Domains_GetDomainSuggestions() {
sess, err := session.NewSession()
if err != nil {
fmt.Println("failed to create session,", err)
return
}
svc := route53domains.New(sess)
params := &route53domains.GetDomainSuggestionsInput{
DomainName: aws.String("DomainName"), // Required
OnlyAvailable: aws.Bool(true), // Required
SuggestionCount: aws.Int64(1), // Required
}
resp, err := svc.GetDomainSuggestions(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
开发者ID:acquia,项目名称:fifo2kinesis,代码行数:26,代码来源:examples_test.go
示例9: ExampleRoute53Domains_UpdateTagsForDomain
func ExampleRoute53Domains_UpdateTagsForDomain() {
svc := route53domains.New(nil)
params := &route53domains.UpdateTagsForDomainInput{
DomainName: aws.String("DomainName"), // Required
TagsToUpdate: []*route53domains.Tag{
{ // Required
Key: aws.String("TagKey"),
Value: aws.String("TagValue"),
},
// More values...
},
}
resp, err := svc.UpdateTagsForDomain(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
开发者ID:jloper3,项目名称:amazon-ecs-cli,代码行数:25,代码来源:examples_test.go
示例10: ExampleRoute53Domains_CheckDomainAvailability
func ExampleRoute53Domains_CheckDomainAvailability() {
sess, err := session.NewSession()
if err != nil {
fmt.Println("failed to create session,", err)
return
}
svc := route53domains.New(sess)
params := &route53domains.CheckDomainAvailabilityInput{
DomainName: aws.String("DomainName"), // Required
IdnLangCode: aws.String("LangCode"),
}
resp, err := svc.CheckDomainAvailability(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
开发者ID:acquia,项目名称:fifo2kinesis,代码行数:25,代码来源:examples_test.go
示例11: ExampleRoute53Domains_ListOperations
func ExampleRoute53Domains_ListOperations() {
svc := route53domains.New(nil)
params := &route53domains.ListOperationsInput{
Marker: aws.String("PageMarker"),
MaxItems: aws.Long(1),
}
resp, err := svc.ListOperations(params)
if err != nil {
if awsErr, ok := err.(awserr.Error); ok {
// Generic AWS error with Code, Message, and original error (if any)
fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
if reqErr, ok := err.(awserr.RequestFailure); ok {
// A service error occurred
fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
}
} else {
// This case should never be hit, the SDK should always return an
// error which satisfies the awserr.Error interface.
fmt.Println(err.Error())
}
}
// Pretty-print the response data.
fmt.Println(awsutil.StringValue(resp))
}
开发者ID:reyco,项目名称:aws-sdk-go,代码行数:27,代码来源:examples_test.go
示例12: ExampleRoute53Domains_UpdateDomainContactPrivacy
func ExampleRoute53Domains_UpdateDomainContactPrivacy() {
svc := route53domains.New(nil)
params := &route53domains.UpdateDomainContactPrivacyInput{
DomainName: aws.String("DomainName"), // Required
AdminPrivacy: aws.Bool(true),
RegistrantPrivacy: aws.Bool(true),
TechPrivacy: aws.Bool(true),
}
resp, err := svc.UpdateDomainContactPrivacy(params)
if err != nil {
if awsErr, ok := err.(awserr.Error); ok {
// Generic AWS error with Code, Message, and original error (if any)
fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
if reqErr, ok := err.(awserr.RequestFailure); ok {
// A service error occurred
fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
}
} else {
// This case should never be hit, the SDK should always return an
// error which satisfies the awserr.Error interface.
fmt.Println(err.Error())
}
}
// Pretty-print the response data.
fmt.Println(awsutil.Prettify(resp))
}
开发者ID:Talos208,项目名称:aws-sdk-go,代码行数:29,代码来源:examples_test.go
示例13: ExampleRoute53Domains_ResendContactReachabilityEmail
func ExampleRoute53Domains_ResendContactReachabilityEmail() {
svc := route53domains.New(session.New())
params := &route53domains.ResendContactReachabilityEmailInput{
DomainName: aws.String("DomainName"),
}
resp, err := svc.ResendContactReachabilityEmail(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
开发者ID:ColourboxDevelopment,项目名称:aws-sdk-go,代码行数:18,代码来源:examples_test.go
示例14: ExampleRoute53Domains_EnableDomainAutoRenew
func ExampleRoute53Domains_EnableDomainAutoRenew() {
svc := route53domains.New(nil)
params := &route53domains.EnableDomainAutoRenewInput{
DomainName: aws.String("DomainName"), // Required
}
resp, err := svc.EnableDomainAutoRenew(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
开发者ID:jloper3,项目名称:amazon-ecs-cli,代码行数:18,代码来源:examples_test.go
示例15: ExampleRoute53Domains_GetOperationDetail
func ExampleRoute53Domains_GetOperationDetail() {
svc := route53domains.New(nil)
params := &route53domains.GetOperationDetailInput{
OperationId: aws.String("OperationId"), // Required
}
resp, err := svc.GetOperationDetail(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
开发者ID:jloper3,项目名称:amazon-ecs-cli,代码行数:18,代码来源:examples_test.go
示例16: ExampleRoute53Domains_ListTagsForDomain
func ExampleRoute53Domains_ListTagsForDomain() {
svc := route53domains.New(session.New())
params := &route53domains.ListTagsForDomainInput{
DomainName: aws.String("DomainName"), // Required
}
resp, err := svc.ListTagsForDomain(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
开发者ID:CNDonny,项目名称:scope,代码行数:18,代码来源:examples_test.go
示例17: ExampleRoute53Domains_ListOperations
func ExampleRoute53Domains_ListOperations() {
svc := route53domains.New(nil)
params := &route53domains.ListOperationsInput{
Marker: aws.String("PageMarker"),
MaxItems: aws.Int64(1),
}
resp, err := svc.ListOperations(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
开发者ID:jloper3,项目名称:amazon-ecs-cli,代码行数:19,代码来源:examples_test.go
示例18: ExampleRoute53Domains_UpdateDomainNameservers
func ExampleRoute53Domains_UpdateDomainNameservers() {
svc := route53domains.New(nil)
params := &route53domains.UpdateDomainNameserversInput{
DomainName: aws.String("DomainName"), // Required
Nameservers: []*route53domains.Nameserver{ // Required
{ // Required
Name: aws.String("HostName"), // Required
GlueIPs: []*string{
aws.String("GlueIp"), // Required
// More values...
},
},
// More values...
},
FIAuthKey: aws.String("FIAuthKey"),
}
resp, err := svc.UpdateDomainNameservers(params)
if err != nil {
if awsErr, ok := err.(awserr.Error); ok {
// Generic AWS error with Code, Message, and original error (if any)
fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
if reqErr, ok := err.(awserr.RequestFailure); ok {
// A service error occurred
fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
}
} else {
// This case should never be hit, the SDK should always return an
// error which satisfies the awserr.Error interface.
fmt.Println(err.Error())
}
}
// Pretty-print the response data.
fmt.Println(awsutil.Prettify(resp))
}
开发者ID:Talos208,项目名称:aws-sdk-go,代码行数:37,代码来源:examples_test.go
示例19: ExampleRoute53Domains_GetContactReachabilityStatus
func ExampleRoute53Domains_GetContactReachabilityStatus() {
sess, err := session.NewSession()
if err != nil {
fmt.Println("failed to create session,", err)
return
}
svc := route53domains.New(sess)
params := &route53domains.GetContactReachabilityStatusInput{
DomainName: aws.String("DomainName"),
}
resp, err := svc.GetContactReachabilityStatus(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
开发者ID:acquia,项目名称:fifo2kinesis,代码行数:24,代码来源:examples_test.go
示例20: ExampleRoute53Domains_DisableDomainTransferLock
func ExampleRoute53Domains_DisableDomainTransferLock() {
sess, err := session.NewSession()
if err != nil {
fmt.Println("failed to create session,", err)
return
}
svc := route53domains.New(sess)
params := &route53domains.DisableDomainTransferLockInput{
DomainName: aws.String("DomainName"), // Required
}
resp, err := svc.DisableDomainTransferLock(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
开发者ID:acquia,项目名称:fifo2kinesis,代码行数:24,代码来源:examples_test.go
注:本文中的github.com/aws/aws-sdk-go/service/route53domains.New函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论