本文整理汇总了Golang中github.com/upstartmobile/aws-sdk-go/aws.Int64函数的典型用法代码示例。如果您正苦于以下问题:Golang Int64函数的具体用法?Golang Int64怎么用?Golang Int64使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Int64函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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)
}
开发者ID:nehadhamija,项目名称:aws-sdk-go,代码行数:29,代码来源:examples_test.go
示例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)
}
开发者ID:nehadhamija,项目名称:aws-sdk-go,代码行数:30,代码来源:examples_test.go
示例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)
}
开发者ID:nehadhamija,项目名称:aws-sdk-go,代码行数:28,代码来源:examples_test.go
示例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)
}
开发者ID:nehadhamija,项目名称:aws-sdk-go,代码行数:31,代码来源:examples_test.go
示例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)
}
开发者ID:nehadhamija,项目名称:aws-sdk-go,代码行数:26,代码来源:examples_test.go
示例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)
}
开发者ID:nehadhamija,项目名称:aws-sdk-go,代码行数:25,代码来源:examples_test.go
示例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)
}
开发者ID:nehadhamija,项目名称:aws-sdk-go,代码行数:35,代码来源:examples_test.go
示例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)
}
开发者ID:nehadhamija,项目名称:aws-sdk-go,代码行数:31,代码来源:examples_test.go
示例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)
}
开发者ID:nehadhamija,项目名称:aws-sdk-go,代码行数:32,代码来源:examples_test.go
示例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)
}
开发者ID:nehadhamija,项目名称:aws-sdk-go,代码行数:28,代码来源:examples_test.go
示例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)
}
开发者ID:nehadhamija,项目名称:aws-sdk-go,代码行数:31,代码来源:examples_test.go
示例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)
}
开发者ID:nehadhamija,项目名称:aws-sdk-go,代码行数:33,代码来源:examples_test.go
示例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)
}
开发者ID:nehadhamija,项目名称:aws-sdk-go,代码行数:27,代码来源:examples_test.go
示例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)
}
开发者ID:nehadhamija,项目名称:aws-sdk-go,代码行数:28,代码来源:examples_test.go
示例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)
}
开发者ID:nehadhamija,项目名称:aws-sdk-go,代码行数:58,代码来源:examples_test.go
示例16: ExampleElastiCache_CreateCacheCluster
func ExampleElastiCache_CreateCacheCluster() {
svc := elasticache.New(nil)
params := &elasticache.CreateCacheClusterInput{
CacheClusterId: aws.String("String"), // Required
AZMode: aws.String("AZMode"),
AutoMinorVersionUpgrade: aws.Bool(true),
CacheNodeType: aws.String("String"),
CacheParameterGroupName: aws.String("String"),
CacheSecurityGroupNames: []*string{
aws.String("String"), // Required
// More values...
},
CacheSubnetGroupName: aws.String("String"),
Engine: aws.String("String"),
EngineVersion: aws.String("String"),
NotificationTopicArn: aws.String("String"),
NumCacheNodes: aws.Int64(1),
Port: aws.Int64(1),
PreferredAvailabilityZone: aws.String("String"),
PreferredAvailabilityZones: []*string{
aws.String("String"), // Required
// More values...
},
PreferredMaintenanceWindow: aws.String("String"),
ReplicationGroupId: aws.String("String"),
SecurityGroupIds: []*string{
aws.String("String"), // Required
// More values...
},
SnapshotArns: []*string{
aws.String("String"), // Required
// More values...
},
SnapshotName: aws.String("String"),
SnapshotRetentionLimit: aws.Int64(1),
SnapshotWindow: aws.String("String"),
Tags: []*elasticache.Tag{
{ // Required
Key: aws.String("String"),
Value: aws.String("String"),
},
// More values...
},
}
resp, err := svc.CreateCacheCluster(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:nehadhamija,项目名称:aws-sdk-go,代码行数:57,代码来源:examples_test.go
示例17: ExampleRedshift_CreateCluster
func ExampleRedshift_CreateCluster() {
svc := redshift.New(nil)
params := &redshift.CreateClusterInput{
ClusterIdentifier: aws.String("String"), // Required
MasterUserPassword: aws.String("String"), // Required
MasterUsername: aws.String("String"), // Required
NodeType: aws.String("String"), // Required
AllowVersionUpgrade: aws.Bool(true),
AutomatedSnapshotRetentionPeriod: aws.Int64(1),
AvailabilityZone: aws.String("String"),
ClusterParameterGroupName: aws.String("String"),
ClusterSecurityGroups: []*string{
aws.String("String"), // Required
// More values...
},
ClusterSubnetGroupName: aws.String("String"),
ClusterType: aws.String("String"),
ClusterVersion: aws.String("String"),
DBName: aws.String("String"),
ElasticIp: aws.String("String"),
Encrypted: aws.Bool(true),
HsmClientCertificateIdentifier: aws.String("String"),
HsmConfigurationIdentifier: aws.String("String"),
KmsKeyId: aws.String("String"),
NumberOfNodes: aws.Int64(1),
Port: aws.Int64(1),
PreferredMaintenanceWindow: aws.String("String"),
PubliclyAccessible: aws.Bool(true),
Tags: []*redshift.Tag{
{ // Required
Key: aws.String("String"),
Value: aws.String("String"),
},
// More values...
},
VpcSecurityGroupIds: []*string{
aws.String("String"), // Required
// More values...
},
}
resp, err := svc.CreateCluster(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:nehadhamija,项目名称:aws-sdk-go,代码行数:53,代码来源:examples_test.go
示例18: ExampleRoute53_ChangeResourceRecordSets
func ExampleRoute53_ChangeResourceRecordSets() {
svc := route53.New(nil)
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),
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:nehadhamija,项目名称:aws-sdk-go,代码行数:53,代码来源:examples_test.go
示例19: ExampleS3_PutBucketLifecycleConfiguration
func ExampleS3_PutBucketLifecycleConfiguration() {
svc := s3.New(nil)
params := &s3.PutBucketLifecycleConfigurationInput{
Bucket: aws.String("BucketName"), // Required
LifecycleConfiguration: &s3.BucketLifecycleConfiguration{
Rules: []*s3.LifecycleRule{ // Required
{ // Required
Prefix: aws.String("Prefix"), // Required
Status: aws.String("ExpirationStatus"), // Required
Expiration: &s3.LifecycleExpiration{
Date: aws.Time(time.Now()),
Days: aws.Int64(1),
},
ID: aws.String("ID"),
NoncurrentVersionExpiration: &s3.NoncurrentVersionExpiration{
NoncurrentDays: aws.Int64(1),
},
NoncurrentVersionTransitions: []*s3.NoncurrentVersionTransition{
{ // Required
NoncurrentDays: aws.Int64(1),
StorageClass: aws.String("TransitionStorageClass"),
},
// More values...
},
Transitions: []*s3.Transition{
{ // Required
Date: aws.Time(time.Now()),
Days: aws.Int64(1),
StorageClass: aws.String("TransitionStorageClass"),
},
// More values...
},
},
// More values...
},
},
}
resp, err := svc.PutBucketLifecycleConfiguration(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:nehadhamija,项目名称:aws-sdk-go,代码行数:50,代码来源:examples_test.go
示例20: 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 {
// 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:nehadhamija,项目名称:aws-sdk-go,代码行数:49,代码来源:examples_test.go
注:本文中的github.com/upstartmobile/aws-sdk-go/aws.Int64函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论