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 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_DescribeVolumes() { svc := opsworks.New(nil) params := &opsworks.DescribeVolumesInput{ InstanceID: aws.String("String"), RAIDArrayID: aws.String("String"), StackID: aws.String("String"), VolumeIDs: []*string{ aws.String("String"), // Required // More values... }, } resp, err := svc.DescribeVolumes(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_RegisterInstance() { svc := opsworks.New(nil) params := &opsworks.RegisterInstanceInput{ StackID: aws.String("String"), // Required Hostname: aws.String("String"), InstanceIdentity: &opsworks.InstanceIdentity{ Document: aws.String("String"), Signature: aws.String("String"), }, PrivateIP: aws.String("String"), PublicIP: aws.String("String"), RSAPublicKey: aws.String("String"), RSAPublicKeyFingerprint: aws.String("String"), } resp, err := svc.RegisterInstance(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 ExampleOpsWorks_SetTimeBasedAutoScaling() { svc := opsworks.New(nil) params := &opsworks.SetTimeBasedAutoScalingInput{ InstanceID: aws.String("String"), // Required AutoScalingSchedule: &opsworks.WeeklyAutoScalingSchedule{ Friday: &map[string]*string{ "Key": aws.String("Switch"), // Required // More values... }, Monday: &map[string]*string{ "Key": aws.String("Switch"), // Required // More values... }, Saturday: &map[string]*string{ "Key": aws.String("Switch"), // Required // More values... }, Sunday: &map[string]*string{ "Key": aws.String("Switch"), // Required // More values... }, Thursday: &map[string]*string{ "Key": aws.String("Switch"), // Required // More values... }, Tuesday: &map[string]*string{ "Key": aws.String("Switch"), // Required // More values... }, Wednesday: &map[string]*string{ "Key": aws.String("Switch"), // Required // More values... }, }, } resp, err := svc.SetTimeBasedAutoScaling(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_DescribeMyUserProfile() { svc := opsworks.New(nil) var params *opsworks.DescribeMyUserProfileInput resp, err := svc.DescribeMyUserProfile(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_GetHostnameSuggestion() { svc := opsworks.New(nil) params := &opsworks.GetHostnameSuggestionInput{ LayerID: aws.String("String"), // Required } resp, err := svc.GetHostnameSuggestion(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_UpdateMyUserProfile() { svc := opsworks.New(nil) params := &opsworks.UpdateMyUserProfileInput{ SSHPublicKey: aws.String("String"), } resp, err := svc.UpdateMyUserProfile(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_DescribeStackSummary() { svc := opsworks.New(nil) params := &opsworks.DescribeStackSummaryInput{ StackID: aws.String("String"), // Required } resp, err := svc.DescribeStackSummary(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_AttachElasticLoadBalancer() { svc := opsworks.New(nil) params := &opsworks.AttachElasticLoadBalancerInput{ ElasticLoadBalancerName: aws.String("String"), // Required LayerID: aws.String("String"), // Required } resp, err := svc.AttachElasticLoadBalancer(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_AssociateElasticIP() { svc := opsworks.New(nil) params := &opsworks.AssociateElasticIPInput{ ElasticIP: aws.String("String"), // Required InstanceID: aws.String("String"), } resp, err := svc.AssociateElasticIP(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_UpdateRDSDBInstance() { svc := opsworks.New(nil) params := &opsworks.UpdateRDSDBInstanceInput{ RDSDBInstanceARN: aws.String("String"), // Required DBPassword: aws.String("String"), DBUser: aws.String("String"), } resp, err := svc.UpdateRDSDBInstance(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_UpdateVolume() { svc := opsworks.New(nil) params := &opsworks.UpdateVolumeInput{ VolumeID: aws.String("String"), // Required MountPoint: aws.String("String"), Name: aws.String("String"), } resp, err := svc.UpdateVolume(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_DescribeLoadBasedAutoScaling() { svc := opsworks.New(nil) params := &opsworks.DescribeLoadBasedAutoScalingInput{ LayerIDs: []*string{ // Required aws.String("String"), // Required // More values... }, } resp, err := svc.DescribeLoadBasedAutoScaling(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_CreateUserProfile() { svc := opsworks.New(nil) params := &opsworks.CreateUserProfileInput{ IAMUserARN: aws.String("String"), // Required AllowSelfManagement: aws.Boolean(true), SSHPublicKey: aws.String("String"), SSHUsername: aws.String("String"), } resp, err := svc.CreateUserProfile(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_SetPermission() { svc := opsworks.New(nil) params := &opsworks.SetPermissionInput{ IAMUserARN: aws.String("String"), // Required StackID: aws.String("String"), // Required AllowSSH: aws.Boolean(true), AllowSudo: aws.Boolean(true), Level: aws.String("String"), } resp, err := svc.SetPermission(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_SetLoadBasedAutoScaling() { svc := opsworks.New(nil) params := &opsworks.SetLoadBasedAutoScalingInput{ LayerID: aws.String("String"), // Required DownScaling: &opsworks.AutoScalingThresholds{ CPUThreshold: aws.Double(1.0), IgnoreMetricsTime: aws.Long(1), InstanceCount: aws.Long(1), LoadThreshold: aws.Double(1.0), MemoryThreshold: aws.Double(1.0), ThresholdsWaitTime: aws.Long(1), }, Enable: aws.Boolean(true), UpScaling: &opsworks.AutoScalingThresholds{ CPUThreshold: aws.Double(1.0), IgnoreMetricsTime: aws.Long(1), InstanceCount: aws.Long(1), LoadThreshold: aws.Double(1.0), MemoryThreshold: aws.Double(1.0), ThresholdsWaitTime: aws.Long(1), }, } resp, err := svc.SetLoadBasedAutoScaling(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_CreateDeployment() { svc := opsworks.New(nil) params := &opsworks.CreateDeploymentInput{ Command: &opsworks.DeploymentCommand{ // Required Name: aws.String("DeploymentCommandName"), // Required Args: &map[string][]*string{ "Key": []*string{ // Required aws.String("String"), // Required // More values... }, // More values... }, }, StackID: aws.String("String"), // Required AppID: aws.String("String"), Comment: aws.String("String"), CustomJSON: aws.String("String"), InstanceIDs: []*string{ aws.String("String"), // Required // More values... }, } resp, err := svc.CreateDeployment(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_CreateLayer() { svc := opsworks.New(nil) params := &opsworks.CreateLayerInput{ Name: aws.String("String"), // Required Shortname: aws.String("String"), // Required StackID: aws.String("String"), // Required Type: aws.String("LayerType"), // Required Attributes: &map[string]*string{ "Key": aws.String("String"), // Required // More values... }, AutoAssignElasticIPs: aws.Boolean(true), AutoAssignPublicIPs: aws.Boolean(true), CustomInstanceProfileARN: aws.String("String"), CustomRecipes: &opsworks.Recipes{ Configure: []*string{ aws.String("String"), // Required // More values... }, Deploy: []*string{ aws.String("String"), // Required // More values... }, Setup: []*string{ aws.String("String"), // Required // More values... }, Shutdown: []*string{ aws.String("String"), // Required // More values... }, Undeploy: []*string{ aws.String("String"), // Required // More values... }, }, CustomSecurityGroupIDs: []*string{ aws.String("String"), // Required // More values... }, EnableAutoHealing: aws.Boolean(true), InstallUpdatesOnBoot: aws.Boolean(true), LifecycleEventConfiguration: &opsworks.LifecycleEventConfiguration{ Shutdown: &opsworks.ShutdownEventConfiguration{ DelayUntilELBConnectionsDrained: aws.Boolean(true), ExecutionTimeout: aws.Long(1), }, }, Packages: []*string{ aws.String("String"), // Required // More values... }, UseEBSOptimizedInstances: aws.Boolean(true), VolumeConfigurations: []*opsworks.VolumeConfiguration{ &opsworks.VolumeConfiguration{ // Required MountPoint: aws.String("String"), // Required NumberOfDisks: aws.Long(1), // Required Size: aws.Long(1), // Required IOPS: aws.Long(1), RAIDLevel: aws.Long(1), VolumeType: aws.String("String"), }, // More values... }, } resp, err := svc.CreateLayer(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)) }