本文整理匯總了Golang中github.com/dragonfax/aws-sdk-go/service/storagegateway.New函數的典型用法代碼示例。如果您正苦於以下問題:Golang New函數的具體用法?Golang New怎麽用?Golang New使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了New函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: ExampleStorageGateway_DescribeMaintenanceStartTime
func ExampleStorageGateway_DescribeMaintenanceStartTime() {
svc := storagegateway.New(nil)
params := &storagegateway.DescribeMaintenanceStartTimeInput{
GatewayARN: aws.String("GatewayARN"), // Required
}
resp, err := svc.DescribeMaintenanceStartTime(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: ExampleStorageGateway_UpdateGatewaySoftwareNow
func ExampleStorageGateway_UpdateGatewaySoftwareNow() {
svc := storagegateway.New(nil)
params := &storagegateway.UpdateGatewaySoftwareNowInput{
GatewayARN: aws.String("GatewayARN"), // Required
}
resp, err := svc.UpdateGatewaySoftwareNow(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: ExampleStorageGateway_DescribeChapCredentials
func ExampleStorageGateway_DescribeChapCredentials() {
svc := storagegateway.New(nil)
params := &storagegateway.DescribeChapCredentialsInput{
TargetARN: aws.String("TargetARN"), // Required
}
resp, err := svc.DescribeChapCredentials(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: ExampleStorageGateway_ListVolumeInitiators
func ExampleStorageGateway_ListVolumeInitiators() {
svc := storagegateway.New(nil)
params := &storagegateway.ListVolumeInitiatorsInput{
VolumeARN: aws.String("VolumeARN"), // Required
}
resp, err := svc.ListVolumeInitiators(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: ExampleStorageGateway_DeleteBandwidthRateLimit
func ExampleStorageGateway_DeleteBandwidthRateLimit() {
svc := storagegateway.New(nil)
params := &storagegateway.DeleteBandwidthRateLimitInput{
BandwidthType: aws.String("BandwidthType"), // Required
GatewayARN: aws.String("GatewayARN"), // Required
}
resp, err := svc.DeleteBandwidthRateLimit(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: ExampleStorageGateway_RetrieveTapeRecoveryPoint
func ExampleStorageGateway_RetrieveTapeRecoveryPoint() {
svc := storagegateway.New(nil)
params := &storagegateway.RetrieveTapeRecoveryPointInput{
GatewayARN: aws.String("GatewayARN"), // Required
TapeARN: aws.String("TapeARN"), // Required
}
resp, err := svc.RetrieveTapeRecoveryPoint(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: ExampleStorageGateway_CreateSnapshotFromVolumeRecoveryPoint
func ExampleStorageGateway_CreateSnapshotFromVolumeRecoveryPoint() {
svc := storagegateway.New(nil)
params := &storagegateway.CreateSnapshotFromVolumeRecoveryPointInput{
SnapshotDescription: aws.String("SnapshotDescription"), // Required
VolumeARN: aws.String("VolumeARN"), // Required
}
resp, err := svc.CreateSnapshotFromVolumeRecoveryPoint(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: ExampleStorageGateway_ListGateways
func ExampleStorageGateway_ListGateways() {
svc := storagegateway.New(nil)
params := &storagegateway.ListGatewaysInput{
Limit: aws.Int64(1),
Marker: aws.String("Marker"),
}
resp, err := svc.ListGateways(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: ExampleStorageGateway_DescribeTapeRecoveryPoints
func ExampleStorageGateway_DescribeTapeRecoveryPoints() {
svc := storagegateway.New(nil)
params := &storagegateway.DescribeTapeRecoveryPointsInput{
GatewayARN: aws.String("GatewayARN"), // Required
Limit: aws.Int64(1),
Marker: aws.String("Marker"),
}
resp, err := svc.DescribeTapeRecoveryPoints(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: 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 {
// 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: ExampleStorageGateway_UpdateGatewayInformation
func ExampleStorageGateway_UpdateGatewayInformation() {
svc := storagegateway.New(nil)
params := &storagegateway.UpdateGatewayInformationInput{
GatewayARN: aws.String("GatewayARN"), // Required
GatewayName: aws.String("GatewayName"),
GatewayTimezone: aws.String("GatewayTimezone"),
}
resp, err := svc.UpdateGatewayInformation(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: 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 {
// 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: 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 {
// 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: ExampleStorageGateway_DescribeStorediSCSIVolumes
func ExampleStorageGateway_DescribeStorediSCSIVolumes() {
svc := storagegateway.New(nil)
params := &storagegateway.DescribeStorediSCSIVolumesInput{
VolumeARNs: []*string{ // Required
aws.String("VolumeARN"), // Required
// More values...
},
}
resp, err := svc.DescribeStorediSCSIVolumes(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: ExampleStorageGateway_UpdateChapCredentials
func ExampleStorageGateway_UpdateChapCredentials() {
svc := storagegateway.New(nil)
params := &storagegateway.UpdateChapCredentialsInput{
InitiatorName: aws.String("IqnName"), // Required
SecretToAuthenticateInitiator: aws.String("ChapSecret"), // Required
TargetARN: aws.String("TargetARN"), // Required
SecretToAuthenticateTarget: aws.String("ChapSecret"),
}
resp, err := svc.UpdateChapCredentials(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)
}