本文整理汇总了Golang中github.com/datacratic/aws-sdk-go/aws/awsutil.StringValue函数的典型用法代码示例。如果您正苦于以下问题:Golang StringValue函数的具体用法?Golang StringValue怎么用?Golang StringValue使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了StringValue函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: ExampleRDS_CopyDBParameterGroup
func ExampleRDS_CopyDBParameterGroup() {
svc := rds.New(nil)
params := &rds.CopyDBParameterGroupInput{
SourceDBParameterGroupIdentifier: aws.String("String"), // Required
TargetDBParameterGroupDescription: aws.String("String"), // Required
TargetDBParameterGroupIdentifier: aws.String("String"), // Required
Tags: []*rds.Tag{
&rds.Tag{ // Required
Key: aws.String("String"),
Value: aws.String("String"),
},
// More values...
},
}
resp, err := svc.CopyDBParameterGroup(params)
if awserr := aws.Error(err); awserr != nil {
// A service error occurred.
fmt.Println("Error:", awserr.Code, awserr.Message)
} else if err != nil {
// A non-service error occurred.
panic(err)
}
// Pretty-print the response data.
fmt.Println(awsutil.StringValue(resp))
}
示例2: ExampleSSM_CreateAssociationBatch
func ExampleSSM_CreateAssociationBatch() {
svc := ssm.New(nil)
params := &ssm.CreateAssociationBatchInput{
Entries: []*ssm.CreateAssociationBatchRequestEntry{ // Required
&ssm.CreateAssociationBatchRequestEntry{ // Required
InstanceID: aws.String("InstanceId"),
Name: aws.String("DocumentName"),
},
// More values...
},
}
resp, err := svc.CreateAssociationBatch(params)
if awserr := aws.Error(err); awserr != nil {
// A service error occurred.
fmt.Println("Error:", awserr.Code, awserr.Message)
} else if err != nil {
// A non-service error occurred.
panic(err)
}
// Pretty-print the response data.
fmt.Println(awsutil.StringValue(resp))
}
示例3: ExampleLambda_UploadFunction
func ExampleLambda_UploadFunction() {
svc := lambda.New(nil)
params := &lambda.UploadFunctionInput{
FunctionName: aws.String("FunctionName"), // Required
FunctionZip: bytes.NewReader([]byte("PAYLOAD")), // Required
Handler: aws.String("Handler"), // Required
Mode: aws.String("Mode"), // Required
Role: aws.String("RoleArn"), // Required
Runtime: aws.String("Runtime"), // Required
Description: aws.String("Description"),
MemorySize: aws.Long(1),
Timeout: aws.Long(1),
}
resp, err := svc.UploadFunction(params)
if awserr := aws.Error(err); awserr != nil {
// A service error occurred.
fmt.Println("Error:", awserr.Code, awserr.Message)
} else if err != nil {
// A non-service error occurred.
panic(err)
}
// Pretty-print the response data.
fmt.Println(awsutil.StringValue(resp))
}
示例4: ExampleS3_HeadObject
func ExampleS3_HeadObject() {
svc := s3.New(nil)
params := &s3.HeadObjectInput{
Bucket: aws.String("BucketName"), // Required
Key: aws.String("ObjectKey"), // Required
IfMatch: aws.String("IfMatch"),
IfModifiedSince: aws.Time(time.Now()),
IfNoneMatch: aws.String("IfNoneMatch"),
IfUnmodifiedSince: aws.Time(time.Now()),
Range: aws.String("Range"),
RequestPayer: aws.String("RequestPayer"),
SSECustomerAlgorithm: aws.String("SSECustomerAlgorithm"),
SSECustomerKey: aws.String("SSECustomerKey"),
SSECustomerKeyMD5: aws.String("SSECustomerKeyMD5"),
VersionID: aws.String("ObjectVersionId"),
}
resp, err := svc.HeadObject(params)
if awserr := aws.Error(err); awserr != nil {
// A service error occurred.
fmt.Println("Error:", awserr.Code, awserr.Message)
} else if err != nil {
// A non-service error occurred.
panic(err)
}
// Pretty-print the response data.
fmt.Println(awsutil.StringValue(resp))
}
示例5: ExampleSSM_ListDocuments
func ExampleSSM_ListDocuments() {
svc := ssm.New(nil)
params := &ssm.ListDocumentsInput{
DocumentFilterList: []*ssm.DocumentFilter{
&ssm.DocumentFilter{ // Required
Key: aws.String("DocumentFilterKey"), // Required
Value: aws.String("DocumentFilterValue"), // Required
},
// More values...
},
MaxResults: aws.Long(1),
NextToken: aws.String("NextToken"),
}
resp, err := svc.ListDocuments(params)
if awserr := aws.Error(err); awserr != nil {
// A service error occurred.
fmt.Println("Error:", awserr.Code, awserr.Message)
} else if err != nil {
// A non-service error occurred.
panic(err)
}
// Pretty-print the response data.
fmt.Println(awsutil.StringValue(resp))
}
示例6: ExampleS3_UploadPart
func ExampleS3_UploadPart() {
svc := s3.New(nil)
params := &s3.UploadPartInput{
Bucket: aws.String("BucketName"), // Required
Key: aws.String("ObjectKey"), // Required
PartNumber: aws.Long(1), // Required
UploadID: aws.String("MultipartUploadId"), // Required
Body: bytes.NewReader([]byte("PAYLOAD")),
ContentLength: aws.Long(1),
RequestPayer: aws.String("RequestPayer"),
SSECustomerAlgorithm: aws.String("SSECustomerAlgorithm"),
SSECustomerKey: aws.String("SSECustomerKey"),
SSECustomerKeyMD5: aws.String("SSECustomerKeyMD5"),
}
resp, err := svc.UploadPart(params)
if awserr := aws.Error(err); awserr != nil {
// A service error occurred.
fmt.Println("Error:", awserr.Code, awserr.Message)
} else if err != nil {
// A non-service error occurred.
panic(err)
}
// Pretty-print the response data.
fmt.Println(awsutil.StringValue(resp))
}
示例7: ExampleS3_DeleteObjects
func ExampleS3_DeleteObjects() {
svc := s3.New(nil)
params := &s3.DeleteObjectsInput{
Bucket: aws.String("BucketName"), // Required
Delete: &s3.Delete{ // Required
Objects: []*s3.ObjectIdentifier{ // Required
&s3.ObjectIdentifier{ // Required
Key: aws.String("ObjectKey"), // Required
VersionID: aws.String("ObjectVersionId"),
},
// More values...
},
Quiet: aws.Boolean(true),
},
MFA: aws.String("MFA"),
RequestPayer: aws.String("RequestPayer"),
}
resp, err := svc.DeleteObjects(params)
if awserr := aws.Error(err); awserr != nil {
// A service error occurred.
fmt.Println("Error:", awserr.Code, awserr.Message)
} else if err != nil {
// A non-service error occurred.
panic(err)
}
// Pretty-print the response data.
fmt.Println(awsutil.StringValue(resp))
}
示例8: ExampleRDS_AddTagsToResource
func ExampleRDS_AddTagsToResource() {
svc := rds.New(nil)
params := &rds.AddTagsToResourceInput{
ResourceName: aws.String("String"), // Required
Tags: []*rds.Tag{ // Required
&rds.Tag{ // Required
Key: aws.String("String"),
Value: aws.String("String"),
},
// More values...
},
}
resp, err := svc.AddTagsToResource(params)
if awserr := aws.Error(err); awserr != nil {
// A service error occurred.
fmt.Println("Error:", awserr.Code, awserr.Message)
} else if err != nil {
// A non-service error occurred.
panic(err)
}
// Pretty-print the response data.
fmt.Println(awsutil.StringValue(resp))
}
示例9: ExampleRDS_CreateOptionGroup
func ExampleRDS_CreateOptionGroup() {
svc := rds.New(nil)
params := &rds.CreateOptionGroupInput{
EngineName: aws.String("String"), // Required
MajorEngineVersion: aws.String("String"), // Required
OptionGroupDescription: aws.String("String"), // Required
OptionGroupName: aws.String("String"), // Required
Tags: []*rds.Tag{
&rds.Tag{ // Required
Key: aws.String("String"),
Value: aws.String("String"),
},
// More values...
},
}
resp, err := svc.CreateOptionGroup(params)
if awserr := aws.Error(err); awserr != nil {
// A service error occurred.
fmt.Println("Error:", awserr.Code, awserr.Message)
} else if err != nil {
// A non-service error occurred.
panic(err)
}
// Pretty-print the response data.
fmt.Println(awsutil.StringValue(resp))
}
示例10: ExampleRDS_CreateDBInstance
func ExampleRDS_CreateDBInstance() {
svc := rds.New(nil)
params := &rds.CreateDBInstanceInput{
AllocatedStorage: aws.Long(1), // Required
DBInstanceClass: aws.String("String"), // Required
DBInstanceIdentifier: aws.String("String"), // Required
Engine: aws.String("String"), // Required
MasterUserPassword: aws.String("String"), // Required
MasterUsername: aws.String("String"), // Required
AutoMinorVersionUpgrade: aws.Boolean(true),
AvailabilityZone: aws.String("String"),
BackupRetentionPeriod: aws.Long(1),
CharacterSetName: aws.String("String"),
DBName: aws.String("String"),
DBParameterGroupName: aws.String("String"),
DBSecurityGroups: []*string{
aws.String("String"), // Required
// More values...
},
DBSubnetGroupName: aws.String("String"),
EngineVersion: aws.String("String"),
IOPS: aws.Long(1),
KMSKeyID: aws.String("String"),
LicenseModel: aws.String("String"),
MultiAZ: aws.Boolean(true),
OptionGroupName: aws.String("String"),
Port: aws.Long(1),
PreferredBackupWindow: aws.String("String"),
PreferredMaintenanceWindow: aws.String("String"),
PubliclyAccessible: aws.Boolean(true),
StorageEncrypted: aws.Boolean(true),
StorageType: aws.String("String"),
TDECredentialARN: aws.String("String"),
TDECredentialPassword: aws.String("String"),
Tags: []*rds.Tag{
&rds.Tag{ // Required
Key: aws.String("String"),
Value: aws.String("String"),
},
// More values...
},
VPCSecurityGroupIDs: []*string{
aws.String("String"), // Required
// More values...
},
}
resp, err := svc.CreateDBInstance(params)
if awserr := aws.Error(err); awserr != nil {
// A service error occurred.
fmt.Println("Error:", awserr.Code, awserr.Message)
} else if err != nil {
// A non-service error occurred.
panic(err)
}
// Pretty-print the response data.
fmt.Println(awsutil.StringValue(resp))
}
示例11: ExampleRDS_CreateDBSnapshot
func ExampleRDS_CreateDBSnapshot() {
svc := rds.New(nil)
params := &rds.CreateDBSnapshotInput{
DBInstanceIdentifier: aws.String("String"), // Required
DBSnapshotIdentifier: aws.String("String"), // Required
Tags: []*rds.Tag{
&rds.Tag{ // Required
Key: aws.String("String"),
Value: aws.String("String"),
},
// More values...
},
}
resp, err := svc.CreateDBSnapshot(params)
if awserr := aws.Error(err); awserr != nil {
// A service error occurred.
fmt.Println("Error:", awserr.Code, awserr.Message)
} else if err != nil {
// A non-service error occurred.
panic(err)
}
// Pretty-print the response data.
fmt.Println(awsutil.StringValue(resp))
}
示例12: ExampleRDS_ResetDBParameterGroup
func ExampleRDS_ResetDBParameterGroup() {
svc := rds.New(nil)
params := &rds.ResetDBParameterGroupInput{
DBParameterGroupName: aws.String("String"), // Required
Parameters: []*rds.Parameter{
&rds.Parameter{ // Required
AllowedValues: aws.String("String"),
ApplyMethod: aws.String("ApplyMethod"),
ApplyType: aws.String("String"),
DataType: aws.String("String"),
Description: aws.String("String"),
IsModifiable: aws.Boolean(true),
MinimumEngineVersion: aws.String("String"),
ParameterName: aws.String("String"),
ParameterValue: aws.String("String"),
Source: aws.String("String"),
},
// More values...
},
ResetAllParameters: aws.Boolean(true),
}
resp, err := svc.ResetDBParameterGroup(params)
if awserr := aws.Error(err); awserr != nil {
// A service error occurred.
fmt.Println("Error:", awserr.Code, awserr.Message)
} else if err != nil {
// A non-service error occurred.
panic(err)
}
// Pretty-print the response data.
fmt.Println(awsutil.StringValue(resp))
}
示例13: ExampleRDS_PurchaseReservedDBInstancesOffering
func ExampleRDS_PurchaseReservedDBInstancesOffering() {
svc := rds.New(nil)
params := &rds.PurchaseReservedDBInstancesOfferingInput{
ReservedDBInstancesOfferingID: aws.String("String"), // Required
DBInstanceCount: aws.Long(1),
ReservedDBInstanceID: aws.String("String"),
Tags: []*rds.Tag{
&rds.Tag{ // Required
Key: aws.String("String"),
Value: aws.String("String"),
},
// More values...
},
}
resp, err := svc.PurchaseReservedDBInstancesOffering(params)
if awserr := aws.Error(err); awserr != nil {
// A service error occurred.
fmt.Println("Error:", awserr.Code, awserr.Message)
} else if err != nil {
// A non-service error occurred.
panic(err)
}
// Pretty-print the response data.
fmt.Println(awsutil.StringValue(resp))
}
示例14: ExampleRDS_ModifyEventSubscription
func ExampleRDS_ModifyEventSubscription() {
svc := rds.New(nil)
params := &rds.ModifyEventSubscriptionInput{
SubscriptionName: aws.String("String"), // Required
Enabled: aws.Boolean(true),
EventCategories: []*string{
aws.String("String"), // Required
// More values...
},
SNSTopicARN: aws.String("String"),
SourceType: aws.String("String"),
}
resp, err := svc.ModifyEventSubscription(params)
if awserr := aws.Error(err); awserr != nil {
// A service error occurred.
fmt.Println("Error:", awserr.Code, awserr.Message)
} else if err != nil {
// A non-service error occurred.
panic(err)
}
// Pretty-print the response data.
fmt.Println(awsutil.StringValue(resp))
}
示例15: ExampleS3_CreateBucket
func ExampleS3_CreateBucket() {
svc := s3.New(nil)
params := &s3.CreateBucketInput{
Bucket: aws.String("BucketName"), // Required
ACL: aws.String("BucketCannedACL"),
CreateBucketConfiguration: &s3.CreateBucketConfiguration{
LocationConstraint: aws.String("BucketLocationConstraint"),
},
GrantFullControl: aws.String("GrantFullControl"),
GrantRead: aws.String("GrantRead"),
GrantReadACP: aws.String("GrantReadACP"),
GrantWrite: aws.String("GrantWrite"),
GrantWriteACP: aws.String("GrantWriteACP"),
}
resp, err := svc.CreateBucket(params)
if awserr := aws.Error(err); awserr != nil {
// A service error occurred.
fmt.Println("Error:", awserr.Code, awserr.Message)
} else if err != nil {
// A non-service error occurred.
panic(err)
}
// Pretty-print the response data.
fmt.Println(awsutil.StringValue(resp))
}