本文整理匯總了Golang中bosun/org/_third_party/github.com/aws/aws-sdk-go/aws.Int64函數的典型用法代碼示例。如果您正苦於以下問題:Golang Int64函數的具體用法?Golang Int64怎麽用?Golang Int64使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了Int64函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: ExampleELB_ConfigureHealthCheck
func ExampleELB_ConfigureHealthCheck() {
svc := elb.New(nil)
params := &elb.ConfigureHealthCheckInput{
HealthCheck: &elb.HealthCheck{ // Required
HealthyThreshold: aws.Int64(1), // Required
Interval: aws.Int64(1), // Required
Target: aws.String("HealthCheckTarget"), // Required
Timeout: aws.Int64(1), // Required
UnhealthyThreshold: aws.Int64(1), // Required
},
LoadBalancerName: aws.String("AccessPointName"), // Required
}
resp, err := svc.ConfigureHealthCheck(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)
}
示例2: ExampleELB_CreateLoadBalancerListeners
func ExampleELB_CreateLoadBalancerListeners() {
svc := elb.New(nil)
params := &elb.CreateLoadBalancerListenersInput{
Listeners: []*elb.Listener{ // Required
{ // Required
InstancePort: aws.Int64(1), // Required
LoadBalancerPort: aws.Int64(1), // Required
Protocol: aws.String("Protocol"), // Required
InstanceProtocol: aws.String("Protocol"),
SSLCertificateId: aws.String("SSLCertificateId"),
},
// More values...
},
LoadBalancerName: aws.String("AccessPointName"), // Required
}
resp, err := svc.CreateLoadBalancerListeners(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)
}
示例3: ExampleAutoScaling_UpdateAutoScalingGroup
func ExampleAutoScaling_UpdateAutoScalingGroup() {
svc := autoscaling.New(nil)
params := &autoscaling.UpdateAutoScalingGroupInput{
AutoScalingGroupName: aws.String("ResourceName"), // Required
AvailabilityZones: []*string{
aws.String("XmlStringMaxLen255"), // Required
// More values...
},
DefaultCooldown: aws.Int64(1),
DesiredCapacity: aws.Int64(1),
HealthCheckGracePeriod: aws.Int64(1),
HealthCheckType: aws.String("XmlStringMaxLen32"),
LaunchConfigurationName: aws.String("ResourceName"),
MaxSize: aws.Int64(1),
MinSize: aws.Int64(1),
PlacementGroup: aws.String("XmlStringMaxLen255"),
TerminationPolicies: []*string{
aws.String("XmlStringMaxLen1600"), // Required
// More values...
},
VPCZoneIdentifier: aws.String("XmlStringMaxLen255"),
}
resp, err := svc.UpdateAutoScalingGroup(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)
}
示例4: ExampleAutoScaling_PutScheduledUpdateGroupAction
func ExampleAutoScaling_PutScheduledUpdateGroupAction() {
svc := autoscaling.New(nil)
params := &autoscaling.PutScheduledUpdateGroupActionInput{
AutoScalingGroupName: aws.String("ResourceName"), // Required
ScheduledActionName: aws.String("XmlStringMaxLen255"), // Required
DesiredCapacity: aws.Int64(1),
EndTime: aws.Time(time.Now()),
MaxSize: aws.Int64(1),
MinSize: aws.Int64(1),
Recurrence: aws.String("XmlStringMaxLen255"),
StartTime: aws.Time(time.Now()),
Time: aws.Time(time.Now()),
}
resp, err := svc.PutScheduledUpdateGroupAction(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)
}
示例5: ExampleAutoScaling_CreateLaunchConfiguration
func ExampleAutoScaling_CreateLaunchConfiguration() {
svc := autoscaling.New(nil)
params := &autoscaling.CreateLaunchConfigurationInput{
LaunchConfigurationName: aws.String("XmlStringMaxLen255"), // Required
AssociatePublicIpAddress: aws.Bool(true),
BlockDeviceMappings: []*autoscaling.BlockDeviceMapping{
{ // Required
DeviceName: aws.String("XmlStringMaxLen255"), // Required
Ebs: &autoscaling.Ebs{
DeleteOnTermination: aws.Bool(true),
Iops: aws.Int64(1),
SnapshotId: aws.String("XmlStringMaxLen255"),
VolumeSize: aws.Int64(1),
VolumeType: aws.String("BlockDeviceEbsVolumeType"),
},
NoDevice: aws.Bool(true),
VirtualName: aws.String("XmlStringMaxLen255"),
},
// More values...
},
ClassicLinkVPCId: aws.String("XmlStringMaxLen255"),
ClassicLinkVPCSecurityGroups: []*string{
aws.String("XmlStringMaxLen255"), // Required
// More values...
},
EbsOptimized: aws.Bool(true),
IamInstanceProfile: aws.String("XmlStringMaxLen1600"),
ImageId: aws.String("XmlStringMaxLen255"),
InstanceId: aws.String("XmlStringMaxLen16"),
InstanceMonitoring: &autoscaling.InstanceMonitoring{
Enabled: aws.Bool(true),
},
InstanceType: aws.String("XmlStringMaxLen255"),
KernelId: aws.String("XmlStringMaxLen255"),
KeyName: aws.String("XmlStringMaxLen255"),
PlacementTenancy: aws.String("XmlStringMaxLen64"),
RamdiskId: aws.String("XmlStringMaxLen255"),
SecurityGroups: []*string{
aws.String("XmlString"), // Required
// More values...
},
SpotPrice: aws.String("SpotPrice"),
UserData: aws.String("XmlStringUserData"),
}
resp, err := svc.CreateLaunchConfiguration(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)
}
示例6: ExampleELB_CreateLoadBalancer
func ExampleELB_CreateLoadBalancer() {
svc := elb.New(nil)
params := &elb.CreateLoadBalancerInput{
Listeners: []*elb.Listener{ // Required
{ // Required
InstancePort: aws.Int64(1), // Required
LoadBalancerPort: aws.Int64(1), // Required
Protocol: aws.String("Protocol"), // Required
InstanceProtocol: aws.String("Protocol"),
SSLCertificateId: aws.String("SSLCertificateId"),
},
// More values...
},
LoadBalancerName: aws.String("AccessPointName"), // Required
AvailabilityZones: []*string{
aws.String("AvailabilityZone"), // Required
// More values...
},
Scheme: aws.String("LoadBalancerScheme"),
SecurityGroups: []*string{
aws.String("SecurityGroupId"), // Required
// More values...
},
Subnets: []*string{
aws.String("SubnetId"), // Required
// More values...
},
Tags: []*elb.Tag{
{ // Required
Key: aws.String("TagKey"), // Required
Value: aws.String("TagValue"),
},
// More values...
},
}
resp, err := svc.CreateLoadBalancer(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)
}
示例7: BenchmarkCodegenIterator
func BenchmarkCodegenIterator(b *testing.B) {
reqNum := 0
db := benchDb()
db.Handlers.Unmarshal.PushBack(func(r *request.Request) {
r.Data = benchResps[reqNum]
reqNum++
})
input := &dynamodb.ListTablesInput{Limit: aws.Int64(2)}
iter := func(fn func(*dynamodb.ListTablesOutput, bool) bool) error {
page, _ := db.ListTablesRequest(input)
for ; page != nil; page = page.NextPage() {
page.Send()
out := page.Data.(*dynamodb.ListTablesOutput)
if result := fn(out, !page.HasNextPage()); page.Error != nil || !result {
return page.Error
}
}
return nil
}
for i := 0; i < b.N; i++ {
reqNum = 0
iter(func(p *dynamodb.ListTablesOutput, last bool) bool {
return true
})
}
}
示例8: ExampleCloudWatch_DescribeAlarmsForMetric
func ExampleCloudWatch_DescribeAlarmsForMetric() {
svc := cloudwatch.New(nil)
params := &cloudwatch.DescribeAlarmsForMetricInput{
MetricName: aws.String("MetricName"), // Required
Namespace: aws.String("Namespace"), // Required
Dimensions: []*cloudwatch.Dimension{
{ // Required
Name: aws.String("DimensionName"), // Required
Value: aws.String("DimensionValue"), // Required
},
// More values...
},
Period: aws.Int64(1),
Statistic: aws.String("Statistic"),
Unit: aws.String("StandardUnit"),
}
resp, err := svc.DescribeAlarmsForMetric(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)
}
示例9: ExampleCloudWatch_DescribeAlarms
func ExampleCloudWatch_DescribeAlarms() {
svc := cloudwatch.New(nil)
params := &cloudwatch.DescribeAlarmsInput{
ActionPrefix: aws.String("ActionPrefix"),
AlarmNamePrefix: aws.String("AlarmNamePrefix"),
AlarmNames: []*string{
aws.String("AlarmName"), // Required
// More values...
},
MaxRecords: aws.Int64(1),
NextToken: aws.String("NextToken"),
StateValue: aws.String("StateValue"),
}
resp, err := svc.DescribeAlarms(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)
}
示例10: ExampleCloudWatch_GetMetricStatistics
func ExampleCloudWatch_GetMetricStatistics() {
svc := cloudwatch.New(nil)
params := &cloudwatch.GetMetricStatisticsInput{
EndTime: aws.Time(time.Now()), // Required
MetricName: aws.String("MetricName"), // Required
Namespace: aws.String("Namespace"), // Required
Period: aws.Int64(1), // Required
StartTime: aws.Time(time.Now()), // Required
Statistics: []*string{ // Required
aws.String("Statistic"), // Required
// More values...
},
Dimensions: []*cloudwatch.Dimension{
{ // Required
Name: aws.String("DimensionName"), // Required
Value: aws.String("DimensionValue"), // Required
},
// More values...
},
Unit: aws.String("StandardUnit"),
}
resp, err := svc.GetMetricStatistics(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)
}
示例11: ExampleAutoScaling_DescribePolicies
func ExampleAutoScaling_DescribePolicies() {
svc := autoscaling.New(nil)
params := &autoscaling.DescribePoliciesInput{
AutoScalingGroupName: aws.String("ResourceName"),
MaxRecords: aws.Int64(1),
NextToken: aws.String("XmlString"),
PolicyNames: []*string{
aws.String("ResourceName"), // Required
// More values...
},
PolicyTypes: []*string{
aws.String("XmlStringMaxLen64"), // Required
// More values...
},
}
resp, err := svc.DescribePolicies(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)
}
示例12: ExampleAutoScaling_DescribeTags
func ExampleAutoScaling_DescribeTags() {
svc := autoscaling.New(nil)
params := &autoscaling.DescribeTagsInput{
Filters: []*autoscaling.Filter{
{ // Required
Name: aws.String("XmlString"),
Values: []*string{
aws.String("XmlString"), // Required
// More values...
},
},
// More values...
},
MaxRecords: aws.Int64(1),
NextToken: aws.String("XmlString"),
}
resp, err := svc.DescribeTags(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)
}
示例13: ExampleAutoScaling_PutLifecycleHook
func ExampleAutoScaling_PutLifecycleHook() {
svc := autoscaling.New(nil)
params := &autoscaling.PutLifecycleHookInput{
AutoScalingGroupName: aws.String("ResourceName"), // Required
LifecycleHookName: aws.String("AsciiStringMaxLen255"), // Required
DefaultResult: aws.String("LifecycleActionResult"),
HeartbeatTimeout: aws.Int64(1),
LifecycleTransition: aws.String("LifecycleTransition"),
NotificationMetadata: aws.String("XmlStringMaxLen1023"),
NotificationTargetARN: aws.String("ResourceName"),
RoleARN: aws.String("ResourceName"),
}
resp, err := svc.PutLifecycleHook(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)
}
示例14: ExampleAutoScaling_DescribeScheduledActions
func ExampleAutoScaling_DescribeScheduledActions() {
svc := autoscaling.New(nil)
params := &autoscaling.DescribeScheduledActionsInput{
AutoScalingGroupName: aws.String("ResourceName"),
EndTime: aws.Time(time.Now()),
MaxRecords: aws.Int64(1),
NextToken: aws.String("XmlString"),
ScheduledActionNames: []*string{
aws.String("ResourceName"), // Required
// More values...
},
StartTime: aws.Time(time.Now()),
}
resp, err := svc.DescribeScheduledActions(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)
}
示例15: ExampleCloudWatch_PutMetricAlarm
func ExampleCloudWatch_PutMetricAlarm() {
svc := cloudwatch.New(nil)
params := &cloudwatch.PutMetricAlarmInput{
AlarmName: aws.String("AlarmName"), // Required
ComparisonOperator: aws.String("ComparisonOperator"), // Required
EvaluationPeriods: aws.Int64(1), // Required
MetricName: aws.String("MetricName"), // Required
Namespace: aws.String("Namespace"), // Required
Period: aws.Int64(1), // Required
Statistic: aws.String("Statistic"), // Required
Threshold: aws.Float64(1.0), // Required
ActionsEnabled: aws.Bool(true),
AlarmActions: []*string{
aws.String("ResourceName"), // Required
// More values...
},
AlarmDescription: aws.String("AlarmDescription"),
Dimensions: []*cloudwatch.Dimension{
{ // Required
Name: aws.String("DimensionName"), // Required
Value: aws.String("DimensionValue"), // Required
},
// More values...
},
InsufficientDataActions: []*string{
aws.String("ResourceName"), // Required
// More values...
},
OKActions: []*string{
aws.String("ResourceName"), // Required
// More values...
},
Unit: aws.String("StandardUnit"),
}
resp, err := svc.PutMetricAlarm(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)
}