本文整理汇总了Golang中github.com/upstartmobile/aws-sdk-go/aws.Bool函数的典型用法代码示例。如果您正苦于以下问题:Golang Bool函数的具体用法?Golang Bool怎么用?Golang Bool使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Bool函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Golang代码示例。
示例1: ExampleCloudTrail_CreateTrail
func ExampleCloudTrail_CreateTrail() {
svc := cloudtrail.New(nil)
params := &cloudtrail.CreateTrailInput{
Name: aws.String("String"), // Required
S3BucketName: aws.String("String"), // Required
CloudWatchLogsLogGroupArn: aws.String("String"),
CloudWatchLogsRoleArn: aws.String("String"),
EnableLogFileValidation: aws.Bool(true),
IncludeGlobalServiceEvents: aws.Bool(true),
KmsKeyId: aws.String("String"),
S3KeyPrefix: aws.String("String"),
SnsTopicName: aws.String("String"),
}
resp, err := svc.CreateTrail(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
示例2: ExampleRedshift_ResetClusterParameterGroup
func ExampleRedshift_ResetClusterParameterGroup() {
svc := redshift.New(nil)
params := &redshift.ResetClusterParameterGroupInput{
ParameterGroupName: aws.String("String"), // Required
Parameters: []*redshift.Parameter{
{ // Required
AllowedValues: aws.String("String"),
ApplyType: aws.String("ParameterApplyType"),
DataType: aws.String("String"),
Description: aws.String("String"),
IsModifiable: aws.Bool(true),
MinimumEngineVersion: aws.String("String"),
ParameterName: aws.String("String"),
ParameterValue: aws.String("String"),
Source: aws.String("String"),
},
// More values...
},
ResetAllParameters: aws.Bool(true),
}
resp, err := svc.ResetClusterParameterGroup(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
示例3: ExampleSimpleDB_PutAttributes
func ExampleSimpleDB_PutAttributes() {
svc := simpledb.New(nil)
params := &simpledb.PutAttributesInput{
Attributes: []*simpledb.ReplaceableAttribute{ // Required
{ // Required
Name: aws.String("String"), // Required
Value: aws.String("String"), // Required
Replace: aws.Bool(true),
},
// More values...
},
DomainName: aws.String("String"), // Required
ItemName: aws.String("String"), // Required
Expected: &simpledb.UpdateCondition{
Exists: aws.Bool(true),
Name: aws.String("String"),
Value: aws.String("String"),
},
}
resp, err := svc.PutAttributes(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
示例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.Bool(true),
IncludeResolvedCases: aws.Bool(true),
Language: aws.String("Language"),
MaxResults: aws.Int64(1),
NextToken: aws.String("NextToken"),
}
resp, err := svc.DescribeCases(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
示例5: ExampleAPIGateway_PutMethod
func ExampleAPIGateway_PutMethod() {
svc := apigateway.New(nil)
params := &apigateway.PutMethodInput{
AuthorizationType: aws.String("String"), // Required
HttpMethod: aws.String("String"), // Required
ResourceId: aws.String("String"), // Required
RestApiId: aws.String("String"), // Required
ApiKeyRequired: aws.Bool(true),
RequestModels: map[string]*string{
"Key": aws.String("String"), // Required
// More values...
},
RequestParameters: map[string]*bool{
"Key": aws.Bool(true), // Required
// More values...
},
}
resp, err := svc.PutMethod(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
示例6: ExampleRoute53_CreateHealthCheck
func ExampleRoute53_CreateHealthCheck() {
svc := route53.New(nil)
params := &route53.CreateHealthCheckInput{
CallerReference: aws.String("HealthCheckNonce"), // Required
HealthCheckConfig: &route53.HealthCheckConfig{ // Required
Type: aws.String("HealthCheckType"), // Required
ChildHealthChecks: []*string{
aws.String("HealthCheckId"), // Required
// More values...
},
FailureThreshold: aws.Int64(1),
FullyQualifiedDomainName: aws.String("FullyQualifiedDomainName"),
HealthThreshold: aws.Int64(1),
IPAddress: aws.String("IPAddress"),
Inverted: aws.Bool(true),
MeasureLatency: aws.Bool(true),
Port: aws.Int64(1),
RequestInterval: aws.Int64(1),
ResourcePath: aws.String("ResourcePath"),
SearchString: aws.String("SearchString"),
},
}
resp, err := svc.CreateHealthCheck(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
示例7: ExampleWorkSpaces_CreateWorkspaces
func ExampleWorkSpaces_CreateWorkspaces() {
svc := workspaces.New(nil)
params := &workspaces.CreateWorkspacesInput{
Workspaces: []*workspaces.WorkspaceRequest{ // Required
{ // Required
BundleId: aws.String("BundleId"), // Required
DirectoryId: aws.String("DirectoryId"), // Required
UserName: aws.String("UserName"), // Required
RootVolumeEncryptionEnabled: aws.Bool(true),
UserVolumeEncryptionEnabled: aws.Bool(true),
VolumeEncryptionKey: aws.String("VolumeEncryptionKey"),
},
// More values...
},
}
resp, err := svc.CreateWorkspaces(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
示例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.Bool(true),
AutomaticFailoverEnabled: 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"),
NumCacheClusters: aws.Int64(1),
Port: aws.Int64(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.Int64(1),
SnapshotWindow: aws.String("String"),
Tags: []*elasticache.Tag{
{ // Required
Key: aws.String("String"),
Value: aws.String("String"),
},
// More values...
},
}
resp, err := svc.CreateReplicationGroup(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
示例9: 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
示例10: 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.Bool(true),
NotificationARNs: []*string{
aws.String("NotificationARN"), // Required
// More values...
},
OnFailure: aws.String("OnFailure"),
Parameters: []*cloudformation.Parameter{
{ // Required
ParameterKey: aws.String("ParameterKey"),
ParameterValue: aws.String("ParameterValue"),
UsePreviousValue: aws.Bool(true),
},
// More values...
},
ResourceTypes: []*string{
aws.String("ResourceType"), // Required
// More values...
},
StackPolicyBody: aws.String("StackPolicyBody"),
StackPolicyURL: aws.String("StackPolicyURL"),
Tags: []*cloudformation.Tag{
{ // Required
Key: aws.String("TagKey"),
Value: aws.String("TagValue"),
},
// More values...
},
TemplateBody: aws.String("TemplateBody"),
TemplateURL: aws.String("TemplateURL"),
TimeoutInMinutes: aws.Int64(1),
}
resp, err := svc.CreateStack(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,代码行数:52,代码来源:examples_test.go
示例11: ExampleDeviceFarm_ScheduleRun
func ExampleDeviceFarm_ScheduleRun() {
svc := devicefarm.New(nil)
params := &devicefarm.ScheduleRunInput{
AppArn: aws.String("AmazonResourceName"), // Required
DevicePoolArn: aws.String("AmazonResourceName"), // Required
ProjectArn: aws.String("AmazonResourceName"), // Required
Test: &devicefarm.ScheduleRunTest{ // Required
Type: aws.String("TestType"), // Required
Filter: aws.String("Filter"),
Parameters: map[string]*string{
"Key": aws.String("String"), // Required
// More values...
},
TestPackageArn: aws.String("AmazonResourceName"),
},
Configuration: &devicefarm.ScheduleRunConfiguration{
AuxiliaryApps: []*string{
aws.String("AmazonResourceName"), // Required
// More values...
},
BillingMethod: aws.String("BillingMethod"),
ExtraDataPackageArn: aws.String("AmazonResourceName"),
Locale: aws.String("String"),
Location: &devicefarm.Location{
Latitude: aws.Float64(1.0), // Required
Longitude: aws.Float64(1.0), // Required
},
NetworkProfileArn: aws.String("AmazonResourceName"),
Radios: &devicefarm.Radios{
Bluetooth: aws.Bool(true),
Gps: aws.Bool(true),
Nfc: aws.Bool(true),
Wifi: aws.Bool(true),
},
},
Name: aws.String("Name"),
}
resp, err := svc.ScheduleRun(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
示例12: 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
示例13: ExampleSWF_ListOpenWorkflowExecutions
func ExampleSWF_ListOpenWorkflowExecutions() {
svc := swf.New(nil)
params := &swf.ListOpenWorkflowExecutionsInput{
Domain: aws.String("DomainName"), // Required
StartTimeFilter: &swf.ExecutionTimeFilter{ // Required
OldestDate: aws.Time(time.Now()), // Required
LatestDate: aws.Time(time.Now()),
},
ExecutionFilter: &swf.WorkflowExecutionFilter{
WorkflowId: aws.String("WorkflowId"), // Required
},
MaximumPageSize: aws.Int64(1),
NextPageToken: aws.String("PageToken"),
ReverseOrder: aws.Bool(true),
TagFilter: &swf.TagFilter{
Tag: aws.String("Tag"), // Required
},
TypeFilter: &swf.WorkflowTypeFilter{
Name: aws.String("Name"), // Required
Version: aws.String("VersionOptional"),
},
}
resp, err := svc.ListOpenWorkflowExecutions(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
示例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: ExampleWAF_UpdateRule
func ExampleWAF_UpdateRule() {
svc := waf.New(nil)
params := &waf.UpdateRuleInput{
ChangeToken: aws.String("ChangeToken"), // Required
RuleId: aws.String("ResourceId"), // Required
Updates: []*waf.RuleUpdate{ // Required
{ // Required
Action: aws.String("ChangeAction"), // Required
Predicate: &waf.Predicate{ // Required
DataId: aws.String("PredicateDataId"), // Required
Negated: aws.Bool(true), // Required
Type: aws.String("PredicateType"), // Required
},
},
// More values...
},
}
resp, err := svc.UpdateRule(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
示例16: ExampleConfigService_ListDiscoveredResources
func ExampleConfigService_ListDiscoveredResources() {
svc := configservice.New(nil)
params := &configservice.ListDiscoveredResourcesInput{
ResourceType: aws.String("ResourceType"), // Required
IncludeDeletedResources: aws.Bool(true),
Limit: aws.Int64(1),
NextToken: aws.String("NextToken"),
ResourceIds: []*string{
aws.String("ResourceId"), // Required
// More values...
},
ResourceName: aws.String("ResourceName"),
}
resp, err := svc.ListDiscoveredResources(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
示例17: ExampleConfigService_PutConfigurationRecorder
func ExampleConfigService_PutConfigurationRecorder() {
svc := configservice.New(nil)
params := &configservice.PutConfigurationRecorderInput{
ConfigurationRecorder: &configservice.ConfigurationRecorder{ // Required
Name: aws.String("RecorderName"),
RecordingGroup: &configservice.RecordingGroup{
AllSupported: aws.Bool(true),
ResourceTypes: []*string{
aws.String("ResourceType"), // Required
// More values...
},
},
RoleARN: aws.String("String"),
},
}
resp, err := svc.PutConfigurationRecorder(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
示例18: ExampleCloudFormation_EstimateTemplateCost
func ExampleCloudFormation_EstimateTemplateCost() {
svc := cloudformation.New(nil)
params := &cloudformation.EstimateTemplateCostInput{
Parameters: []*cloudformation.Parameter{
{ // Required
ParameterKey: aws.String("ParameterKey"),
ParameterValue: aws.String("ParameterValue"),
UsePreviousValue: aws.Bool(true),
},
// More values...
},
TemplateBody: aws.String("TemplateBody"),
TemplateURL: aws.String("TemplateURL"),
}
resp, err := svc.EstimateTemplateCost(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
示例19: ExampleAutoScaling_DeleteTags
func ExampleAutoScaling_DeleteTags() {
svc := autoscaling.New(nil)
params := &autoscaling.DeleteTagsInput{
Tags: []*autoscaling.Tag{ // Required
{ // Required
Key: aws.String("TagKey"), // Required
PropagateAtLaunch: aws.Bool(true),
ResourceId: aws.String("XmlString"),
ResourceType: aws.String("XmlString"),
Value: aws.String("TagValue"),
},
// More values...
},
}
resp, err := svc.DeleteTags(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
示例20: 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
{ // Required
Key: aws.String("ObjectKey"), // Required
VersionId: aws.String("ObjectVersionId"),
},
// More values...
},
Quiet: aws.Bool(true),
},
MFA: aws.String("MFA"),
RequestPayer: aws.String("RequestPayer"),
}
resp, err := svc.DeleteObjects(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
注:本文中的github.com/upstartmobile/aws-sdk-go/aws.Bool函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论