本文整理汇总了Golang中github.com/somathor/aws-sdk-go/service/route53.New函数的典型用法代码示例。如果您正苦于以下问题:Golang New函数的具体用法?Golang New怎么用?Golang New使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了New函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Golang代码示例。
示例1: ExampleRoute53_ListChangeBatchesByRRSet
func ExampleRoute53_ListChangeBatchesByRRSet() {
svc := route53.New(session.New())
params := &route53.ListChangeBatchesByRRSetInput{
EndDate: aws.String("Date"), // Required
HostedZoneId: aws.String("ResourceId"), // Required
Name: aws.String("DNSName"), // Required
StartDate: aws.String("Date"), // Required
Type: aws.String("RRType"), // Required
Marker: aws.String("PageMarker"),
MaxItems: aws.String("PageMaxItems"),
SetIdentifier: aws.String("ResourceRecordSetIdentifier"),
}
resp, err := svc.ListChangeBatchesByRRSet(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:somathor,项目名称:aws-sdk-go,代码行数:25,代码来源:examples_test.go
示例2: ExampleRoute53_ChangeTagsForResource
func ExampleRoute53_ChangeTagsForResource() {
svc := route53.New(session.New())
params := &route53.ChangeTagsForResourceInput{
ResourceId: aws.String("TagResourceId"), // Required
ResourceType: aws.String("TagResourceType"), // Required
AddTags: []*route53.Tag{
{ // Required
Key: aws.String("TagKey"),
Value: aws.String("TagValue"),
},
// More values...
},
RemoveTagKeys: []*string{
aws.String("TagKey"), // Required
// More values...
},
}
resp, err := svc.ChangeTagsForResource(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:somathor,项目名称:aws-sdk-go,代码行数:30,代码来源:examples_test.go
示例3: ExampleRoute53_UpdateHealthCheck
func ExampleRoute53_UpdateHealthCheck() {
svc := route53.New(session.New())
params := &route53.UpdateHealthCheckInput{
HealthCheckId: aws.String("HealthCheckId"), // Required
ChildHealthChecks: []*string{
aws.String("HealthCheckId"), // Required
// More values...
},
FailureThreshold: aws.Int64(1),
FullyQualifiedDomainName: aws.String("FullyQualifiedDomainName"),
HealthCheckVersion: aws.Int64(1),
HealthThreshold: aws.Int64(1),
IPAddress: aws.String("IPAddress"),
Inverted: aws.Bool(true),
Port: aws.Int64(1),
ResourcePath: aws.String("ResourcePath"),
SearchString: aws.String("SearchString"),
}
resp, err := svc.UpdateHealthCheck(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:somathor,项目名称:aws-sdk-go,代码行数:31,代码来源:examples_test.go
示例4: ExampleRoute53_CreateHostedZone
func ExampleRoute53_CreateHostedZone() {
svc := route53.New(session.New())
params := &route53.CreateHostedZoneInput{
CallerReference: aws.String("Nonce"), // Required
Name: aws.String("DNSName"), // Required
DelegationSetId: aws.String("ResourceId"),
HostedZoneConfig: &route53.HostedZoneConfig{
Comment: aws.String("ResourceDescription"),
PrivateZone: aws.Bool(true),
},
VPC: &route53.VPC{
VPCId: aws.String("VPCId"),
VPCRegion: aws.String("VPCRegion"),
},
}
resp, err := svc.CreateHostedZone(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:somathor,项目名称:aws-sdk-go,代码行数:28,代码来源:examples_test.go
示例5: ExampleRoute53_ChangeResourceRecordSets
func ExampleRoute53_ChangeResourceRecordSets() {
svc := route53.New(session.New())
params := &route53.ChangeResourceRecordSetsInput{
ChangeBatch: &route53.ChangeBatch{ // Required
Changes: []*route53.Change{ // Required
{ // Required
Action: aws.String("ChangeAction"), // Required
ResourceRecordSet: &route53.ResourceRecordSet{ // Required
Name: aws.String("DNSName"), // Required
Type: aws.String("RRType"), // Required
AliasTarget: &route53.AliasTarget{
DNSName: aws.String("DNSName"), // Required
EvaluateTargetHealth: aws.Bool(true), // Required
HostedZoneId: aws.String("ResourceId"), // Required
},
Failover: aws.String("ResourceRecordSetFailover"),
GeoLocation: &route53.GeoLocation{
ContinentCode: aws.String("GeoLocationContinentCode"),
CountryCode: aws.String("GeoLocationCountryCode"),
SubdivisionCode: aws.String("GeoLocationSubdivisionCode"),
},
HealthCheckId: aws.String("HealthCheckId"),
Region: aws.String("ResourceRecordSetRegion"),
ResourceRecords: []*route53.ResourceRecord{
{ // Required
Value: aws.String("RData"), // Required
},
// More values...
},
SetIdentifier: aws.String("ResourceRecordSetIdentifier"),
TTL: aws.Int64(1),
TrafficPolicyInstanceId: aws.String("TrafficPolicyInstanceId"),
Weight: aws.Int64(1),
},
},
// More values...
},
Comment: aws.String("ResourceDescription"),
},
HostedZoneId: aws.String("ResourceId"), // Required
}
resp, err := svc.ChangeResourceRecordSets(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:somathor,项目名称:aws-sdk-go,代码行数:54,代码来源:examples_test.go
示例6: TestBuildCorrectURI
func TestBuildCorrectURI(t *testing.T) {
svc := route53.New(unit.Session)
svc.Handlers.Validate.Clear()
req, _ := svc.GetHostedZoneRequest(&route53.GetHostedZoneInput{
Id: aws.String("/hostedzone/ABCDEFG"),
})
req.Build()
awstesting.Match(t, `\/hostedzone\/ABCDEFG$`, req.HTTPRequest.URL.String())
}
开发者ID:somathor,项目名称:aws-sdk-go,代码行数:11,代码来源:customizations_test.go
示例7: ExampleRoute53_GetTrafficPolicyInstanceCount
func ExampleRoute53_GetTrafficPolicyInstanceCount() {
svc := route53.New(session.New())
var params *route53.GetTrafficPolicyInstanceCountInput
resp, err := svc.GetTrafficPolicyInstanceCount(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:somathor,项目名称:aws-sdk-go,代码行数:16,代码来源:examples_test.go
示例8: ExampleRoute53_GetCheckerIpRanges
func ExampleRoute53_GetCheckerIpRanges() {
svc := route53.New(session.New())
var params *route53.GetCheckerIpRangesInput
resp, err := svc.GetCheckerIpRanges(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:somathor,项目名称:aws-sdk-go,代码行数:16,代码来源:examples_test.go
示例9: ExampleRoute53_GetReusableDelegationSet
func ExampleRoute53_GetReusableDelegationSet() {
svc := route53.New(session.New())
params := &route53.GetReusableDelegationSetInput{
Id: aws.String("ResourceId"), // Required
}
resp, err := svc.GetReusableDelegationSet(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:somathor,项目名称:aws-sdk-go,代码行数:18,代码来源:examples_test.go
示例10: ExampleRoute53_GetHealthCheckStatus
func ExampleRoute53_GetHealthCheckStatus() {
svc := route53.New(session.New())
params := &route53.GetHealthCheckStatusInput{
HealthCheckId: aws.String("HealthCheckId"), // Required
}
resp, err := svc.GetHealthCheckStatus(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:somathor,项目名称:aws-sdk-go,代码行数:18,代码来源:examples_test.go
示例11: ExampleRoute53_GetTrafficPolicyInstance
func ExampleRoute53_GetTrafficPolicyInstance() {
svc := route53.New(session.New())
params := &route53.GetTrafficPolicyInstanceInput{
Id: aws.String("TrafficPolicyInstanceId"), // Required
}
resp, err := svc.GetTrafficPolicyInstance(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:somathor,项目名称:aws-sdk-go,代码行数:18,代码来源:examples_test.go
示例12: ExampleRoute53_UpdateHostedZoneComment
func ExampleRoute53_UpdateHostedZoneComment() {
svc := route53.New(session.New())
params := &route53.UpdateHostedZoneCommentInput{
Id: aws.String("ResourceId"), // Required
Comment: aws.String("ResourceDescription"),
}
resp, err := svc.UpdateHostedZoneComment(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:somathor,项目名称:aws-sdk-go,代码行数:19,代码来源:examples_test.go
示例13: ExampleRoute53_ListTrafficPolicies
func ExampleRoute53_ListTrafficPolicies() {
svc := route53.New(session.New())
params := &route53.ListTrafficPoliciesInput{
MaxItems: aws.String("PageMaxItems"),
TrafficPolicyIdMarker: aws.String("TrafficPolicyId"),
}
resp, err := svc.ListTrafficPolicies(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:somathor,项目名称:aws-sdk-go,代码行数:19,代码来源:examples_test.go
示例14: ExampleRoute53_ListTagsForResource
func ExampleRoute53_ListTagsForResource() {
svc := route53.New(session.New())
params := &route53.ListTagsForResourceInput{
ResourceId: aws.String("TagResourceId"), // Required
ResourceType: aws.String("TagResourceType"), // Required
}
resp, err := svc.ListTagsForResource(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:somathor,项目名称:aws-sdk-go,代码行数:19,代码来源:examples_test.go
示例15: ExampleRoute53_CreateTrafficPolicyVersion
func ExampleRoute53_CreateTrafficPolicyVersion() {
svc := route53.New(session.New())
params := &route53.CreateTrafficPolicyVersionInput{
Document: aws.String("TrafficPolicyDocument"), // Required
Id: aws.String("TrafficPolicyId"), // Required
Comment: aws.String("TrafficPolicyComment"),
}
resp, err := svc.CreateTrafficPolicyVersion(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:somathor,项目名称:aws-sdk-go,代码行数:20,代码来源:examples_test.go
示例16: ExampleRoute53_ListHostedZonesByName
func ExampleRoute53_ListHostedZonesByName() {
svc := route53.New(session.New())
params := &route53.ListHostedZonesByNameInput{
DNSName: aws.String("DNSName"),
HostedZoneId: aws.String("ResourceId"),
MaxItems: aws.String("PageMaxItems"),
}
resp, err := svc.ListHostedZonesByName(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:somathor,项目名称:aws-sdk-go,代码行数:20,代码来源:examples_test.go
示例17: ExampleRoute53_GetGeoLocation
func ExampleRoute53_GetGeoLocation() {
svc := route53.New(session.New())
params := &route53.GetGeoLocationInput{
ContinentCode: aws.String("GeoLocationContinentCode"),
CountryCode: aws.String("GeoLocationCountryCode"),
SubdivisionCode: aws.String("GeoLocationSubdivisionCode"),
}
resp, err := svc.GetGeoLocation(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:somathor,项目名称:aws-sdk-go,代码行数:20,代码来源:examples_test.go
示例18: ExampleRoute53_ListTrafficPolicyInstancesByHostedZone
func ExampleRoute53_ListTrafficPolicyInstancesByHostedZone() {
svc := route53.New(session.New())
params := &route53.ListTrafficPolicyInstancesByHostedZoneInput{
HostedZoneId: aws.String("ResourceId"), // Required
MaxItems: aws.String("PageMaxItems"),
TrafficPolicyInstanceNameMarker: aws.String("DNSName"),
TrafficPolicyInstanceTypeMarker: aws.String("RRType"),
}
resp, err := svc.ListTrafficPolicyInstancesByHostedZone(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:somathor,项目名称:aws-sdk-go,代码行数:21,代码来源:examples_test.go
示例19: ExampleRoute53_CreateTrafficPolicyInstance
func ExampleRoute53_CreateTrafficPolicyInstance() {
svc := route53.New(session.New())
params := &route53.CreateTrafficPolicyInstanceInput{
HostedZoneId: aws.String("ResourceId"), // Required
Name: aws.String("DNSName"), // Required
TTL: aws.Int64(1), // Required
TrafficPolicyId: aws.String("TrafficPolicyId"), // Required
TrafficPolicyVersion: aws.Int64(1), // Required
}
resp, err := svc.CreateTrafficPolicyInstance(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:somathor,项目名称:aws-sdk-go,代码行数:22,代码来源:examples_test.go
示例20: ExampleRoute53_DisassociateVPCFromHostedZone
func ExampleRoute53_DisassociateVPCFromHostedZone() {
svc := route53.New(session.New())
params := &route53.DisassociateVPCFromHostedZoneInput{
HostedZoneId: aws.String("ResourceId"), // Required
VPC: &route53.VPC{ // Required
VPCId: aws.String("VPCId"),
VPCRegion: aws.String("VPCRegion"),
},
Comment: aws.String("DisassociateVPCComment"),
}
resp, err := svc.DisassociateVPCFromHostedZone(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:somathor,项目名称:aws-sdk-go,代码行数:23,代码来源:examples_test.go
注:本文中的github.com/somathor/aws-sdk-go/service/route53.New函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论