本文整理汇总了Golang中github.com/datacratic/aws-sdk-go/aws.Boolean函数的典型用法代码示例。如果您正苦于以下问题:Golang Boolean函数的具体用法?Golang Boolean怎么用?Golang Boolean使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Boolean函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Golang代码示例。
示例1: ExampleOpsWorks_UpdateInstance
func ExampleOpsWorks_UpdateInstance() {
svc := opsworks.New(nil)
params := &opsworks.UpdateInstanceInput{
InstanceID: aws.String("String"), // Required
AMIID: aws.String("String"),
Architecture: aws.String("Architecture"),
AutoScalingType: aws.String("AutoScalingType"),
EBSOptimized: aws.Boolean(true),
Hostname: aws.String("String"),
InstallUpdatesOnBoot: aws.Boolean(true),
InstanceType: aws.String("String"),
LayerIDs: []*string{
aws.String("String"), // Required
// More values...
},
Os: aws.String("String"),
SSHKeyName: aws.String("String"),
}
resp, err := svc.UpdateInstance(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))
}
开发者ID:datacratic,项目名称:aws-sdk-go,代码行数:32,代码来源:examples_test.go
示例2: ExampleOpsWorks_UpdateApp
func ExampleOpsWorks_UpdateApp() {
svc := opsworks.New(nil)
params := &opsworks.UpdateAppInput{
AppID: aws.String("String"), // Required
AppSource: &opsworks.Source{
Password: aws.String("String"),
Revision: aws.String("String"),
SSHKey: aws.String("String"),
Type: aws.String("SourceType"),
URL: aws.String("String"),
Username: aws.String("String"),
},
Attributes: &map[string]*string{
"Key": aws.String("String"), // Required
// More values...
},
DataSources: []*opsworks.DataSource{
&opsworks.DataSource{ // Required
ARN: aws.String("String"),
DatabaseName: aws.String("String"),
Type: aws.String("String"),
},
// More values...
},
Description: aws.String("String"),
Domains: []*string{
aws.String("String"), // Required
// More values...
},
EnableSSL: aws.Boolean(true),
Environment: []*opsworks.EnvironmentVariable{
&opsworks.EnvironmentVariable{ // Required
Key: aws.String("String"), // Required
Value: aws.String("String"), // Required
Secure: aws.Boolean(true),
},
// More values...
},
Name: aws.String("String"),
SSLConfiguration: &opsworks.SSLConfiguration{
Certificate: aws.String("String"), // Required
PrivateKey: aws.String("String"), // Required
Chain: aws.String("String"),
},
Type: aws.String("AppType"),
}
resp, err := svc.UpdateApp(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))
}
开发者ID:datacratic,项目名称:aws-sdk-go,代码行数:60,代码来源:examples_test.go
示例3: 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))
}
开发者ID:datacratic,项目名称:aws-sdk-go,代码行数:35,代码来源:examples_test.go
示例4: ExampleSupport_DescribeCases
func ExampleSupport_DescribeCases() {
svc := support.New(nil)
params := &support.DescribeCasesInput{
AfterTime: aws.String("AfterTime"),
BeforeTime: aws.String("BeforeTime"),
CaseIDList: []*string{
aws.String("CaseId"), // Required
// More values...
},
DisplayID: aws.String("DisplayId"),
IncludeCommunications: aws.Boolean(true),
IncludeResolvedCases: aws.Boolean(true),
Language: aws.String("Language"),
MaxResults: aws.Long(1),
NextToken: aws.String("NextToken"),
}
resp, err := svc.DescribeCases(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))
}
开发者ID:datacratic,项目名称:aws-sdk-go,代码行数:30,代码来源:examples_test.go
示例5: 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))
}
开发者ID:datacratic,项目名称:aws-sdk-go,代码行数:60,代码来源:examples_test.go
示例6: ExampleRDS_DescribeDBEngineVersions
func ExampleRDS_DescribeDBEngineVersions() {
svc := rds.New(nil)
params := &rds.DescribeDBEngineVersionsInput{
DBParameterGroupFamily: aws.String("String"),
DefaultOnly: aws.Boolean(true),
Engine: aws.String("String"),
EngineVersion: aws.String("String"),
Filters: []*rds.Filter{
&rds.Filter{ // Required
Name: aws.String("String"), // Required
Values: []*string{ // Required
aws.String("String"), // Required
// More values...
},
},
// More values...
},
ListSupportedCharacterSets: aws.Boolean(true),
Marker: aws.String("String"),
MaxRecords: aws.Long(1),
}
resp, err := svc.DescribeDBEngineVersions(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))
}
开发者ID:datacratic,项目名称:aws-sdk-go,代码行数:35,代码来源:examples_test.go
示例7: TestCreateDistribution
func TestCreateDistribution(t *testing.T) {
client := cloudfront.New(nil)
_, serr := client.CreateDistribution(&cloudfront.CreateDistributionInput{
DistributionConfig: &cloudfront.DistributionConfig{
CallerReference: aws.String("ID1"),
Enabled: aws.Boolean(true),
Comment: aws.String("A comment"),
Origins: &cloudfront.Origins{Quantity: aws.Long(0)},
DefaultCacheBehavior: &cloudfront.DefaultCacheBehavior{
ForwardedValues: &cloudfront.ForwardedValues{
Cookies: &cloudfront.CookiePreference{Forward: aws.String("cookie")},
QueryString: aws.Boolean(true),
},
TargetOriginID: aws.String("origin"),
TrustedSigners: &cloudfront.TrustedSigners{
Enabled: aws.Boolean(true),
Quantity: aws.Long(0),
},
ViewerProtocolPolicy: aws.String("policy"),
MinTTL: aws.Long(0),
},
},
})
err := aws.Error(serr)
assert.NotNil(t, err)
assert.Equal(t, "MalformedXML", err.Code)
assertMatches(t, "validation errors detected", err.Message)
}
开发者ID:datacratic,项目名称:aws-sdk-go,代码行数:29,代码来源:integration_test.go
示例8: ExampleElastiCache_CreateReplicationGroup
func ExampleElastiCache_CreateReplicationGroup() {
svc := elasticache.New(nil)
params := &elasticache.CreateReplicationGroupInput{
ReplicationGroupDescription: aws.String("String"), // Required
ReplicationGroupID: aws.String("String"), // Required
AutoMinorVersionUpgrade: aws.Boolean(true),
AutomaticFailoverEnabled: aws.Boolean(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"),
NumCacheClusters: aws.Long(1),
Port: aws.Long(1),
PreferredCacheClusterAZs: []*string{
aws.String("String"), // Required
// More values...
},
PreferredMaintenanceWindow: aws.String("String"),
PrimaryClusterID: 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.Long(1),
SnapshotWindow: aws.String("String"),
Tags: []*elasticache.Tag{
&elasticache.Tag{ // Required
Key: aws.String("String"),
Value: aws.String("String"),
},
// More values...
},
}
resp, err := svc.CreateReplicationGroup(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))
}
开发者ID:datacratic,项目名称:aws-sdk-go,代码行数:58,代码来源:examples_test.go
示例9: ExampleOpsWorks_CloneStack
func ExampleOpsWorks_CloneStack() {
svc := opsworks.New(nil)
params := &opsworks.CloneStackInput{
ServiceRoleARN: aws.String("String"), // Required
SourceStackID: aws.String("String"), // Required
Attributes: &map[string]*string{
"Key": aws.String("String"), // Required
// More values...
},
ChefConfiguration: &opsworks.ChefConfiguration{
BerkshelfVersion: aws.String("String"),
ManageBerkshelf: aws.Boolean(true),
},
CloneAppIDs: []*string{
aws.String("String"), // Required
// More values...
},
ClonePermissions: aws.Boolean(true),
ConfigurationManager: &opsworks.StackConfigurationManager{
Name: aws.String("String"),
Version: aws.String("String"),
},
CustomCookbooksSource: &opsworks.Source{
Password: aws.String("String"),
Revision: aws.String("String"),
SSHKey: aws.String("String"),
Type: aws.String("SourceType"),
URL: aws.String("String"),
Username: aws.String("String"),
},
CustomJSON: aws.String("String"),
DefaultAvailabilityZone: aws.String("String"),
DefaultInstanceProfileARN: aws.String("String"),
DefaultOs: aws.String("String"),
DefaultRootDeviceType: aws.String("RootDeviceType"),
DefaultSSHKeyName: aws.String("String"),
DefaultSubnetID: aws.String("String"),
HostnameTheme: aws.String("String"),
Name: aws.String("String"),
Region: aws.String("String"),
UseCustomCookbooks: aws.Boolean(true),
UseOpsWorksSecurityGroups: aws.Boolean(true),
VPCID: aws.String("String"),
}
resp, err := svc.CloneStack(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))
}
开发者ID:datacratic,项目名称:aws-sdk-go,代码行数:58,代码来源:examples_test.go
示例10: ExampleAutoScaling_CreateLaunchConfiguration
func ExampleAutoScaling_CreateLaunchConfiguration() {
svc := autoscaling.New(nil)
params := &autoscaling.CreateLaunchConfigurationInput{
LaunchConfigurationName: aws.String("XmlStringMaxLen255"), // Required
AssociatePublicIPAddress: aws.Boolean(true),
BlockDeviceMappings: []*autoscaling.BlockDeviceMapping{
&autoscaling.BlockDeviceMapping{ // Required
DeviceName: aws.String("XmlStringMaxLen255"), // Required
EBS: &autoscaling.EBS{
DeleteOnTermination: aws.Boolean(true),
IOPS: aws.Long(1),
SnapshotID: aws.String("XmlStringMaxLen255"),
VolumeSize: aws.Long(1),
VolumeType: aws.String("BlockDeviceEbsVolumeType"),
},
NoDevice: aws.Boolean(true),
VirtualName: aws.String("XmlStringMaxLen255"),
},
// More values...
},
ClassicLinkVPCID: aws.String("XmlStringMaxLen255"),
ClassicLinkVPCSecurityGroups: []*string{
aws.String("XmlStringMaxLen255"), // Required
// More values...
},
EBSOptimized: aws.Boolean(true),
IAMInstanceProfile: aws.String("XmlStringMaxLen1600"),
ImageID: aws.String("XmlStringMaxLen255"),
InstanceID: aws.String("XmlStringMaxLen16"),
InstanceMonitoring: &autoscaling.InstanceMonitoring{
Enabled: aws.Boolean(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 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))
}
开发者ID:datacratic,项目名称:aws-sdk-go,代码行数:58,代码来源:examples_test.go
示例11: 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.Boolean(true),
AutomatedSnapshotRetentionPeriod: aws.Long(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.Boolean(true),
HSMClientCertificateIdentifier: aws.String("String"),
HSMConfigurationIdentifier: aws.String("String"),
KMSKeyID: aws.String("String"),
NumberOfNodes: aws.Long(1),
Port: aws.Long(1),
PreferredMaintenanceWindow: aws.String("String"),
PubliclyAccessible: aws.Boolean(true),
Tags: []*redshift.Tag{
&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 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))
}
开发者ID:datacratic,项目名称:aws-sdk-go,代码行数:54,代码来源:examples_test.go
示例12: ExampleRDS_ModifyOptionGroup
func ExampleRDS_ModifyOptionGroup() {
svc := rds.New(nil)
params := &rds.ModifyOptionGroupInput{
OptionGroupName: aws.String("String"), // Required
ApplyImmediately: aws.Boolean(true),
OptionsToInclude: []*rds.OptionConfiguration{
&rds.OptionConfiguration{ // Required
OptionName: aws.String("String"), // Required
DBSecurityGroupMemberships: []*string{
aws.String("String"), // Required
// More values...
},
OptionSettings: []*rds.OptionSetting{
&rds.OptionSetting{ // Required
AllowedValues: aws.String("String"),
ApplyType: aws.String("String"),
DataType: aws.String("String"),
DefaultValue: aws.String("String"),
Description: aws.String("String"),
IsCollection: aws.Boolean(true),
IsModifiable: aws.Boolean(true),
Name: aws.String("String"),
Value: aws.String("String"),
},
// More values...
},
Port: aws.Long(1),
VPCSecurityGroupMemberships: []*string{
aws.String("String"), // Required
// More values...
},
},
// More values...
},
OptionsToRemove: []*string{
aws.String("String"), // Required
// More values...
},
}
resp, err := svc.ModifyOptionGroup(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))
}
开发者ID:datacratic,项目名称:aws-sdk-go,代码行数:53,代码来源:examples_test.go
示例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.Boolean(true), // Required
S3Origin: &cloudfront.S3Origin{ // Required
DomainName: aws.String("string"), // Required
OriginAccessIdentity: aws.String("string"), // Required
},
TrustedSigners: &cloudfront.TrustedSigners{ // Required
Enabled: aws.Boolean(true), // Required
Quantity: aws.Long(1), // Required
Items: []*string{
aws.String("string"), // Required
// More values...
},
},
Aliases: &cloudfront.Aliases{
Quantity: aws.Long(1), // Required
Items: []*string{
aws.String("string"), // Required
// More values...
},
},
Logging: &cloudfront.StreamingLoggingConfig{
Bucket: aws.String("string"), // Required
Enabled: aws.Boolean(true), // Required
Prefix: aws.String("string"), // Required
},
PriceClass: aws.String("PriceClass"),
},
IfMatch: aws.String("string"),
}
resp, err := svc.UpdateStreamingDistribution(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))
}
开发者ID:datacratic,项目名称:aws-sdk-go,代码行数:50,代码来源:examples_test.go
示例14: ExampleCloudFormation_CreateStack
func ExampleCloudFormation_CreateStack() {
svc := cloudformation.New(nil)
params := &cloudformation.CreateStackInput{
StackName: aws.String("StackName"), // Required
Capabilities: []*string{
aws.String("Capability"), // Required
// More values...
},
DisableRollback: aws.Boolean(true),
NotificationARNs: []*string{
aws.String("NotificationARN"), // Required
// More values...
},
OnFailure: aws.String("OnFailure"),
Parameters: []*cloudformation.Parameter{
&cloudformation.Parameter{ // Required
ParameterKey: aws.String("ParameterKey"),
ParameterValue: aws.String("ParameterValue"),
UsePreviousValue: aws.Boolean(true),
},
// More values...
},
StackPolicyBody: aws.String("StackPolicyBody"),
StackPolicyURL: aws.String("StackPolicyURL"),
Tags: []*cloudformation.Tag{
&cloudformation.Tag{ // Required
Key: aws.String("TagKey"),
Value: aws.String("TagValue"),
},
// More values...
},
TemplateBody: aws.String("TemplateBody"),
TemplateURL: aws.String("TemplateURL"),
TimeoutInMinutes: aws.Long(1),
}
resp, err := svc.CreateStack(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))
}
开发者ID:datacratic,项目名称:aws-sdk-go,代码行数:49,代码来源:examples_test.go
示例15: ExampleSWF_PollForDecisionTask
func ExampleSWF_PollForDecisionTask() {
svc := swf.New(nil)
params := &swf.PollForDecisionTaskInput{
Domain: aws.String("DomainName"), // Required
TaskList: &swf.TaskList{ // Required
Name: aws.String("Name"), // Required
},
Identity: aws.String("Identity"),
MaximumPageSize: aws.Long(1),
NextPageToken: aws.String("PageToken"),
ReverseOrder: aws.Boolean(true),
}
resp, err := svc.PollForDecisionTask(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))
}
开发者ID:datacratic,项目名称:aws-sdk-go,代码行数:26,代码来源:examples_test.go
示例16: 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))
}
开发者ID:datacratic,项目名称:aws-sdk-go,代码行数:26,代码来源:examples_test.go
示例17: ExampleRDS_DescribeOrderableDBInstanceOptions
func ExampleRDS_DescribeOrderableDBInstanceOptions() {
svc := rds.New(nil)
params := &rds.DescribeOrderableDBInstanceOptionsInput{
Engine: aws.String("String"), // Required
DBInstanceClass: aws.String("String"),
EngineVersion: aws.String("String"),
Filters: []*rds.Filter{
&rds.Filter{ // Required
Name: aws.String("String"), // Required
Values: []*string{ // Required
aws.String("String"), // Required
// More values...
},
},
// More values...
},
LicenseModel: aws.String("String"),
Marker: aws.String("String"),
MaxRecords: aws.Long(1),
VPC: aws.Boolean(true),
}
resp, err := svc.DescribeOrderableDBInstanceOptions(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))
}
开发者ID:datacratic,项目名称:aws-sdk-go,代码行数:35,代码来源:examples_test.go
示例18: ExampleRoute53_CreateHostedZone
func ExampleRoute53_CreateHostedZone() {
svc := route53.New(nil)
params := &route53.CreateHostedZoneInput{
CallerReference: aws.String("Nonce"), // Required
Name: aws.String("DNSName"), // Required
DelegationSetID: aws.String("ResourceId"),
HostedZoneConfig: &route53.HostedZoneConfig{
Comment: aws.String("ResourceDescription"),
PrivateZone: aws.Boolean(true),
},
VPC: &route53.VPC{
VPCID: aws.String("VPCId"),
VPCRegion: aws.String("VPCRegion"),
},
}
resp, err := svc.CreateHostedZone(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))
}
开发者ID:datacratic,项目名称:aws-sdk-go,代码行数:29,代码来源:examples_test.go
示例19: ExampleElasticBeanstalk_DescribeEnvironments
func ExampleElasticBeanstalk_DescribeEnvironments() {
svc := elasticbeanstalk.New(nil)
params := &elasticbeanstalk.DescribeEnvironmentsInput{
ApplicationName: aws.String("ApplicationName"),
EnvironmentIDs: []*string{
aws.String("EnvironmentId"), // Required
// More values...
},
EnvironmentNames: []*string{
aws.String("EnvironmentName"), // Required
// More values...
},
IncludeDeleted: aws.Boolean(true),
IncludedDeletedBackTo: aws.Time(time.Now()),
VersionLabel: aws.String("VersionLabel"),
}
resp, err := svc.DescribeEnvironments(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))
}
开发者ID:datacratic,项目名称:aws-sdk-go,代码行数:30,代码来源:examples_test.go
示例20: 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.Boolean(true),
QueryOptions: aws.String("QueryOptions"),
QueryParser: aws.String("QueryParser"),
Return: aws.String("Return"),
Size: aws.Long(1),
Sort: aws.String("Sort"),
Start: aws.Long(1),
}
resp, err := svc.Search(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))
}
开发者ID:datacratic,项目名称:aws-sdk-go,代码行数:31,代码来源:examples_test.go
注:本文中的github.com/datacratic/aws-sdk-go/aws.Boolean函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论