123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809 |
- // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
- package elasticbeanstalk_test
- import (
- "bytes"
- "fmt"
- "time"
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/service/elasticbeanstalk"
- )
- var _ time.Duration
- var _ bytes.Buffer
- func ExampleElasticBeanstalk_AbortEnvironmentUpdate() {
- svc := elasticbeanstalk.New(nil)
- params := &elasticbeanstalk.AbortEnvironmentUpdateInput{
- EnvironmentId: aws.String("EnvironmentId"),
- EnvironmentName: aws.String("EnvironmentName"),
- }
- resp, err := svc.AbortEnvironmentUpdate(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)
- }
- func ExampleElasticBeanstalk_CheckDNSAvailability() {
- svc := elasticbeanstalk.New(nil)
- params := &elasticbeanstalk.CheckDNSAvailabilityInput{
- CNAMEPrefix: aws.String("DNSCnamePrefix"), // Required
- }
- resp, err := svc.CheckDNSAvailability(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)
- }
- func ExampleElasticBeanstalk_CreateApplication() {
- svc := elasticbeanstalk.New(nil)
- params := &elasticbeanstalk.CreateApplicationInput{
- ApplicationName: aws.String("ApplicationName"), // Required
- Description: aws.String("Description"),
- }
- resp, err := svc.CreateApplication(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)
- }
- func ExampleElasticBeanstalk_CreateApplicationVersion() {
- svc := elasticbeanstalk.New(nil)
- params := &elasticbeanstalk.CreateApplicationVersionInput{
- ApplicationName: aws.String("ApplicationName"), // Required
- VersionLabel: aws.String("VersionLabel"), // Required
- AutoCreateApplication: aws.Bool(true),
- Description: aws.String("Description"),
- SourceBundle: &elasticbeanstalk.S3Location{
- S3Bucket: aws.String("S3Bucket"),
- S3Key: aws.String("S3Key"),
- },
- }
- resp, err := svc.CreateApplicationVersion(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)
- }
- func ExampleElasticBeanstalk_CreateConfigurationTemplate() {
- svc := elasticbeanstalk.New(nil)
- params := &elasticbeanstalk.CreateConfigurationTemplateInput{
- ApplicationName: aws.String("ApplicationName"), // Required
- TemplateName: aws.String("ConfigurationTemplateName"), // Required
- Description: aws.String("Description"),
- EnvironmentId: aws.String("EnvironmentId"),
- OptionSettings: []*elasticbeanstalk.ConfigurationOptionSetting{
- { // Required
- Namespace: aws.String("OptionNamespace"),
- OptionName: aws.String("ConfigurationOptionName"),
- ResourceName: aws.String("ResourceName"),
- Value: aws.String("ConfigurationOptionValue"),
- },
- // More values...
- },
- SolutionStackName: aws.String("SolutionStackName"),
- SourceConfiguration: &elasticbeanstalk.SourceConfiguration{
- ApplicationName: aws.String("ApplicationName"),
- TemplateName: aws.String("ConfigurationTemplateName"),
- },
- }
- resp, err := svc.CreateConfigurationTemplate(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)
- }
- func ExampleElasticBeanstalk_CreateEnvironment() {
- svc := elasticbeanstalk.New(nil)
- params := &elasticbeanstalk.CreateEnvironmentInput{
- ApplicationName: aws.String("ApplicationName"), // Required
- EnvironmentName: aws.String("EnvironmentName"), // Required
- CNAMEPrefix: aws.String("DNSCnamePrefix"),
- Description: aws.String("Description"),
- OptionSettings: []*elasticbeanstalk.ConfigurationOptionSetting{
- { // Required
- Namespace: aws.String("OptionNamespace"),
- OptionName: aws.String("ConfigurationOptionName"),
- ResourceName: aws.String("ResourceName"),
- Value: aws.String("ConfigurationOptionValue"),
- },
- // More values...
- },
- OptionsToRemove: []*elasticbeanstalk.OptionSpecification{
- { // Required
- Namespace: aws.String("OptionNamespace"),
- OptionName: aws.String("ConfigurationOptionName"),
- ResourceName: aws.String("ResourceName"),
- },
- // More values...
- },
- SolutionStackName: aws.String("SolutionStackName"),
- Tags: []*elasticbeanstalk.Tag{
- { // Required
- Key: aws.String("TagKey"),
- Value: aws.String("TagValue"),
- },
- // More values...
- },
- TemplateName: aws.String("ConfigurationTemplateName"),
- Tier: &elasticbeanstalk.EnvironmentTier{
- Name: aws.String("String"),
- Type: aws.String("String"),
- Version: aws.String("String"),
- },
- VersionLabel: aws.String("VersionLabel"),
- }
- resp, err := svc.CreateEnvironment(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)
- }
- func ExampleElasticBeanstalk_CreateStorageLocation() {
- svc := elasticbeanstalk.New(nil)
- var params *elasticbeanstalk.CreateStorageLocationInput
- resp, err := svc.CreateStorageLocation(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)
- }
- func ExampleElasticBeanstalk_DeleteApplication() {
- svc := elasticbeanstalk.New(nil)
- params := &elasticbeanstalk.DeleteApplicationInput{
- ApplicationName: aws.String("ApplicationName"), // Required
- TerminateEnvByForce: aws.Bool(true),
- }
- resp, err := svc.DeleteApplication(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)
- }
- func ExampleElasticBeanstalk_DeleteApplicationVersion() {
- svc := elasticbeanstalk.New(nil)
- params := &elasticbeanstalk.DeleteApplicationVersionInput{
- ApplicationName: aws.String("ApplicationName"), // Required
- VersionLabel: aws.String("VersionLabel"), // Required
- DeleteSourceBundle: aws.Bool(true),
- }
- resp, err := svc.DeleteApplicationVersion(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)
- }
- func ExampleElasticBeanstalk_DeleteConfigurationTemplate() {
- svc := elasticbeanstalk.New(nil)
- params := &elasticbeanstalk.DeleteConfigurationTemplateInput{
- ApplicationName: aws.String("ApplicationName"), // Required
- TemplateName: aws.String("ConfigurationTemplateName"), // Required
- }
- resp, err := svc.DeleteConfigurationTemplate(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)
- }
- func ExampleElasticBeanstalk_DeleteEnvironmentConfiguration() {
- svc := elasticbeanstalk.New(nil)
- params := &elasticbeanstalk.DeleteEnvironmentConfigurationInput{
- ApplicationName: aws.String("ApplicationName"), // Required
- EnvironmentName: aws.String("EnvironmentName"), // Required
- }
- resp, err := svc.DeleteEnvironmentConfiguration(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)
- }
- func ExampleElasticBeanstalk_DescribeApplicationVersions() {
- svc := elasticbeanstalk.New(nil)
- params := &elasticbeanstalk.DescribeApplicationVersionsInput{
- ApplicationName: aws.String("ApplicationName"),
- VersionLabels: []*string{
- aws.String("VersionLabel"), // Required
- // More values...
- },
- }
- resp, err := svc.DescribeApplicationVersions(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)
- }
- func ExampleElasticBeanstalk_DescribeApplications() {
- svc := elasticbeanstalk.New(nil)
- params := &elasticbeanstalk.DescribeApplicationsInput{
- ApplicationNames: []*string{
- aws.String("ApplicationName"), // Required
- // More values...
- },
- }
- resp, err := svc.DescribeApplications(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)
- }
- func ExampleElasticBeanstalk_DescribeConfigurationOptions() {
- svc := elasticbeanstalk.New(nil)
- params := &elasticbeanstalk.DescribeConfigurationOptionsInput{
- ApplicationName: aws.String("ApplicationName"),
- EnvironmentName: aws.String("EnvironmentName"),
- Options: []*elasticbeanstalk.OptionSpecification{
- { // Required
- Namespace: aws.String("OptionNamespace"),
- OptionName: aws.String("ConfigurationOptionName"),
- ResourceName: aws.String("ResourceName"),
- },
- // More values...
- },
- SolutionStackName: aws.String("SolutionStackName"),
- TemplateName: aws.String("ConfigurationTemplateName"),
- }
- resp, err := svc.DescribeConfigurationOptions(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)
- }
- func ExampleElasticBeanstalk_DescribeConfigurationSettings() {
- svc := elasticbeanstalk.New(nil)
- params := &elasticbeanstalk.DescribeConfigurationSettingsInput{
- ApplicationName: aws.String("ApplicationName"), // Required
- EnvironmentName: aws.String("EnvironmentName"),
- TemplateName: aws.String("ConfigurationTemplateName"),
- }
- resp, err := svc.DescribeConfigurationSettings(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)
- }
- func ExampleElasticBeanstalk_DescribeEnvironmentHealth() {
- svc := elasticbeanstalk.New(nil)
- params := &elasticbeanstalk.DescribeEnvironmentHealthInput{
- AttributeNames: []*string{
- aws.String("EnvironmentHealthAttribute"), // Required
- // More values...
- },
- EnvironmentId: aws.String("EnvironmentId"),
- EnvironmentName: aws.String("EnvironmentName"),
- }
- resp, err := svc.DescribeEnvironmentHealth(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)
- }
- func ExampleElasticBeanstalk_DescribeEnvironmentResources() {
- svc := elasticbeanstalk.New(nil)
- params := &elasticbeanstalk.DescribeEnvironmentResourcesInput{
- EnvironmentId: aws.String("EnvironmentId"),
- EnvironmentName: aws.String("EnvironmentName"),
- }
- resp, err := svc.DescribeEnvironmentResources(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)
- }
- 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.Bool(true),
- IncludedDeletedBackTo: aws.Time(time.Now()),
- VersionLabel: aws.String("VersionLabel"),
- }
- resp, err := svc.DescribeEnvironments(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)
- }
- func ExampleElasticBeanstalk_DescribeEvents() {
- svc := elasticbeanstalk.New(nil)
- params := &elasticbeanstalk.DescribeEventsInput{
- ApplicationName: aws.String("ApplicationName"),
- EndTime: aws.Time(time.Now()),
- EnvironmentId: aws.String("EnvironmentId"),
- EnvironmentName: aws.String("EnvironmentName"),
- MaxRecords: aws.Int64(1),
- NextToken: aws.String("Token"),
- RequestId: aws.String("RequestId"),
- Severity: aws.String("EventSeverity"),
- StartTime: aws.Time(time.Now()),
- TemplateName: aws.String("ConfigurationTemplateName"),
- VersionLabel: aws.String("VersionLabel"),
- }
- resp, err := svc.DescribeEvents(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)
- }
- func ExampleElasticBeanstalk_DescribeInstancesHealth() {
- svc := elasticbeanstalk.New(nil)
- params := &elasticbeanstalk.DescribeInstancesHealthInput{
- AttributeNames: []*string{
- aws.String("InstancesHealthAttribute"), // Required
- // More values...
- },
- EnvironmentId: aws.String("EnvironmentId"),
- EnvironmentName: aws.String("EnvironmentName"),
- NextToken: aws.String("NextToken"),
- }
- resp, err := svc.DescribeInstancesHealth(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)
- }
- func ExampleElasticBeanstalk_ListAvailableSolutionStacks() {
- svc := elasticbeanstalk.New(nil)
- var params *elasticbeanstalk.ListAvailableSolutionStacksInput
- resp, err := svc.ListAvailableSolutionStacks(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)
- }
- func ExampleElasticBeanstalk_RebuildEnvironment() {
- svc := elasticbeanstalk.New(nil)
- params := &elasticbeanstalk.RebuildEnvironmentInput{
- EnvironmentId: aws.String("EnvironmentId"),
- EnvironmentName: aws.String("EnvironmentName"),
- }
- resp, err := svc.RebuildEnvironment(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)
- }
- func ExampleElasticBeanstalk_RequestEnvironmentInfo() {
- svc := elasticbeanstalk.New(nil)
- params := &elasticbeanstalk.RequestEnvironmentInfoInput{
- InfoType: aws.String("EnvironmentInfoType"), // Required
- EnvironmentId: aws.String("EnvironmentId"),
- EnvironmentName: aws.String("EnvironmentName"),
- }
- resp, err := svc.RequestEnvironmentInfo(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)
- }
- func ExampleElasticBeanstalk_RestartAppServer() {
- svc := elasticbeanstalk.New(nil)
- params := &elasticbeanstalk.RestartAppServerInput{
- EnvironmentId: aws.String("EnvironmentId"),
- EnvironmentName: aws.String("EnvironmentName"),
- }
- resp, err := svc.RestartAppServer(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)
- }
- func ExampleElasticBeanstalk_RetrieveEnvironmentInfo() {
- svc := elasticbeanstalk.New(nil)
- params := &elasticbeanstalk.RetrieveEnvironmentInfoInput{
- InfoType: aws.String("EnvironmentInfoType"), // Required
- EnvironmentId: aws.String("EnvironmentId"),
- EnvironmentName: aws.String("EnvironmentName"),
- }
- resp, err := svc.RetrieveEnvironmentInfo(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)
- }
- func ExampleElasticBeanstalk_SwapEnvironmentCNAMEs() {
- svc := elasticbeanstalk.New(nil)
- params := &elasticbeanstalk.SwapEnvironmentCNAMEsInput{
- DestinationEnvironmentId: aws.String("EnvironmentId"),
- DestinationEnvironmentName: aws.String("EnvironmentName"),
- SourceEnvironmentId: aws.String("EnvironmentId"),
- SourceEnvironmentName: aws.String("EnvironmentName"),
- }
- resp, err := svc.SwapEnvironmentCNAMEs(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)
- }
- func ExampleElasticBeanstalk_TerminateEnvironment() {
- svc := elasticbeanstalk.New(nil)
- params := &elasticbeanstalk.TerminateEnvironmentInput{
- EnvironmentId: aws.String("EnvironmentId"),
- EnvironmentName: aws.String("EnvironmentName"),
- TerminateResources: aws.Bool(true),
- }
- resp, err := svc.TerminateEnvironment(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)
- }
- func ExampleElasticBeanstalk_UpdateApplication() {
- svc := elasticbeanstalk.New(nil)
- params := &elasticbeanstalk.UpdateApplicationInput{
- ApplicationName: aws.String("ApplicationName"), // Required
- Description: aws.String("Description"),
- }
- resp, err := svc.UpdateApplication(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)
- }
- func ExampleElasticBeanstalk_UpdateApplicationVersion() {
- svc := elasticbeanstalk.New(nil)
- params := &elasticbeanstalk.UpdateApplicationVersionInput{
- ApplicationName: aws.String("ApplicationName"), // Required
- VersionLabel: aws.String("VersionLabel"), // Required
- Description: aws.String("Description"),
- }
- resp, err := svc.UpdateApplicationVersion(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)
- }
- func ExampleElasticBeanstalk_UpdateConfigurationTemplate() {
- svc := elasticbeanstalk.New(nil)
- params := &elasticbeanstalk.UpdateConfigurationTemplateInput{
- ApplicationName: aws.String("ApplicationName"), // Required
- TemplateName: aws.String("ConfigurationTemplateName"), // Required
- Description: aws.String("Description"),
- OptionSettings: []*elasticbeanstalk.ConfigurationOptionSetting{
- { // Required
- Namespace: aws.String("OptionNamespace"),
- OptionName: aws.String("ConfigurationOptionName"),
- ResourceName: aws.String("ResourceName"),
- Value: aws.String("ConfigurationOptionValue"),
- },
- // More values...
- },
- OptionsToRemove: []*elasticbeanstalk.OptionSpecification{
- { // Required
- Namespace: aws.String("OptionNamespace"),
- OptionName: aws.String("ConfigurationOptionName"),
- ResourceName: aws.String("ResourceName"),
- },
- // More values...
- },
- }
- resp, err := svc.UpdateConfigurationTemplate(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)
- }
- func ExampleElasticBeanstalk_UpdateEnvironment() {
- svc := elasticbeanstalk.New(nil)
- params := &elasticbeanstalk.UpdateEnvironmentInput{
- Description: aws.String("Description"),
- EnvironmentId: aws.String("EnvironmentId"),
- EnvironmentName: aws.String("EnvironmentName"),
- OptionSettings: []*elasticbeanstalk.ConfigurationOptionSetting{
- { // Required
- Namespace: aws.String("OptionNamespace"),
- OptionName: aws.String("ConfigurationOptionName"),
- ResourceName: aws.String("ResourceName"),
- Value: aws.String("ConfigurationOptionValue"),
- },
- // More values...
- },
- OptionsToRemove: []*elasticbeanstalk.OptionSpecification{
- { // Required
- Namespace: aws.String("OptionNamespace"),
- OptionName: aws.String("ConfigurationOptionName"),
- ResourceName: aws.String("ResourceName"),
- },
- // More values...
- },
- SolutionStackName: aws.String("SolutionStackName"),
- TemplateName: aws.String("ConfigurationTemplateName"),
- Tier: &elasticbeanstalk.EnvironmentTier{
- Name: aws.String("String"),
- Type: aws.String("String"),
- Version: aws.String("String"),
- },
- VersionLabel: aws.String("VersionLabel"),
- }
- resp, err := svc.UpdateEnvironment(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)
- }
- func ExampleElasticBeanstalk_ValidateConfigurationSettings() {
- svc := elasticbeanstalk.New(nil)
- params := &elasticbeanstalk.ValidateConfigurationSettingsInput{
- ApplicationName: aws.String("ApplicationName"), // Required
- OptionSettings: []*elasticbeanstalk.ConfigurationOptionSetting{ // Required
- { // Required
- Namespace: aws.String("OptionNamespace"),
- OptionName: aws.String("ConfigurationOptionName"),
- ResourceName: aws.String("ResourceName"),
- Value: aws.String("ConfigurationOptionValue"),
- },
- // More values...
- },
- EnvironmentName: aws.String("EnvironmentName"),
- TemplateName: aws.String("ConfigurationTemplateName"),
- }
- resp, err := svc.ValidateConfigurationSettings(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)
- }
|