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)) }
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)) }
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)) }
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)) }
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)) }
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)) }
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) }
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)) }
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)) }
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)) }
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)) }
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)) }
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)) }
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)) }
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)) }
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)) }
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)) }
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)) }
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)) }
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)) }
func ExampleCognitoIdentity_UpdateIdentityPool() { svc := cognitoidentity.New(nil) params := &cognitoidentity.IdentityPool{ AllowUnauthenticatedIdentities: aws.Boolean(true), // Required IdentityPoolID: aws.String("IdentityPoolId"), // Required IdentityPoolName: aws.String("IdentityPoolName"), // Required DeveloperProviderName: aws.String("DeveloperProviderName"), OpenIDConnectProviderARNs: []*string{ aws.String("ARNString"), // Required // More values... }, SupportedLoginProviders: &map[string]*string{ "Key": aws.String("IdentityProviderId"), // Required // More values... }, } resp, err := svc.UpdateIdentityPool(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)) }
func ExampleAutoScaling_DeleteTags() { svc := autoscaling.New(nil) params := &autoscaling.DeleteTagsInput{ Tags: []*autoscaling.Tag{ // Required &autoscaling.Tag{ // Required Key: aws.String("TagKey"), // Required PropagateAtLaunch: aws.Boolean(true), ResourceID: aws.String("XmlString"), ResourceType: aws.String("XmlString"), Value: aws.String("TagValue"), }, // More values... }, } resp, err := svc.DeleteTags(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)) }
func ExampleCloudTrail_UpdateTrail() { svc := cloudtrail.New(nil) params := &cloudtrail.UpdateTrailInput{ Name: aws.String("String"), // Required CloudWatchLogsLogGroupARN: aws.String("String"), CloudWatchLogsRoleARN: aws.String("String"), IncludeGlobalServiceEvents: aws.Boolean(true), S3BucketName: aws.String("String"), S3KeyPrefix: aws.String("String"), SNSTopicName: aws.String("String"), } resp, err := svc.UpdateTrail(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)) }
func ExampleCloudFormation_EstimateTemplateCost() { svc := cloudformation.New(nil) params := &cloudformation.EstimateTemplateCostInput{ Parameters: []*cloudformation.Parameter{ &cloudformation.Parameter{ // Required ParameterKey: aws.String("ParameterKey"), ParameterValue: aws.String("ParameterValue"), UsePreviousValue: aws.Boolean(true), }, // More values... }, TemplateBody: aws.String("TemplateBody"), TemplateURL: aws.String("TemplateURL"), } resp, err := svc.EstimateTemplateCost(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)) }
func ExampleElastiCache_ResetCacheParameterGroup() { svc := elasticache.New(nil) params := &elasticache.ResetCacheParameterGroupInput{ CacheParameterGroupName: aws.String("String"), // Required ParameterNameValues: []*elasticache.ParameterNameValue{ // Required &elasticache.ParameterNameValue{ // Required ParameterName: aws.String("String"), ParameterValue: aws.String("String"), }, // More values... }, ResetAllParameters: aws.Boolean(true), } resp, err := svc.ResetCacheParameterGroup(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)) }
func ExampleSWF_GetWorkflowExecutionHistory() { svc := swf.New(nil) params := &swf.GetWorkflowExecutionHistoryInput{ Domain: aws.String("DomainName"), // Required Execution: &swf.WorkflowExecution{ // Required RunID: aws.String("RunId"), // Required WorkflowID: aws.String("WorkflowId"), // Required }, MaximumPageSize: aws.Long(1), NextPageToken: aws.String("PageToken"), ReverseOrder: aws.Boolean(true), } resp, err := svc.GetWorkflowExecutionHistory(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)) }
func ExampleCloudWatchLogs_GetLogEvents() { svc := cloudwatchlogs.New(nil) params := &cloudwatchlogs.GetLogEventsInput{ LogGroupName: aws.String("LogGroupName"), // Required LogStreamName: aws.String("LogStreamName"), // Required EndTime: aws.Long(1), Limit: aws.Long(1), NextToken: aws.String("NextToken"), StartFromHead: aws.Boolean(true), StartTime: aws.Long(1), } resp, err := svc.GetLogEvents(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)) }
func ExampleElasticBeanstalk_CreateApplicationVersion() { svc := elasticbeanstalk.New(nil) params := &elasticbeanstalk.CreateApplicationVersionInput{ ApplicationName: aws.String("ApplicationName"), // Required VersionLabel: aws.String("VersionLabel"), // Required AutoCreateApplication: aws.Boolean(true), Description: aws.String("Description"), SourceBundle: &elasticbeanstalk.S3Location{ S3Bucket: aws.String("S3Bucket"), S3Key: aws.String("S3Key"), }, } resp, err := svc.CreateApplicationVersion(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)) }
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)) }
func ExampleDataPipeline_DescribeObjects() { svc := datapipeline.New(nil) params := &datapipeline.DescribeObjectsInput{ ObjectIDs: []*string{ // Required aws.String("id"), // Required // More values... }, PipelineID: aws.String("id"), // Required EvaluateExpressions: aws.Boolean(true), Marker: aws.String("string"), } resp, err := svc.DescribeObjects(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)) }