本文整理汇总了Golang中github.com/upstartmobile/aws-sdk-go/aws.Int64函数的典型用法代码示例。如果您正苦于以下问题:Golang Int64函数的具体用法?Golang Int64怎么用?Golang Int64使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Int64函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: ExampleSQS_ReceiveMessage
func ExampleSQS_ReceiveMessage() {
svc := sqs.New(nil)
params := &sqs.ReceiveMessageInput{
QueueUrl: aws.String("String"), // Required
AttributeNames: []*string{
aws.String("QueueAttributeName"), // Required
// More values...
},
MaxNumberOfMessages: aws.Int64(1),
MessageAttributeNames: []*string{
aws.String("MessageAttributeName"), // Required
// More values...
},
VisibilityTimeout: aws.Int64(1),
WaitTimeSeconds: aws.Int64(1),
}
resp, err := svc.ReceiveMessage(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: ExampleCloudSearchDomain_Search
func ExampleCloudSearchDomain_Search() {
svc := cloudsearchdomain.New(nil)
params := &cloudsearchdomain.SearchInput{
Query: aws.String("Query"), // Required
Cursor: aws.String("Cursor"),
Expr: aws.String("Expr"),
Facet: aws.String("Facet"),
FilterQuery: aws.String("FilterQuery"),
Highlight: aws.String("Highlight"),
Partial: aws.Bool(true),
QueryOptions: aws.String("QueryOptions"),
QueryParser: aws.String("QueryParser"),
Return: aws.String("Return"),
Size: aws.Int64(1),
Sort: aws.String("Sort"),
Start: aws.Int64(1),
}
resp, err := svc.Search(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: 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)
}
示例4: ExampleRoute53_UpdateHealthCheck
func ExampleRoute53_UpdateHealthCheck() {
svc := route53.New(nil)
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)
}
示例5: 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)
}
示例6: 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)
}
示例7: 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)
}
示例8: ExampleECS_CreateService
func ExampleECS_CreateService() {
svc := ecs.New(nil)
params := &ecs.CreateServiceInput{
DesiredCount: aws.Int64(1), // Required
ServiceName: aws.String("String"), // Required
TaskDefinition: aws.String("String"), // Required
ClientToken: aws.String("String"),
Cluster: aws.String("String"),
LoadBalancers: []*ecs.LoadBalancer{
{ // Required
ContainerName: aws.String("String"),
ContainerPort: aws.Int64(1),
LoadBalancerName: aws.String("String"),
},
// More values...
},
Role: aws.String("String"),
}
resp, err := svc.CreateService(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: ExampleECS_SubmitContainerStateChange
func ExampleECS_SubmitContainerStateChange() {
svc := ecs.New(nil)
params := &ecs.SubmitContainerStateChangeInput{
Cluster: aws.String("String"),
ContainerName: aws.String("String"),
ExitCode: aws.Int64(1),
NetworkBindings: []*ecs.NetworkBinding{
{ // Required
BindIP: aws.String("String"),
ContainerPort: aws.Int64(1),
HostPort: aws.Int64(1),
Protocol: aws.String("TransportProtocol"),
},
// More values...
},
Reason: aws.String("String"),
Status: aws.String("String"),
Task: aws.String("String"),
}
resp, err := svc.SubmitContainerStateChange(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: ExampleS3_UploadPart
func ExampleS3_UploadPart() {
svc := s3.New(nil)
params := &s3.UploadPartInput{
Bucket: aws.String("BucketName"), // Required
Key: aws.String("ObjectKey"), // Required
PartNumber: aws.Int64(1), // Required
UploadId: aws.String("MultipartUploadId"), // Required
Body: bytes.NewReader([]byte("PAYLOAD")),
ContentLength: aws.Int64(1),
RequestPayer: aws.String("RequestPayer"),
SSECustomerAlgorithm: aws.String("SSECustomerAlgorithm"),
SSECustomerKey: aws.String("SSECustomerKey"),
SSECustomerKeyMD5: aws.String("SSECustomerKeyMD5"),
ServerSideEncryption: aws.String("UploadPartRequestServerSideEncryption"),
}
resp, err := svc.UploadPart(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: ExampleDirectoryService_UpdateRadius
func ExampleDirectoryService_UpdateRadius() {
svc := directoryservice.New(nil)
params := &directoryservice.UpdateRadiusInput{
DirectoryId: aws.String("DirectoryId"), // Required
RadiusSettings: &directoryservice.RadiusSettings{ // Required
AuthenticationProtocol: aws.String("RadiusAuthenticationProtocol"),
DisplayLabel: aws.String("RadiusDisplayLabel"),
RadiusPort: aws.Int64(1),
RadiusRetries: aws.Int64(1),
RadiusServers: []*string{
aws.String("Server"), // Required
// More values...
},
RadiusTimeout: aws.Int64(1),
SharedSecret: aws.String("RadiusSharedSecret"),
UseSameUsername: aws.Bool(true),
},
}
resp, err := svc.UpdateRadius(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: ExampleDirectConnect_AllocatePublicVirtualInterface
func ExampleDirectConnect_AllocatePublicVirtualInterface() {
svc := directconnect.New(nil)
params := &directconnect.AllocatePublicVirtualInterfaceInput{
ConnectionId: aws.String("ConnectionId"), // Required
NewPublicVirtualInterfaceAllocation: &directconnect.NewPublicVirtualInterfaceAllocation{ // Required
AmazonAddress: aws.String("AmazonAddress"), // Required
Asn: aws.Int64(1), // Required
CustomerAddress: aws.String("CustomerAddress"), // Required
RouteFilterPrefixes: []*directconnect.RouteFilterPrefix{ // Required
{ // Required
Cidr: aws.String("CIDR"),
},
// More values...
},
VirtualInterfaceName: aws.String("VirtualInterfaceName"), // Required
Vlan: aws.Int64(1), // Required
AuthKey: aws.String("BGPAuthKey"),
},
OwnerAccount: aws.String("OwnerAccount"), // Required
}
resp, err := svc.AllocatePublicVirtualInterface(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: ExampleDirectConnect_CreatePrivateVirtualInterface
func ExampleDirectConnect_CreatePrivateVirtualInterface() {
svc := directconnect.New(nil)
params := &directconnect.CreatePrivateVirtualInterfaceInput{
ConnectionId: aws.String("ConnectionId"), // Required
NewPrivateVirtualInterface: &directconnect.NewPrivateVirtualInterface{ // Required
Asn: aws.Int64(1), // Required
VirtualGatewayId: aws.String("VirtualGatewayId"), // Required
VirtualInterfaceName: aws.String("VirtualInterfaceName"), // Required
Vlan: aws.Int64(1), // Required
AmazonAddress: aws.String("AmazonAddress"),
AuthKey: aws.String("BGPAuthKey"),
CustomerAddress: aws.String("CustomerAddress"),
},
}
resp, err := svc.CreatePrivateVirtualInterface(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: ExampleCloudWatchLogs_FilterLogEvents
func ExampleCloudWatchLogs_FilterLogEvents() {
svc := cloudwatchlogs.New(nil)
params := &cloudwatchlogs.FilterLogEventsInput{
LogGroupName: aws.String("LogGroupName"), // Required
EndTime: aws.Int64(1),
FilterPattern: aws.String("FilterPattern"),
Interleaved: aws.Bool(true),
Limit: aws.Int64(1),
LogStreamNames: []*string{
aws.String("LogStreamName"), // Required
// More values...
},
NextToken: aws.String("NextToken"),
StartTime: aws.Int64(1),
}
resp, err := svc.FilterLogEvents(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: 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),
Encrypted: 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)
}