本文整理汇总了Golang中github.com/gunosy/aws-sdk-go/aws.Int64函数的典型用法代码示例。如果您正苦于以下问题:Golang Int64函数的具体用法?Golang Int64怎么用?Golang Int64使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Int64函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: ExampleLambda_UpdateFunctionConfiguration
func ExampleLambda_UpdateFunctionConfiguration() {
svc := lambda.New(nil)
params := &lambda.UpdateFunctionConfigurationInput{
FunctionName: aws.String("FunctionName"), // Required
Description: aws.String("Description"),
Handler: aws.String("Handler"),
MemorySize: aws.Int64(1),
Role: aws.String("RoleArn"),
Timeout: aws.Int64(1),
}
resp, err := svc.UpdateFunctionConfiguration(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))
}
示例2: ExampleDirectConnect_AllocatePrivateVirtualInterface
func ExampleDirectConnect_AllocatePrivateVirtualInterface() {
svc := directconnect.New(nil)
params := &directconnect.AllocatePrivateVirtualInterfaceInput{
ConnectionID: aws.String("ConnectionId"), // Required
NewPrivateVirtualInterfaceAllocation: &directconnect.NewPrivateVirtualInterfaceAllocation{ // Required
ASN: aws.Int64(1), // Required
VLAN: aws.Int64(1), // Required
VirtualInterfaceName: aws.String("VirtualInterfaceName"), // Required
AmazonAddress: aws.String("AmazonAddress"),
AuthKey: aws.String("BGPAuthKey"),
CustomerAddress: aws.String("CustomerAddress"),
},
OwnerAccount: aws.String("OwnerAccount"), // Required
}
resp, err := svc.AllocatePrivateVirtualInterface(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))
}
示例3: ExampleStorageGateway_UpdateBandwidthRateLimit
func ExampleStorageGateway_UpdateBandwidthRateLimit() {
svc := storagegateway.New(nil)
params := &storagegateway.UpdateBandwidthRateLimitInput{
GatewayARN: aws.String("GatewayARN"), // Required
AverageDownloadRateLimitInBitsPerSec: aws.Int64(1),
AverageUploadRateLimitInBitsPerSec: aws.Int64(1),
}
resp, err := svc.UpdateBandwidthRateLimit(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))
}
示例4: ExampleRoute53_UpdateHealthCheck
func ExampleRoute53_UpdateHealthCheck() {
svc := route53.New(nil)
params := &route53.UpdateHealthCheckInput{
HealthCheckID: aws.String("HealthCheckId"), // Required
FailureThreshold: aws.Int64(1),
FullyQualifiedDomainName: aws.String("FullyQualifiedDomainName"),
HealthCheckVersion: aws.Int64(1),
IPAddress: aws.String("IPAddress"),
Port: aws.Int64(1),
ResourcePath: aws.String("ResourcePath"),
SearchString: aws.String("SearchString"),
}
resp, err := svc.UpdateHealthCheck(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))
}
示例5: ExampleStorageGateway_UpdateSnapshotSchedule
func ExampleStorageGateway_UpdateSnapshotSchedule() {
svc := storagegateway.New(nil)
params := &storagegateway.UpdateSnapshotScheduleInput{
RecurrenceInHours: aws.Int64(1), // Required
StartAt: aws.Int64(1), // Required
VolumeARN: aws.String("VolumeARN"), // Required
Description: aws.String("Description"),
}
resp, err := svc.UpdateSnapshotSchedule(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))
}
示例6: ExampleStorageGateway_UpdateMaintenanceStartTime
func ExampleStorageGateway_UpdateMaintenanceStartTime() {
svc := storagegateway.New(nil)
params := &storagegateway.UpdateMaintenanceStartTimeInput{
DayOfWeek: aws.Int64(1), // Required
GatewayARN: aws.String("GatewayARN"), // Required
HourOfDay: aws.Int64(1), // Required
MinuteOfHour: aws.Int64(1), // Required
}
resp, err := svc.UpdateMaintenanceStartTime(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))
}
示例7: ExampleCloudWatchLogs_GetLogEvents
func ExampleCloudWatchLogs_GetLogEvents() {
svc := cloudwatchlogs.New(nil)
params := &cloudwatchlogs.GetLogEventsInput{
LogGroupName: aws.String("LogGroupName"), // Required
LogStreamName: aws.String("LogStreamName"), // Required
EndTime: aws.Int64(1),
Limit: aws.Int64(1),
NextToken: aws.String("NextToken"),
StartFromHead: aws.Bool(true),
StartTime: aws.Int64(1),
}
resp, err := svc.GetLogEvents(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))
}
示例8: ExampleStorageGateway_CreateTapes
func ExampleStorageGateway_CreateTapes() {
svc := storagegateway.New(nil)
params := &storagegateway.CreateTapesInput{
ClientToken: aws.String("ClientToken"), // Required
GatewayARN: aws.String("GatewayARN"), // Required
NumTapesToCreate: aws.Int64(1), // Required
TapeBarcodePrefix: aws.String("TapeBarcodePrefix"), // Required
TapeSizeInBytes: aws.Int64(1), // Required
}
resp, err := svc.CreateTapes(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))
}
示例9: ExampleCloudSearch_UpdateScalingParameters
func ExampleCloudSearch_UpdateScalingParameters() {
svc := cloudsearch.New(nil)
params := &cloudsearch.UpdateScalingParametersInput{
DomainName: aws.String("DomainName"), // Required
ScalingParameters: &cloudsearch.ScalingParameters{ // Required
DesiredInstanceType: aws.String("PartitionInstanceType"),
DesiredPartitionCount: aws.Int64(1),
DesiredReplicationCount: aws.Int64(1),
},
}
resp, err := svc.UpdateScalingParameters(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))
}
示例10: ExampleCognitoSync_ListRecords
func ExampleCognitoSync_ListRecords() {
svc := cognitosync.New(nil)
params := &cognitosync.ListRecordsInput{
DatasetName: aws.String("DatasetName"), // Required
IdentityID: aws.String("IdentityId"), // Required
IdentityPoolID: aws.String("IdentityPoolId"), // Required
LastSyncCount: aws.Int64(1),
MaxResults: aws.Int64(1),
NextToken: aws.String("String"),
SyncSessionToken: aws.String("SyncSessionToken"),
}
resp, err := svc.ListRecords(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))
}
示例11: 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 {
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))
}
示例12: ExampleElastiCache_DescribeEvents
func ExampleElastiCache_DescribeEvents() {
svc := elasticache.New(nil)
params := &elasticache.DescribeEventsInput{
Duration: aws.Int64(1),
EndTime: aws.Time(time.Now()),
Marker: aws.String("String"),
MaxRecords: aws.Int64(1),
SourceIdentifier: aws.String("String"),
SourceType: aws.String("SourceType"),
StartTime: aws.Time(time.Now()),
}
resp, err := svc.DescribeEvents(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))
}
示例13: ExampleCloudFront_UpdateStreamingDistribution
func ExampleCloudFront_UpdateStreamingDistribution() {
svc := cloudfront.New(nil)
params := &cloudfront.UpdateStreamingDistributionInput{
ID: aws.String("string"), // Required
StreamingDistributionConfig: &cloudfront.StreamingDistributionConfig{ // Required
CallerReference: aws.String("string"), // Required
Comment: aws.String("string"), // Required
Enabled: aws.Bool(true), // Required
S3Origin: &cloudfront.S3Origin{ // Required
DomainName: aws.String("string"), // Required
OriginAccessIdentity: aws.String("string"), // Required
},
TrustedSigners: &cloudfront.TrustedSigners{ // Required
Enabled: aws.Bool(true), // Required
Quantity: aws.Int64(1), // Required
Items: []*string{
aws.String("string"), // Required
// More values...
},
},
Aliases: &cloudfront.Aliases{
Quantity: aws.Int64(1), // Required
Items: []*string{
aws.String("string"), // Required
// More values...
},
},
Logging: &cloudfront.StreamingLoggingConfig{
Bucket: aws.String("string"), // Required
Enabled: aws.Bool(true), // Required
Prefix: aws.String("string"), // Required
},
PriceClass: aws.String("PriceClass"),
},
IfMatch: aws.String("string"),
}
resp, err := svc.UpdateStreamingDistribution(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))
}
示例14: 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 {
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))
}
示例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 {
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))
}