Switch to using the dep tool and update all the dependencies
This commit is contained in:
+6105
File diff suppressed because it is too large
Load Diff
+81
@@ -0,0 +1,81 @@
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package route53domains provides the client and types for making API
|
||||
// requests to Amazon Route 53 Domains.
|
||||
//
|
||||
// Amazon Route 53 API actions let you register domain names and perform related
|
||||
// operations.
|
||||
//
|
||||
// See https://docs.aws.amazon.com/goto/WebAPI/route53domains-2014-05-15 for more information on this service.
|
||||
//
|
||||
// See route53domains package documentation for more information.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/route53domains/
|
||||
//
|
||||
// Using the Client
|
||||
//
|
||||
// To use the client for Amazon Route 53 Domains you will first need
|
||||
// to create a new instance of it.
|
||||
//
|
||||
// When creating a client for an AWS service you'll first need to have a Session
|
||||
// already created. The Session provides configuration that can be shared
|
||||
// between multiple service clients. Additional configuration can be applied to
|
||||
// the Session and service's client when they are constructed. The aws package's
|
||||
// Config type contains several fields such as Region for the AWS Region the
|
||||
// client should make API requests too. The optional Config value can be provided
|
||||
// as the variadic argument for Sessions and client creation.
|
||||
//
|
||||
// Once the service's client is created you can use it to make API requests the
|
||||
// AWS service. These clients are safe to use concurrently.
|
||||
//
|
||||
// // Create a session to share configuration, and load external configuration.
|
||||
// sess := session.Must(session.NewSession())
|
||||
//
|
||||
// // Create the service's client with the session.
|
||||
// svc := route53domains.New(sess)
|
||||
//
|
||||
// See the SDK's documentation for more information on how to use service clients.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/
|
||||
//
|
||||
// See aws package's Config type for more information on configuration options.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
|
||||
//
|
||||
// See the Amazon Route 53 Domains client Route53Domains for more
|
||||
// information on creating the service's client.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/route53domains/#New
|
||||
//
|
||||
// Once the client is created you can make an API request to the service.
|
||||
// Each API method takes a input parameter, and returns the service response
|
||||
// and an error.
|
||||
//
|
||||
// The API method will document which error codes the service can be returned
|
||||
// by the operation if the service models the API operation's errors. These
|
||||
// errors will also be available as const strings prefixed with "ErrCode".
|
||||
//
|
||||
// result, err := svc.CheckDomainAvailability(params)
|
||||
// if err != nil {
|
||||
// // Cast err to awserr.Error to handle specific error codes.
|
||||
// aerr, ok := err.(awserr.Error)
|
||||
// if ok && aerr.Code() == <error code to check for> {
|
||||
// // Specific error code handling
|
||||
// }
|
||||
// return err
|
||||
// }
|
||||
//
|
||||
// fmt.Println("CheckDomainAvailability result:")
|
||||
// fmt.Println(result)
|
||||
//
|
||||
// Using the Client with Context
|
||||
//
|
||||
// The service's client also provides methods to make API requests with a Context
|
||||
// value. This allows you to control the timeout, and cancellation of pending
|
||||
// requests. These methods also take request Option as variadic parameter to apply
|
||||
// additional configuration to the API request.
|
||||
//
|
||||
// ctx := context.Background()
|
||||
//
|
||||
// result, err := svc.CheckDomainAvailabilityWithContext(ctx, params)
|
||||
//
|
||||
// See the request package documentation for more information on using Context pattern
|
||||
// with the SDK.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/aws/request/
|
||||
package route53domains
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package route53domains
|
||||
|
||||
const (
|
||||
|
||||
// ErrCodeDomainLimitExceeded for service response error code
|
||||
// "DomainLimitExceeded".
|
||||
//
|
||||
// The number of domains has exceeded the allowed threshold for the account.
|
||||
ErrCodeDomainLimitExceeded = "DomainLimitExceeded"
|
||||
|
||||
// ErrCodeDuplicateRequest for service response error code
|
||||
// "DuplicateRequest".
|
||||
//
|
||||
// The request is already in progress for the domain.
|
||||
ErrCodeDuplicateRequest = "DuplicateRequest"
|
||||
|
||||
// ErrCodeInvalidInput for service response error code
|
||||
// "InvalidInput".
|
||||
//
|
||||
// The requested item is not acceptable. For example, for an OperationId it
|
||||
// may refer to the ID of an operation that is already completed. For a domain
|
||||
// name, it may not be a valid domain name or belong to the requester account.
|
||||
ErrCodeInvalidInput = "InvalidInput"
|
||||
|
||||
// ErrCodeOperationLimitExceeded for service response error code
|
||||
// "OperationLimitExceeded".
|
||||
//
|
||||
// The number of operations or jobs running exceeded the allowed threshold for
|
||||
// the account.
|
||||
ErrCodeOperationLimitExceeded = "OperationLimitExceeded"
|
||||
|
||||
// ErrCodeTLDRulesViolation for service response error code
|
||||
// "TLDRulesViolation".
|
||||
//
|
||||
// The top-level domain does not support this operation.
|
||||
ErrCodeTLDRulesViolation = "TLDRulesViolation"
|
||||
|
||||
// ErrCodeUnsupportedTLD for service response error code
|
||||
// "UnsupportedTLD".
|
||||
//
|
||||
// Amazon Route 53 does not support this top-level domain.
|
||||
ErrCodeUnsupportedTLD = "UnsupportedTLD"
|
||||
)
|
||||
+755
@@ -0,0 +1,755 @@
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package route53domains_test
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/session"
|
||||
"github.com/aws/aws-sdk-go/service/route53domains"
|
||||
)
|
||||
|
||||
var _ time.Duration
|
||||
var _ bytes.Buffer
|
||||
|
||||
func ExampleRoute53Domains_CheckDomainAvailability() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
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)
|
||||
}
|
||||
|
||||
func ExampleRoute53Domains_DeleteTagsForDomain() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
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)
|
||||
}
|
||||
|
||||
func ExampleRoute53Domains_DisableDomainAutoRenew() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := route53domains.New(sess)
|
||||
|
||||
params := &route53domains.DisableDomainAutoRenewInput{
|
||||
DomainName: aws.String("DomainName"), // Required
|
||||
}
|
||||
resp, err := svc.DisableDomainAutoRenew(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)
|
||||
}
|
||||
|
||||
func ExampleRoute53Domains_DisableDomainTransferLock() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
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)
|
||||
}
|
||||
|
||||
func ExampleRoute53Domains_EnableDomainAutoRenew() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := route53domains.New(sess)
|
||||
|
||||
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)
|
||||
}
|
||||
|
||||
func ExampleRoute53Domains_EnableDomainTransferLock() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := route53domains.New(sess)
|
||||
|
||||
params := &route53domains.EnableDomainTransferLockInput{
|
||||
DomainName: aws.String("DomainName"), // Required
|
||||
}
|
||||
resp, err := svc.EnableDomainTransferLock(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)
|
||||
}
|
||||
|
||||
func ExampleRoute53Domains_GetContactReachabilityStatus() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
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)
|
||||
}
|
||||
|
||||
func ExampleRoute53Domains_GetDomainDetail() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := route53domains.New(sess)
|
||||
|
||||
params := &route53domains.GetDomainDetailInput{
|
||||
DomainName: aws.String("DomainName"), // Required
|
||||
}
|
||||
resp, err := svc.GetDomainDetail(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)
|
||||
}
|
||||
|
||||
func ExampleRoute53Domains_GetDomainSuggestions() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
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)
|
||||
}
|
||||
|
||||
func ExampleRoute53Domains_GetOperationDetail() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := route53domains.New(sess)
|
||||
|
||||
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)
|
||||
}
|
||||
|
||||
func ExampleRoute53Domains_ListDomains() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := route53domains.New(sess)
|
||||
|
||||
params := &route53domains.ListDomainsInput{
|
||||
Marker: aws.String("PageMarker"),
|
||||
MaxItems: aws.Int64(1),
|
||||
}
|
||||
resp, err := svc.ListDomains(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)
|
||||
}
|
||||
|
||||
func ExampleRoute53Domains_ListOperations() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := route53domains.New(sess)
|
||||
|
||||
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)
|
||||
}
|
||||
|
||||
func ExampleRoute53Domains_ListTagsForDomain() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := route53domains.New(sess)
|
||||
|
||||
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)
|
||||
}
|
||||
|
||||
func ExampleRoute53Domains_RegisterDomain() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := route53domains.New(sess)
|
||||
|
||||
params := &route53domains.RegisterDomainInput{
|
||||
AdminContact: &route53domains.ContactDetail{ // Required
|
||||
AddressLine1: aws.String("AddressLine"),
|
||||
AddressLine2: aws.String("AddressLine"),
|
||||
City: aws.String("City"),
|
||||
ContactType: aws.String("ContactType"),
|
||||
CountryCode: aws.String("CountryCode"),
|
||||
Email: aws.String("Email"),
|
||||
ExtraParams: []*route53domains.ExtraParam{
|
||||
{ // Required
|
||||
Name: aws.String("ExtraParamName"), // Required
|
||||
Value: aws.String("ExtraParamValue"), // Required
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
Fax: aws.String("ContactNumber"),
|
||||
FirstName: aws.String("ContactName"),
|
||||
LastName: aws.String("ContactName"),
|
||||
OrganizationName: aws.String("ContactName"),
|
||||
PhoneNumber: aws.String("ContactNumber"),
|
||||
State: aws.String("State"),
|
||||
ZipCode: aws.String("ZipCode"),
|
||||
},
|
||||
DomainName: aws.String("DomainName"), // Required
|
||||
DurationInYears: aws.Int64(1), // Required
|
||||
RegistrantContact: &route53domains.ContactDetail{ // Required
|
||||
AddressLine1: aws.String("AddressLine"),
|
||||
AddressLine2: aws.String("AddressLine"),
|
||||
City: aws.String("City"),
|
||||
ContactType: aws.String("ContactType"),
|
||||
CountryCode: aws.String("CountryCode"),
|
||||
Email: aws.String("Email"),
|
||||
ExtraParams: []*route53domains.ExtraParam{
|
||||
{ // Required
|
||||
Name: aws.String("ExtraParamName"), // Required
|
||||
Value: aws.String("ExtraParamValue"), // Required
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
Fax: aws.String("ContactNumber"),
|
||||
FirstName: aws.String("ContactName"),
|
||||
LastName: aws.String("ContactName"),
|
||||
OrganizationName: aws.String("ContactName"),
|
||||
PhoneNumber: aws.String("ContactNumber"),
|
||||
State: aws.String("State"),
|
||||
ZipCode: aws.String("ZipCode"),
|
||||
},
|
||||
TechContact: &route53domains.ContactDetail{ // Required
|
||||
AddressLine1: aws.String("AddressLine"),
|
||||
AddressLine2: aws.String("AddressLine"),
|
||||
City: aws.String("City"),
|
||||
ContactType: aws.String("ContactType"),
|
||||
CountryCode: aws.String("CountryCode"),
|
||||
Email: aws.String("Email"),
|
||||
ExtraParams: []*route53domains.ExtraParam{
|
||||
{ // Required
|
||||
Name: aws.String("ExtraParamName"), // Required
|
||||
Value: aws.String("ExtraParamValue"), // Required
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
Fax: aws.String("ContactNumber"),
|
||||
FirstName: aws.String("ContactName"),
|
||||
LastName: aws.String("ContactName"),
|
||||
OrganizationName: aws.String("ContactName"),
|
||||
PhoneNumber: aws.String("ContactNumber"),
|
||||
State: aws.String("State"),
|
||||
ZipCode: aws.String("ZipCode"),
|
||||
},
|
||||
AutoRenew: aws.Bool(true),
|
||||
IdnLangCode: aws.String("LangCode"),
|
||||
PrivacyProtectAdminContact: aws.Bool(true),
|
||||
PrivacyProtectRegistrantContact: aws.Bool(true),
|
||||
PrivacyProtectTechContact: aws.Bool(true),
|
||||
}
|
||||
resp, err := svc.RegisterDomain(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)
|
||||
}
|
||||
|
||||
func ExampleRoute53Domains_RenewDomain() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
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)
|
||||
}
|
||||
|
||||
func ExampleRoute53Domains_ResendContactReachabilityEmail() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := route53domains.New(sess)
|
||||
|
||||
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)
|
||||
}
|
||||
|
||||
func ExampleRoute53Domains_RetrieveDomainAuthCode() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := route53domains.New(sess)
|
||||
|
||||
params := &route53domains.RetrieveDomainAuthCodeInput{
|
||||
DomainName: aws.String("DomainName"), // Required
|
||||
}
|
||||
resp, err := svc.RetrieveDomainAuthCode(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)
|
||||
}
|
||||
|
||||
func ExampleRoute53Domains_TransferDomain() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := route53domains.New(sess)
|
||||
|
||||
params := &route53domains.TransferDomainInput{
|
||||
AdminContact: &route53domains.ContactDetail{ // Required
|
||||
AddressLine1: aws.String("AddressLine"),
|
||||
AddressLine2: aws.String("AddressLine"),
|
||||
City: aws.String("City"),
|
||||
ContactType: aws.String("ContactType"),
|
||||
CountryCode: aws.String("CountryCode"),
|
||||
Email: aws.String("Email"),
|
||||
ExtraParams: []*route53domains.ExtraParam{
|
||||
{ // Required
|
||||
Name: aws.String("ExtraParamName"), // Required
|
||||
Value: aws.String("ExtraParamValue"), // Required
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
Fax: aws.String("ContactNumber"),
|
||||
FirstName: aws.String("ContactName"),
|
||||
LastName: aws.String("ContactName"),
|
||||
OrganizationName: aws.String("ContactName"),
|
||||
PhoneNumber: aws.String("ContactNumber"),
|
||||
State: aws.String("State"),
|
||||
ZipCode: aws.String("ZipCode"),
|
||||
},
|
||||
DomainName: aws.String("DomainName"), // Required
|
||||
DurationInYears: aws.Int64(1), // Required
|
||||
RegistrantContact: &route53domains.ContactDetail{ // Required
|
||||
AddressLine1: aws.String("AddressLine"),
|
||||
AddressLine2: aws.String("AddressLine"),
|
||||
City: aws.String("City"),
|
||||
ContactType: aws.String("ContactType"),
|
||||
CountryCode: aws.String("CountryCode"),
|
||||
Email: aws.String("Email"),
|
||||
ExtraParams: []*route53domains.ExtraParam{
|
||||
{ // Required
|
||||
Name: aws.String("ExtraParamName"), // Required
|
||||
Value: aws.String("ExtraParamValue"), // Required
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
Fax: aws.String("ContactNumber"),
|
||||
FirstName: aws.String("ContactName"),
|
||||
LastName: aws.String("ContactName"),
|
||||
OrganizationName: aws.String("ContactName"),
|
||||
PhoneNumber: aws.String("ContactNumber"),
|
||||
State: aws.String("State"),
|
||||
ZipCode: aws.String("ZipCode"),
|
||||
},
|
||||
TechContact: &route53domains.ContactDetail{ // Required
|
||||
AddressLine1: aws.String("AddressLine"),
|
||||
AddressLine2: aws.String("AddressLine"),
|
||||
City: aws.String("City"),
|
||||
ContactType: aws.String("ContactType"),
|
||||
CountryCode: aws.String("CountryCode"),
|
||||
Email: aws.String("Email"),
|
||||
ExtraParams: []*route53domains.ExtraParam{
|
||||
{ // Required
|
||||
Name: aws.String("ExtraParamName"), // Required
|
||||
Value: aws.String("ExtraParamValue"), // Required
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
Fax: aws.String("ContactNumber"),
|
||||
FirstName: aws.String("ContactName"),
|
||||
LastName: aws.String("ContactName"),
|
||||
OrganizationName: aws.String("ContactName"),
|
||||
PhoneNumber: aws.String("ContactNumber"),
|
||||
State: aws.String("State"),
|
||||
ZipCode: aws.String("ZipCode"),
|
||||
},
|
||||
AuthCode: aws.String("DomainAuthCode"),
|
||||
AutoRenew: aws.Bool(true),
|
||||
IdnLangCode: aws.String("LangCode"),
|
||||
Nameservers: []*route53domains.Nameserver{
|
||||
{ // Required
|
||||
Name: aws.String("HostName"), // Required
|
||||
GlueIps: []*string{
|
||||
aws.String("GlueIp"), // Required
|
||||
// More values...
|
||||
},
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
PrivacyProtectAdminContact: aws.Bool(true),
|
||||
PrivacyProtectRegistrantContact: aws.Bool(true),
|
||||
PrivacyProtectTechContact: aws.Bool(true),
|
||||
}
|
||||
resp, err := svc.TransferDomain(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)
|
||||
}
|
||||
|
||||
func ExampleRoute53Domains_UpdateDomainContact() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := route53domains.New(sess)
|
||||
|
||||
params := &route53domains.UpdateDomainContactInput{
|
||||
DomainName: aws.String("DomainName"), // Required
|
||||
AdminContact: &route53domains.ContactDetail{
|
||||
AddressLine1: aws.String("AddressLine"),
|
||||
AddressLine2: aws.String("AddressLine"),
|
||||
City: aws.String("City"),
|
||||
ContactType: aws.String("ContactType"),
|
||||
CountryCode: aws.String("CountryCode"),
|
||||
Email: aws.String("Email"),
|
||||
ExtraParams: []*route53domains.ExtraParam{
|
||||
{ // Required
|
||||
Name: aws.String("ExtraParamName"), // Required
|
||||
Value: aws.String("ExtraParamValue"), // Required
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
Fax: aws.String("ContactNumber"),
|
||||
FirstName: aws.String("ContactName"),
|
||||
LastName: aws.String("ContactName"),
|
||||
OrganizationName: aws.String("ContactName"),
|
||||
PhoneNumber: aws.String("ContactNumber"),
|
||||
State: aws.String("State"),
|
||||
ZipCode: aws.String("ZipCode"),
|
||||
},
|
||||
RegistrantContact: &route53domains.ContactDetail{
|
||||
AddressLine1: aws.String("AddressLine"),
|
||||
AddressLine2: aws.String("AddressLine"),
|
||||
City: aws.String("City"),
|
||||
ContactType: aws.String("ContactType"),
|
||||
CountryCode: aws.String("CountryCode"),
|
||||
Email: aws.String("Email"),
|
||||
ExtraParams: []*route53domains.ExtraParam{
|
||||
{ // Required
|
||||
Name: aws.String("ExtraParamName"), // Required
|
||||
Value: aws.String("ExtraParamValue"), // Required
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
Fax: aws.String("ContactNumber"),
|
||||
FirstName: aws.String("ContactName"),
|
||||
LastName: aws.String("ContactName"),
|
||||
OrganizationName: aws.String("ContactName"),
|
||||
PhoneNumber: aws.String("ContactNumber"),
|
||||
State: aws.String("State"),
|
||||
ZipCode: aws.String("ZipCode"),
|
||||
},
|
||||
TechContact: &route53domains.ContactDetail{
|
||||
AddressLine1: aws.String("AddressLine"),
|
||||
AddressLine2: aws.String("AddressLine"),
|
||||
City: aws.String("City"),
|
||||
ContactType: aws.String("ContactType"),
|
||||
CountryCode: aws.String("CountryCode"),
|
||||
Email: aws.String("Email"),
|
||||
ExtraParams: []*route53domains.ExtraParam{
|
||||
{ // Required
|
||||
Name: aws.String("ExtraParamName"), // Required
|
||||
Value: aws.String("ExtraParamValue"), // Required
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
Fax: aws.String("ContactNumber"),
|
||||
FirstName: aws.String("ContactName"),
|
||||
LastName: aws.String("ContactName"),
|
||||
OrganizationName: aws.String("ContactName"),
|
||||
PhoneNumber: aws.String("ContactNumber"),
|
||||
State: aws.String("State"),
|
||||
ZipCode: aws.String("ZipCode"),
|
||||
},
|
||||
}
|
||||
resp, err := svc.UpdateDomainContact(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)
|
||||
}
|
||||
|
||||
func ExampleRoute53Domains_UpdateDomainContactPrivacy() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
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)
|
||||
}
|
||||
|
||||
func ExampleRoute53Domains_UpdateDomainNameservers() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := route53domains.New(sess)
|
||||
|
||||
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)
|
||||
}
|
||||
|
||||
func ExampleRoute53Domains_UpdateTagsForDomain() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := route53domains.New(sess)
|
||||
|
||||
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)
|
||||
}
|
||||
|
||||
func ExampleRoute53Domains_ViewBilling() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
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)
|
||||
}
|
||||
Generated
Vendored
+162
@@ -0,0 +1,162 @@
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package route53domainsiface provides an interface to enable mocking the Amazon Route 53 Domains service client
|
||||
// for testing your code.
|
||||
//
|
||||
// It is important to note that this interface will have breaking changes
|
||||
// when the service model is updated and adds new API operations, paginators,
|
||||
// and waiters.
|
||||
package route53domainsiface
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
"github.com/aws/aws-sdk-go/service/route53domains"
|
||||
)
|
||||
|
||||
// Route53DomainsAPI provides an interface to enable mocking the
|
||||
// route53domains.Route53Domains service client's API operation,
|
||||
// paginators, and waiters. This make unit testing your code that calls out
|
||||
// to the SDK's service client's calls easier.
|
||||
//
|
||||
// The best way to use this interface is so the SDK's service client's calls
|
||||
// can be stubbed out for unit testing your code with the SDK without needing
|
||||
// to inject custom request handlers into the the SDK's request pipeline.
|
||||
//
|
||||
// // myFunc uses an SDK service client to make a request to
|
||||
// // Amazon Route 53 Domains.
|
||||
// func myFunc(svc route53domainsiface.Route53DomainsAPI) bool {
|
||||
// // Make svc.CheckDomainAvailability request
|
||||
// }
|
||||
//
|
||||
// func main() {
|
||||
// sess := session.New()
|
||||
// svc := route53domains.New(sess)
|
||||
//
|
||||
// myFunc(svc)
|
||||
// }
|
||||
//
|
||||
// In your _test.go file:
|
||||
//
|
||||
// // Define a mock struct to be used in your unit tests of myFunc.
|
||||
// type mockRoute53DomainsClient struct {
|
||||
// route53domainsiface.Route53DomainsAPI
|
||||
// }
|
||||
// func (m *mockRoute53DomainsClient) CheckDomainAvailability(input *route53domains.CheckDomainAvailabilityInput) (*route53domains.CheckDomainAvailabilityOutput, error) {
|
||||
// // mock response/functionality
|
||||
// }
|
||||
//
|
||||
// func TestMyFunc(t *testing.T) {
|
||||
// // Setup Test
|
||||
// mockSvc := &mockRoute53DomainsClient{}
|
||||
//
|
||||
// myfunc(mockSvc)
|
||||
//
|
||||
// // Verify myFunc's functionality
|
||||
// }
|
||||
//
|
||||
// It is important to note that this interface will have breaking changes
|
||||
// when the service model is updated and adds new API operations, paginators,
|
||||
// and waiters. Its suggested to use the pattern above for testing, or using
|
||||
// tooling to generate mocks to satisfy the interfaces.
|
||||
type Route53DomainsAPI interface {
|
||||
CheckDomainAvailability(*route53domains.CheckDomainAvailabilityInput) (*route53domains.CheckDomainAvailabilityOutput, error)
|
||||
CheckDomainAvailabilityWithContext(aws.Context, *route53domains.CheckDomainAvailabilityInput, ...request.Option) (*route53domains.CheckDomainAvailabilityOutput, error)
|
||||
CheckDomainAvailabilityRequest(*route53domains.CheckDomainAvailabilityInput) (*request.Request, *route53domains.CheckDomainAvailabilityOutput)
|
||||
|
||||
DeleteTagsForDomain(*route53domains.DeleteTagsForDomainInput) (*route53domains.DeleteTagsForDomainOutput, error)
|
||||
DeleteTagsForDomainWithContext(aws.Context, *route53domains.DeleteTagsForDomainInput, ...request.Option) (*route53domains.DeleteTagsForDomainOutput, error)
|
||||
DeleteTagsForDomainRequest(*route53domains.DeleteTagsForDomainInput) (*request.Request, *route53domains.DeleteTagsForDomainOutput)
|
||||
|
||||
DisableDomainAutoRenew(*route53domains.DisableDomainAutoRenewInput) (*route53domains.DisableDomainAutoRenewOutput, error)
|
||||
DisableDomainAutoRenewWithContext(aws.Context, *route53domains.DisableDomainAutoRenewInput, ...request.Option) (*route53domains.DisableDomainAutoRenewOutput, error)
|
||||
DisableDomainAutoRenewRequest(*route53domains.DisableDomainAutoRenewInput) (*request.Request, *route53domains.DisableDomainAutoRenewOutput)
|
||||
|
||||
DisableDomainTransferLock(*route53domains.DisableDomainTransferLockInput) (*route53domains.DisableDomainTransferLockOutput, error)
|
||||
DisableDomainTransferLockWithContext(aws.Context, *route53domains.DisableDomainTransferLockInput, ...request.Option) (*route53domains.DisableDomainTransferLockOutput, error)
|
||||
DisableDomainTransferLockRequest(*route53domains.DisableDomainTransferLockInput) (*request.Request, *route53domains.DisableDomainTransferLockOutput)
|
||||
|
||||
EnableDomainAutoRenew(*route53domains.EnableDomainAutoRenewInput) (*route53domains.EnableDomainAutoRenewOutput, error)
|
||||
EnableDomainAutoRenewWithContext(aws.Context, *route53domains.EnableDomainAutoRenewInput, ...request.Option) (*route53domains.EnableDomainAutoRenewOutput, error)
|
||||
EnableDomainAutoRenewRequest(*route53domains.EnableDomainAutoRenewInput) (*request.Request, *route53domains.EnableDomainAutoRenewOutput)
|
||||
|
||||
EnableDomainTransferLock(*route53domains.EnableDomainTransferLockInput) (*route53domains.EnableDomainTransferLockOutput, error)
|
||||
EnableDomainTransferLockWithContext(aws.Context, *route53domains.EnableDomainTransferLockInput, ...request.Option) (*route53domains.EnableDomainTransferLockOutput, error)
|
||||
EnableDomainTransferLockRequest(*route53domains.EnableDomainTransferLockInput) (*request.Request, *route53domains.EnableDomainTransferLockOutput)
|
||||
|
||||
GetContactReachabilityStatus(*route53domains.GetContactReachabilityStatusInput) (*route53domains.GetContactReachabilityStatusOutput, error)
|
||||
GetContactReachabilityStatusWithContext(aws.Context, *route53domains.GetContactReachabilityStatusInput, ...request.Option) (*route53domains.GetContactReachabilityStatusOutput, error)
|
||||
GetContactReachabilityStatusRequest(*route53domains.GetContactReachabilityStatusInput) (*request.Request, *route53domains.GetContactReachabilityStatusOutput)
|
||||
|
||||
GetDomainDetail(*route53domains.GetDomainDetailInput) (*route53domains.GetDomainDetailOutput, error)
|
||||
GetDomainDetailWithContext(aws.Context, *route53domains.GetDomainDetailInput, ...request.Option) (*route53domains.GetDomainDetailOutput, error)
|
||||
GetDomainDetailRequest(*route53domains.GetDomainDetailInput) (*request.Request, *route53domains.GetDomainDetailOutput)
|
||||
|
||||
GetDomainSuggestions(*route53domains.GetDomainSuggestionsInput) (*route53domains.GetDomainSuggestionsOutput, error)
|
||||
GetDomainSuggestionsWithContext(aws.Context, *route53domains.GetDomainSuggestionsInput, ...request.Option) (*route53domains.GetDomainSuggestionsOutput, error)
|
||||
GetDomainSuggestionsRequest(*route53domains.GetDomainSuggestionsInput) (*request.Request, *route53domains.GetDomainSuggestionsOutput)
|
||||
|
||||
GetOperationDetail(*route53domains.GetOperationDetailInput) (*route53domains.GetOperationDetailOutput, error)
|
||||
GetOperationDetailWithContext(aws.Context, *route53domains.GetOperationDetailInput, ...request.Option) (*route53domains.GetOperationDetailOutput, error)
|
||||
GetOperationDetailRequest(*route53domains.GetOperationDetailInput) (*request.Request, *route53domains.GetOperationDetailOutput)
|
||||
|
||||
ListDomains(*route53domains.ListDomainsInput) (*route53domains.ListDomainsOutput, error)
|
||||
ListDomainsWithContext(aws.Context, *route53domains.ListDomainsInput, ...request.Option) (*route53domains.ListDomainsOutput, error)
|
||||
ListDomainsRequest(*route53domains.ListDomainsInput) (*request.Request, *route53domains.ListDomainsOutput)
|
||||
|
||||
ListDomainsPages(*route53domains.ListDomainsInput, func(*route53domains.ListDomainsOutput, bool) bool) error
|
||||
ListDomainsPagesWithContext(aws.Context, *route53domains.ListDomainsInput, func(*route53domains.ListDomainsOutput, bool) bool, ...request.Option) error
|
||||
|
||||
ListOperations(*route53domains.ListOperationsInput) (*route53domains.ListOperationsOutput, error)
|
||||
ListOperationsWithContext(aws.Context, *route53domains.ListOperationsInput, ...request.Option) (*route53domains.ListOperationsOutput, error)
|
||||
ListOperationsRequest(*route53domains.ListOperationsInput) (*request.Request, *route53domains.ListOperationsOutput)
|
||||
|
||||
ListOperationsPages(*route53domains.ListOperationsInput, func(*route53domains.ListOperationsOutput, bool) bool) error
|
||||
ListOperationsPagesWithContext(aws.Context, *route53domains.ListOperationsInput, func(*route53domains.ListOperationsOutput, bool) bool, ...request.Option) error
|
||||
|
||||
ListTagsForDomain(*route53domains.ListTagsForDomainInput) (*route53domains.ListTagsForDomainOutput, error)
|
||||
ListTagsForDomainWithContext(aws.Context, *route53domains.ListTagsForDomainInput, ...request.Option) (*route53domains.ListTagsForDomainOutput, error)
|
||||
ListTagsForDomainRequest(*route53domains.ListTagsForDomainInput) (*request.Request, *route53domains.ListTagsForDomainOutput)
|
||||
|
||||
RegisterDomain(*route53domains.RegisterDomainInput) (*route53domains.RegisterDomainOutput, error)
|
||||
RegisterDomainWithContext(aws.Context, *route53domains.RegisterDomainInput, ...request.Option) (*route53domains.RegisterDomainOutput, error)
|
||||
RegisterDomainRequest(*route53domains.RegisterDomainInput) (*request.Request, *route53domains.RegisterDomainOutput)
|
||||
|
||||
RenewDomain(*route53domains.RenewDomainInput) (*route53domains.RenewDomainOutput, error)
|
||||
RenewDomainWithContext(aws.Context, *route53domains.RenewDomainInput, ...request.Option) (*route53domains.RenewDomainOutput, error)
|
||||
RenewDomainRequest(*route53domains.RenewDomainInput) (*request.Request, *route53domains.RenewDomainOutput)
|
||||
|
||||
ResendContactReachabilityEmail(*route53domains.ResendContactReachabilityEmailInput) (*route53domains.ResendContactReachabilityEmailOutput, error)
|
||||
ResendContactReachabilityEmailWithContext(aws.Context, *route53domains.ResendContactReachabilityEmailInput, ...request.Option) (*route53domains.ResendContactReachabilityEmailOutput, error)
|
||||
ResendContactReachabilityEmailRequest(*route53domains.ResendContactReachabilityEmailInput) (*request.Request, *route53domains.ResendContactReachabilityEmailOutput)
|
||||
|
||||
RetrieveDomainAuthCode(*route53domains.RetrieveDomainAuthCodeInput) (*route53domains.RetrieveDomainAuthCodeOutput, error)
|
||||
RetrieveDomainAuthCodeWithContext(aws.Context, *route53domains.RetrieveDomainAuthCodeInput, ...request.Option) (*route53domains.RetrieveDomainAuthCodeOutput, error)
|
||||
RetrieveDomainAuthCodeRequest(*route53domains.RetrieveDomainAuthCodeInput) (*request.Request, *route53domains.RetrieveDomainAuthCodeOutput)
|
||||
|
||||
TransferDomain(*route53domains.TransferDomainInput) (*route53domains.TransferDomainOutput, error)
|
||||
TransferDomainWithContext(aws.Context, *route53domains.TransferDomainInput, ...request.Option) (*route53domains.TransferDomainOutput, error)
|
||||
TransferDomainRequest(*route53domains.TransferDomainInput) (*request.Request, *route53domains.TransferDomainOutput)
|
||||
|
||||
UpdateDomainContact(*route53domains.UpdateDomainContactInput) (*route53domains.UpdateDomainContactOutput, error)
|
||||
UpdateDomainContactWithContext(aws.Context, *route53domains.UpdateDomainContactInput, ...request.Option) (*route53domains.UpdateDomainContactOutput, error)
|
||||
UpdateDomainContactRequest(*route53domains.UpdateDomainContactInput) (*request.Request, *route53domains.UpdateDomainContactOutput)
|
||||
|
||||
UpdateDomainContactPrivacy(*route53domains.UpdateDomainContactPrivacyInput) (*route53domains.UpdateDomainContactPrivacyOutput, error)
|
||||
UpdateDomainContactPrivacyWithContext(aws.Context, *route53domains.UpdateDomainContactPrivacyInput, ...request.Option) (*route53domains.UpdateDomainContactPrivacyOutput, error)
|
||||
UpdateDomainContactPrivacyRequest(*route53domains.UpdateDomainContactPrivacyInput) (*request.Request, *route53domains.UpdateDomainContactPrivacyOutput)
|
||||
|
||||
UpdateDomainNameservers(*route53domains.UpdateDomainNameserversInput) (*route53domains.UpdateDomainNameserversOutput, error)
|
||||
UpdateDomainNameserversWithContext(aws.Context, *route53domains.UpdateDomainNameserversInput, ...request.Option) (*route53domains.UpdateDomainNameserversOutput, error)
|
||||
UpdateDomainNameserversRequest(*route53domains.UpdateDomainNameserversInput) (*request.Request, *route53domains.UpdateDomainNameserversOutput)
|
||||
|
||||
UpdateTagsForDomain(*route53domains.UpdateTagsForDomainInput) (*route53domains.UpdateTagsForDomainOutput, error)
|
||||
UpdateTagsForDomainWithContext(aws.Context, *route53domains.UpdateTagsForDomainInput, ...request.Option) (*route53domains.UpdateTagsForDomainOutput, error)
|
||||
UpdateTagsForDomainRequest(*route53domains.UpdateTagsForDomainInput) (*request.Request, *route53domains.UpdateTagsForDomainOutput)
|
||||
|
||||
ViewBilling(*route53domains.ViewBillingInput) (*route53domains.ViewBillingOutput, error)
|
||||
ViewBillingWithContext(aws.Context, *route53domains.ViewBillingInput, ...request.Option) (*route53domains.ViewBillingOutput, error)
|
||||
ViewBillingRequest(*route53domains.ViewBillingInput) (*request.Request, *route53domains.ViewBillingOutput)
|
||||
}
|
||||
|
||||
var _ Route53DomainsAPI = (*route53domains.Route53Domains)(nil)
|
||||
+95
@@ -0,0 +1,95 @@
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package route53domains
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/client"
|
||||
"github.com/aws/aws-sdk-go/aws/client/metadata"
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
"github.com/aws/aws-sdk-go/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
|
||||
)
|
||||
|
||||
// Route53Domains provides the API operation methods for making requests to
|
||||
// Amazon Route 53 Domains. See this package's package overview docs
|
||||
// for details on the service.
|
||||
//
|
||||
// Route53Domains methods are safe to use concurrently. It is not safe to
|
||||
// modify mutate any of the struct's properties though.
|
||||
type Route53Domains struct {
|
||||
*client.Client
|
||||
}
|
||||
|
||||
// Used for custom client initialization logic
|
||||
var initClient func(*client.Client)
|
||||
|
||||
// Used for custom request initialization logic
|
||||
var initRequest func(*request.Request)
|
||||
|
||||
// Service information constants
|
||||
const (
|
||||
ServiceName = "route53domains" // Service endpoint prefix API calls made to.
|
||||
EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata.
|
||||
)
|
||||
|
||||
// New creates a new instance of the Route53Domains client with a session.
|
||||
// If additional configuration is needed for the client instance use the optional
|
||||
// aws.Config parameter to add your extra config.
|
||||
//
|
||||
// Example:
|
||||
// // Create a Route53Domains client from just a session.
|
||||
// svc := route53domains.New(mySession)
|
||||
//
|
||||
// // Create a Route53Domains client with additional configuration
|
||||
// svc := route53domains.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
|
||||
func New(p client.ConfigProvider, cfgs ...*aws.Config) *Route53Domains {
|
||||
c := p.ClientConfig(EndpointsID, cfgs...)
|
||||
return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName)
|
||||
}
|
||||
|
||||
// newClient creates, initializes and returns a new service client instance.
|
||||
func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *Route53Domains {
|
||||
svc := &Route53Domains{
|
||||
Client: client.New(
|
||||
cfg,
|
||||
metadata.ClientInfo{
|
||||
ServiceName: ServiceName,
|
||||
SigningName: signingName,
|
||||
SigningRegion: signingRegion,
|
||||
Endpoint: endpoint,
|
||||
APIVersion: "2014-05-15",
|
||||
JSONVersion: "1.1",
|
||||
TargetPrefix: "Route53Domains_v20140515",
|
||||
},
|
||||
handlers,
|
||||
),
|
||||
}
|
||||
|
||||
// Handlers
|
||||
svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
|
||||
svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler)
|
||||
svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler)
|
||||
svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler)
|
||||
svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler)
|
||||
|
||||
// Run custom client initialization if present
|
||||
if initClient != nil {
|
||||
initClient(svc.Client)
|
||||
}
|
||||
|
||||
return svc
|
||||
}
|
||||
|
||||
// newRequest creates a new request for a Route53Domains operation and runs any
|
||||
// custom request initialization.
|
||||
func (c *Route53Domains) newRequest(op *request.Operation, params, data interface{}) *request.Request {
|
||||
req := c.NewRequest(op, params, data)
|
||||
|
||||
// Run custom request initialization if present
|
||||
if initRequest != nil {
|
||||
initRequest(req)
|
||||
}
|
||||
|
||||
return req
|
||||
}
|
||||
Reference in New Issue
Block a user