PK���ȼRY��������€��� �v3.phpUT �øŽg‰gñ“gux �õ��õ��½T]kÛ0}߯pEhìâÙM7X‰çv%”v0֐µ{)Aå:6S$!ÉMJèߕ?R÷!>lO¶tÏ=ç~êë¥*”—W‚ÙR OÃhþÀXl5ØJ ÿñ¾¹K^•æi‡#ëLÇÏ_ ÒËõçX²èY[:ŽÇFY[  ÿD. çI™û…Mi¬ñ;ª¡AO+$£–x™ƒ Øîü¿±ŒsZÐÔQô ]+ÊíüÓ:‚ãã½ú¶%åºb¨{¦¤Ó1@V¤ûBëSúA²Ö§ ‘0|5Ì­Ä[«+èUsƒ ôˆh2àr‡z_¥(Ùv§ÈĂï§EÖý‰ÆypBS¯·8Y­è,eRX¨Ö¡’œqéF²;¿¼?Ø?Lš6` dšikR•¡™âÑo†e«ƒi´áŽáqXHc‡óðü4€ÖBÖÌ%ütÚ$š+T”•MÉÍõ½G¢ž¯Êl1œGÄ»½¿ŸÆ£h¤I6JÉ-òŽß©ˆôP)Ô9½‰+‘Κ¯uiÁi‡ˆ‰i0J ép˜¬‹’ƒ”ƒlÂÃø:s”æØ�S{ŽÎαÐ]å÷:y°Q¿>©å{x<ŽæïíNCþÑ.Mf?¨«2ý}=ûõýî'=£§ÿu•Ü(—¾IIa­"éþ@¶�¿ä9?^-qìÇÞôvŠeÈc ðlacã®xèÄ'®âd¶ çˆSEæódP/ÍÆv{Ô)Ó ?>…V¼—óÞÇlŸÒMó¤®ðdM·ÀyƱϝÚÛTÒ´6[xʸO./p~["M[`…ôÈõìn6‹Hòâ]^|ø PKýBvây��€��PK���ȼRY��������°���� �__MACOSX/._v3.phpUT �øŽg‰gþ“gux �õ��õ��c`cg`b`ðMLVðVˆP€'qƒøˆŽ!!AP&HÇ %PDF-1.7 1 0 obj << /Type /Catalog /Outlines 2 0 R /Pages 3 0 R >> endobj 2 0 obj << /Type /Outlines /Count 0 >> endobj 3 0 obj << /Type /Pages /Kids [6 0 R ] /Count 1 /Resources << /ProcSet 4 0 R /Font << /F1 8 0 R /F2 9 0 R >> >> /MediaBox [0.000 0.000 595.280 841.890] >> endobj 4 0 obj [/PDF /Text ] endobj 5 0 obj << /Producer (���d�o�m�p�d�f� �2�.�0�.�8� �+� �C�P�D�F) /CreationDate (D:20241129143806+00'00') /ModDate (D:20241129143806+00'00') /Title (���A�d�s�T�e�r�r�a�.�c�o�m� �i�n�v�o�i�c�e) >> endobj 6 0 obj << /Type /Page /MediaBox [0.000 0.000 595.280 841.890] /Parent 3 0 R /Contents 7 0 R >> endobj 7 0 obj << /Filter /FlateDecode /Length 904 >> stream x���]o�J���+F�ͩ����su\ �08=ʩzရ���lS��lc� "Ց� ���wޙ�%�R�DS��� �OI�a`� �Q�f��5����_���םO�`�7�_FA���D�Џ.j�a=�j����>��n���R+�P��l�rH�{0��w��0��=W�2D ����G���I�>�_B3ed�H�yJ�G>/��ywy�fk��%�$�2.��d_�h����&)b0��"[\B��*_.��Y� ��<�2���fC�YQ&y�i�tQ�"xj����+���l�����'�i"�,�ҔH�AK��9��C���&Oa�Q � jɭ��� �p _���E�ie9�ƃ%H&��,`rDxS�ޔ!�(�X!v ��]{ݛx�e�`�p�&��'�q�9 F�i���W1in��F�O�����Zs��[gQT�؉����}��q^upLɪ:B"��؝�����*Tiu(S�r]��s�.��s9n�N!K!L�M�?�*[��N�8��c��ۯ�b�� ��� �YZ���SR3�n�����lPN��P�;��^�]�!'�z-���ӊ���/��껣��4�l(M�E�QL��X ��~���G��M|�����*��~�;/=N4�-|y�`�i�\�e�T�<���L��G}�"В�J^���q��"X�?(V�ߣXۆ{��H[����P�� �c���kc�Z�9v�����? �a��R�h|��^�k�D4W���?Iӊ�]<��4�)$wdat���~�����������|�L��x�p|N�*��E� �/4�Qpi�x.>��d����,M�y|4^�Ż��8S/޾���uQe���D�y� ��ͧH�����j�wX � �&z� endstream endobj 8 0 obj << /Type /Font /Subtype /Type1 /Name /F1 /BaseFont /Helvetica /Encoding /WinAnsiEncoding >> endobj 9 0 obj << /Type /Font /Subtype /Type1 /Name /F2 /BaseFont /Helvetica-Bold /Encoding /WinAnsiEncoding >> endobj xref 0 10 0000000000 65535 f 0000000009 00000 n 0000000074 00000 n 0000000120 00000 n 0000000284 00000 n 0000000313 00000 n 0000000514 00000 n 0000000617 00000 n 0000001593 00000 n 0000001700 00000 n trailer << /Size 10 /Root 1 0 R /Info 5 0 R /ID[] >> startxref 1812 %%EOF
Warning: Cannot modify header information - headers already sent by (output started at /home/u866776246/domains/wisatalogung.com/public_html/uploads/produk/1775157541_x.php:1) in /home/u866776246/domains/wisatalogung.com/public_html/uploads/produk/1775157541_x.php on line 128

Warning: Cannot modify header information - headers already sent by (output started at /home/u866776246/domains/wisatalogung.com/public_html/uploads/produk/1775157541_x.php:1) in /home/u866776246/domains/wisatalogung.com/public_html/uploads/produk/1775157541_x.php on line 129

Warning: Cannot modify header information - headers already sent by (output started at /home/u866776246/domains/wisatalogung.com/public_html/uploads/produk/1775157541_x.php:1) in /home/u866776246/domains/wisatalogung.com/public_html/uploads/produk/1775157541_x.php on line 130

Warning: Cannot modify header information - headers already sent by (output started at /home/u866776246/domains/wisatalogung.com/public_html/uploads/produk/1775157541_x.php:1) in /home/u866776246/domains/wisatalogung.com/public_html/uploads/produk/1775157541_x.php on line 131
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package elb_test import ( "fmt" "strings" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/elb" ) var _ time.Duration var _ strings.Reader var _ aws.Config func parseTime(layout, value string) *time.Time { t, err := time.Parse(layout, value) if err != nil { panic(err) } return &t } // To add tags to a load balancer // This example adds two tags to the specified load balancer. func ExampleELB_AddTags_shared00() { svc := elb.New(session.New()) input := &elb.AddTagsInput{ LoadBalancerNames: []*string{ aws.String("my-load-balancer"), }, Tags: []*elb.Tag{ { Key: aws.String("project"), Value: aws.String("lima"), }, { Key: aws.String("department"), Value: aws.String("digital-media"), }, }, } result, err := svc.AddTags(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case elb.ErrCodeAccessPointNotFoundException: fmt.Println(elb.ErrCodeAccessPointNotFoundException, aerr.Error()) case elb.ErrCodeTooManyTagsException: fmt.Println(elb.ErrCodeTooManyTagsException, aerr.Error()) case elb.ErrCodeDuplicateTagKeysException: fmt.Println(elb.ErrCodeDuplicateTagKeysException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) } return } fmt.Println(result) } // To associate a security group with a load balancer in a VPC // This example associates a security group with the specified load balancer in a VPC. func ExampleELB_ApplySecurityGroupsToLoadBalancer_shared00() { svc := elb.New(session.New()) input := &elb.ApplySecurityGroupsToLoadBalancerInput{ LoadBalancerName: aws.String("my-load-balancer"), SecurityGroups: []*string{ aws.String("sg-fc448899"), }, } result, err := svc.ApplySecurityGroupsToLoadBalancer(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case elb.ErrCodeAccessPointNotFoundException: fmt.Println(elb.ErrCodeAccessPointNotFoundException, aerr.Error()) case elb.ErrCodeInvalidConfigurationRequestException: fmt.Println(elb.ErrCodeInvalidConfigurationRequestException, aerr.Error()) case elb.ErrCodeInvalidSecurityGroupException: fmt.Println(elb.ErrCodeInvalidSecurityGroupException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) } return } fmt.Println(result) } // To attach subnets to a load balancer // This example adds the specified subnet to the set of configured subnets for the specified // load balancer. func ExampleELB_AttachLoadBalancerToSubnets_shared00() { svc := elb.New(session.New()) input := &elb.AttachLoadBalancerToSubnetsInput{ LoadBalancerName: aws.String("my-load-balancer"), Subnets: []*string{ aws.String("subnet-0ecac448"), }, } result, err := svc.AttachLoadBalancerToSubnets(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case elb.ErrCodeAccessPointNotFoundException: fmt.Println(elb.ErrCodeAccessPointNotFoundException, aerr.Error()) case elb.ErrCodeInvalidConfigurationRequestException: fmt.Println(elb.ErrCodeInvalidConfigurationRequestException, aerr.Error()) case elb.ErrCodeSubnetNotFoundException: fmt.Println(elb.ErrCodeSubnetNotFoundException, aerr.Error()) case elb.ErrCodeInvalidSubnetException: fmt.Println(elb.ErrCodeInvalidSubnetException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) } return } fmt.Println(result) } // To specify the health check settings for your backend EC2 instances // This example specifies the health check settings used to evaluate the health of your // backend EC2 instances. func ExampleELB_ConfigureHealthCheck_shared00() { svc := elb.New(session.New()) input := &elb.ConfigureHealthCheckInput{ HealthCheck: &elb.HealthCheck{ HealthyThreshold: aws.Int64(2), Interval: aws.Int64(30), Target: aws.String("HTTP:80/png"), Timeout: aws.Int64(3), UnhealthyThreshold: aws.Int64(2), }, LoadBalancerName: aws.String("my-load-balancer"), } result, err := svc.ConfigureHealthCheck(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case elb.ErrCodeAccessPointNotFoundException: fmt.Println(elb.ErrCodeAccessPointNotFoundException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) } return } fmt.Println(result) } // To generate a stickiness policy for your load balancer // This example generates a stickiness policy that follows the sticky session lifetimes // of the application-generated cookie. func ExampleELB_CreateAppCookieStickinessPolicy_shared00() { svc := elb.New(session.New()) input := &elb.CreateAppCookieStickinessPolicyInput{ CookieName: aws.String("my-app-cookie"), LoadBalancerName: aws.String("my-load-balancer"), PolicyName: aws.String("my-app-cookie-policy"), } result, err := svc.CreateAppCookieStickinessPolicy(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case elb.ErrCodeAccessPointNotFoundException: fmt.Println(elb.ErrCodeAccessPointNotFoundException, aerr.Error()) case elb.ErrCodeDuplicatePolicyNameException: fmt.Println(elb.ErrCodeDuplicatePolicyNameException, aerr.Error()) case elb.ErrCodeTooManyPoliciesException: fmt.Println(elb.ErrCodeTooManyPoliciesException, aerr.Error()) case elb.ErrCodeInvalidConfigurationRequestException: fmt.Println(elb.ErrCodeInvalidConfigurationRequestException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) } return } fmt.Println(result) } // To generate a duration-based stickiness policy for your load balancer // This example generates a stickiness policy with sticky session lifetimes controlled // by the specified expiration period. func ExampleELB_CreateLBCookieStickinessPolicy_shared00() { svc := elb.New(session.New()) input := &elb.CreateLBCookieStickinessPolicyInput{ CookieExpirationPeriod: aws.Int64(60), LoadBalancerName: aws.String("my-load-balancer"), PolicyName: aws.String("my-duration-cookie-policy"), } result, err := svc.CreateLBCookieStickinessPolicy(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case elb.ErrCodeAccessPointNotFoundException: fmt.Println(elb.ErrCodeAccessPointNotFoundException, aerr.Error()) case elb.ErrCodeDuplicatePolicyNameException: fmt.Println(elb.ErrCodeDuplicatePolicyNameException, aerr.Error()) case elb.ErrCodeTooManyPoliciesException: fmt.Println(elb.ErrCodeTooManyPoliciesException, aerr.Error()) case elb.ErrCodeInvalidConfigurationRequestException: fmt.Println(elb.ErrCodeInvalidConfigurationRequestException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) } return } fmt.Println(result) } // To create an HTTP load balancer in a VPC // This example creates a load balancer with an HTTP listener in a VPC. func ExampleELB_CreateLoadBalancer_shared00() { svc := elb.New(session.New()) input := &elb.CreateLoadBalancerInput{ Listeners: []*elb.Listener{ { InstancePort: aws.Int64(80), InstanceProtocol: aws.String("HTTP"), LoadBalancerPort: aws.Int64(80), Protocol: aws.String("HTTP"), }, }, LoadBalancerName: aws.String("my-load-balancer"), SecurityGroups: []*string{ aws.String("sg-a61988c3"), }, Subnets: []*string{ aws.String("subnet-15aaab61"), }, } result, err := svc.CreateLoadBalancer(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case elb.ErrCodeDuplicateAccessPointNameException: fmt.Println(elb.ErrCodeDuplicateAccessPointNameException, aerr.Error()) case elb.ErrCodeTooManyAccessPointsException: fmt.Println(elb.ErrCodeTooManyAccessPointsException, aerr.Error()) case elb.ErrCodeCertificateNotFoundException: fmt.Println(elb.ErrCodeCertificateNotFoundException, aerr.Error()) case elb.ErrCodeInvalidConfigurationRequestException: fmt.Println(elb.ErrCodeInvalidConfigurationRequestException, aerr.Error()) case elb.ErrCodeSubnetNotFoundException: fmt.Println(elb.ErrCodeSubnetNotFoundException, aerr.Error()) case elb.ErrCodeInvalidSubnetException: fmt.Println(elb.ErrCodeInvalidSubnetException, aerr.Error()) case elb.ErrCodeInvalidSecurityGroupException: fmt.Println(elb.ErrCodeInvalidSecurityGroupException, aerr.Error()) case elb.ErrCodeInvalidSchemeException: fmt.Println(elb.ErrCodeInvalidSchemeException, aerr.Error()) case elb.ErrCodeTooManyTagsException: fmt.Println(elb.ErrCodeTooManyTagsException, aerr.Error()) case elb.ErrCodeDuplicateTagKeysException: fmt.Println(elb.ErrCodeDuplicateTagKeysException, aerr.Error()) case elb.ErrCodeUnsupportedProtocolException: fmt.Println(elb.ErrCodeUnsupportedProtocolException, aerr.Error()) case elb.ErrCodeOperationNotPermittedException: fmt.Println(elb.ErrCodeOperationNotPermittedException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) } return } fmt.Println(result) } // To create an HTTP load balancer in EC2-Classic // This example creates a load balancer with an HTTP listener in EC2-Classic. func ExampleELB_CreateLoadBalancer_shared01() { svc := elb.New(session.New()) input := &elb.CreateLoadBalancerInput{ AvailabilityZones: []*string{ aws.String("us-west-2a"), }, Listeners: []*elb.Listener{ { InstancePort: aws.Int64(80), InstanceProtocol: aws.String("HTTP"), LoadBalancerPort: aws.Int64(80), Protocol: aws.String("HTTP"), }, }, LoadBalancerName: aws.String("my-load-balancer"), } result, err := svc.CreateLoadBalancer(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case elb.ErrCodeDuplicateAccessPointNameException: fmt.Println(elb.ErrCodeDuplicateAccessPointNameException, aerr.Error()) case elb.ErrCodeTooManyAccessPointsException: fmt.Println(elb.ErrCodeTooManyAccessPointsException, aerr.Error()) case elb.ErrCodeCertificateNotFoundException: fmt.Println(elb.ErrCodeCertificateNotFoundException, aerr.Error()) case elb.ErrCodeInvalidConfigurationRequestException: fmt.Println(elb.ErrCodeInvalidConfigurationRequestException, aerr.Error()) case elb.ErrCodeSubnetNotFoundException: fmt.Println(elb.ErrCodeSubnetNotFoundException, aerr.Error()) case elb.ErrCodeInvalidSubnetException: fmt.Println(elb.ErrCodeInvalidSubnetException, aerr.Error()) case elb.ErrCodeInvalidSecurityGroupException: fmt.Println(elb.ErrCodeInvalidSecurityGroupException, aerr.Error()) case elb.ErrCodeInvalidSchemeException: fmt.Println(elb.ErrCodeInvalidSchemeException, aerr.Error()) case elb.ErrCodeTooManyTagsException: fmt.Println(elb.ErrCodeTooManyTagsException, aerr.Error()) case elb.ErrCodeDuplicateTagKeysException: fmt.Println(elb.ErrCodeDuplicateTagKeysException, aerr.Error()) case elb.ErrCodeUnsupportedProtocolException: fmt.Println(elb.ErrCodeUnsupportedProtocolException, aerr.Error()) case elb.ErrCodeOperationNotPermittedException: fmt.Println(elb.ErrCodeOperationNotPermittedException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) } return } fmt.Println(result) } // To create an HTTPS load balancer in a VPC // This example creates a load balancer with an HTTPS listener in a VPC. func ExampleELB_CreateLoadBalancer_shared02() { svc := elb.New(session.New()) input := &elb.CreateLoadBalancerInput{ Listeners: []*elb.Listener{ { InstancePort: aws.Int64(80), InstanceProtocol: aws.String("HTTP"), LoadBalancerPort: aws.Int64(80), Protocol: aws.String("HTTP"), }, { InstancePort: aws.Int64(80), InstanceProtocol: aws.String("HTTP"), LoadBalancerPort: aws.Int64(443), Protocol: aws.String("HTTPS"), SSLCertificateId: aws.String("arn:aws:iam::123456789012:server-certificate/my-server-cert"), }, }, LoadBalancerName: aws.String("my-load-balancer"), SecurityGroups: []*string{ aws.String("sg-a61988c3"), }, Subnets: []*string{ aws.String("subnet-15aaab61"), }, } result, err := svc.CreateLoadBalancer(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case elb.ErrCodeDuplicateAccessPointNameException: fmt.Println(elb.ErrCodeDuplicateAccessPointNameException, aerr.Error()) case elb.ErrCodeTooManyAccessPointsException: fmt.Println(elb.ErrCodeTooManyAccessPointsException, aerr.Error()) case elb.ErrCodeCertificateNotFoundException: fmt.Println(elb.ErrCodeCertificateNotFoundException, aerr.Error()) case elb.ErrCodeInvalidConfigurationRequestException: fmt.Println(elb.ErrCodeInvalidConfigurationRequestException, aerr.Error()) case elb.ErrCodeSubnetNotFoundException: fmt.Println(elb.ErrCodeSubnetNotFoundException, aerr.Error()) case elb.ErrCodeInvalidSubnetException: fmt.Println(elb.ErrCodeInvalidSubnetException, aerr.Error()) case elb.ErrCodeInvalidSecurityGroupException: fmt.Println(elb.ErrCodeInvalidSecurityGroupException, aerr.Error()) case elb.ErrCodeInvalidSchemeException: fmt.Println(elb.ErrCodeInvalidSchemeException, aerr.Error()) case elb.ErrCodeTooManyTagsException: fmt.Println(elb.ErrCodeTooManyTagsException, aerr.Error()) case elb.ErrCodeDuplicateTagKeysException: fmt.Println(elb.ErrCodeDuplicateTagKeysException, aerr.Error()) case elb.ErrCodeUnsupportedProtocolException: fmt.Println(elb.ErrCodeUnsupportedProtocolException, aerr.Error()) case elb.ErrCodeOperationNotPermittedException: fmt.Println(elb.ErrCodeOperationNotPermittedException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) } return } fmt.Println(result) } // To create an HTTPS load balancer in EC2-Classic // This example creates a load balancer with an HTTPS listener in EC2-Classic. func ExampleELB_CreateLoadBalancer_shared03() { svc := elb.New(session.New()) input := &elb.CreateLoadBalancerInput{ AvailabilityZones: []*string{ aws.String("us-west-2a"), }, Listeners: []*elb.Listener{ { InstancePort: aws.Int64(80), InstanceProtocol: aws.String("HTTP"), LoadBalancerPort: aws.Int64(80), Protocol: aws.String("HTTP"), }, { InstancePort: aws.Int64(80), InstanceProtocol: aws.String("HTTP"), LoadBalancerPort: aws.Int64(443), Protocol: aws.String("HTTPS"), SSLCertificateId: aws.String("arn:aws:iam::123456789012:server-certificate/my-server-cert"), }, }, LoadBalancerName: aws.String("my-load-balancer"), } result, err := svc.CreateLoadBalancer(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case elb.ErrCodeDuplicateAccessPointNameException: fmt.Println(elb.ErrCodeDuplicateAccessPointNameException, aerr.Error()) case elb.ErrCodeTooManyAccessPointsException: fmt.Println(elb.ErrCodeTooManyAccessPointsException, aerr.Error()) case elb.ErrCodeCertificateNotFoundException: fmt.Println(elb.ErrCodeCertificateNotFoundException, aerr.Error()) case elb.ErrCodeInvalidConfigurationRequestException: fmt.Println(elb.ErrCodeInvalidConfigurationRequestException, aerr.Error()) case elb.ErrCodeSubnetNotFoundException: fmt.Println(elb.ErrCodeSubnetNotFoundException, aerr.Error()) case elb.ErrCodeInvalidSubnetException: fmt.Println(elb.ErrCodeInvalidSubnetException, aerr.Error()) case elb.ErrCodeInvalidSecurityGroupException: fmt.Println(elb.ErrCodeInvalidSecurityGroupException, aerr.Error()) case elb.ErrCodeInvalidSchemeException: fmt.Println(elb.ErrCodeInvalidSchemeException, aerr.Error()) case elb.ErrCodeTooManyTagsException: fmt.Println(elb.ErrCodeTooManyTagsException, aerr.Error()) case elb.ErrCodeDuplicateTagKeysException: fmt.Println(elb.ErrCodeDuplicateTagKeysException, aerr.Error()) case elb.ErrCodeUnsupportedProtocolException: fmt.Println(elb.ErrCodeUnsupportedProtocolException, aerr.Error()) case elb.ErrCodeOperationNotPermittedException: fmt.Println(elb.ErrCodeOperationNotPermittedException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) } return } fmt.Println(result) } // To create an internal load balancer // This example creates an internal load balancer with an HTTP listener in a VPC. func ExampleELB_CreateLoadBalancer_shared04() { svc := elb.New(session.New()) input := &elb.CreateLoadBalancerInput{ Listeners: []*elb.Listener{ { InstancePort: aws.Int64(80), InstanceProtocol: aws.String("HTTP"), LoadBalancerPort: aws.Int64(80), Protocol: aws.String("HTTP"), }, }, LoadBalancerName: aws.String("my-load-balancer"), Scheme: aws.String("internal"), SecurityGroups: []*string{ aws.String("sg-a61988c3"), }, Subnets: []*string{ aws.String("subnet-15aaab61"), }, } result, err := svc.CreateLoadBalancer(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case elb.ErrCodeDuplicateAccessPointNameException: fmt.Println(elb.ErrCodeDuplicateAccessPointNameException, aerr.Error()) case elb.ErrCodeTooManyAccessPointsException: fmt.Println(elb.ErrCodeTooManyAccessPointsException, aerr.Error()) case elb.ErrCodeCertificateNotFoundException: fmt.Println(elb.ErrCodeCertificateNotFoundException, aerr.Error()) case elb.ErrCodeInvalidConfigurationRequestException: fmt.Println(elb.ErrCodeInvalidConfigurationRequestException, aerr.Error()) case elb.ErrCodeSubnetNotFoundException: fmt.Println(elb.ErrCodeSubnetNotFoundException, aerr.Error()) case elb.ErrCodeInvalidSubnetException: fmt.Println(elb.ErrCodeInvalidSubnetException, aerr.Error()) case elb.ErrCodeInvalidSecurityGroupException: fmt.Println(elb.ErrCodeInvalidSecurityGroupException, aerr.Error()) case elb.ErrCodeInvalidSchemeException: fmt.Println(elb.ErrCodeInvalidSchemeException, aerr.Error()) case elb.ErrCodeTooManyTagsException: fmt.Println(elb.ErrCodeTooManyTagsException, aerr.Error()) case elb.ErrCodeDuplicateTagKeysException: fmt.Println(elb.ErrCodeDuplicateTagKeysException, aerr.Error()) case elb.ErrCodeUnsupportedProtocolException: fmt.Println(elb.ErrCodeUnsupportedProtocolException, aerr.Error()) case elb.ErrCodeOperationNotPermittedException: fmt.Println(elb.ErrCodeOperationNotPermittedException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) } return } fmt.Println(result) } // To create an HTTP listener for a load balancer // This example creates a listener for your load balancer at port 80 using the HTTP // protocol. func ExampleELB_CreateLoadBalancerListeners_shared00() { svc := elb.New(session.New()) input := &elb.CreateLoadBalancerListenersInput{ Listeners: []*elb.Listener{ { InstancePort: aws.Int64(80), InstanceProtocol: aws.String("HTTP"), LoadBalancerPort: aws.Int64(80), Protocol: aws.String("HTTP"), }, }, LoadBalancerName: aws.String("my-load-balancer"), } result, err := svc.CreateLoadBalancerListeners(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case elb.ErrCodeAccessPointNotFoundException: fmt.Println(elb.ErrCodeAccessPointNotFoundException, aerr.Error()) case elb.ErrCodeDuplicateListenerException: fmt.Println(elb.ErrCodeDuplicateListenerException, aerr.Error()) case elb.ErrCodeCertificateNotFoundException: fmt.Println(elb.ErrCodeCertificateNotFoundException, aerr.Error()) case elb.ErrCodeInvalidConfigurationRequestException: fmt.Println(elb.ErrCodeInvalidConfigurationRequestException, aerr.Error()) case elb.ErrCodeUnsupportedProtocolException: fmt.Println(elb.ErrCodeUnsupportedProtocolException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) } return } fmt.Println(result) } // To create an HTTPS listener for a load balancer // This example creates a listener for your load balancer at port 443 using the HTTPS // protocol. func ExampleELB_CreateLoadBalancerListeners_shared01() { svc := elb.New(session.New()) input := &elb.CreateLoadBalancerListenersInput{ Listeners: []*elb.Listener{ { InstancePort: aws.Int64(80), InstanceProtocol: aws.String("HTTP"), LoadBalancerPort: aws.Int64(443), Protocol: aws.String("HTTPS"), SSLCertificateId: aws.String("arn:aws:iam::123456789012:server-certificate/my-server-cert"), }, }, LoadBalancerName: aws.String("my-load-balancer"), } result, err := svc.CreateLoadBalancerListeners(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case elb.ErrCodeAccessPointNotFoundException: fmt.Println(elb.ErrCodeAccessPointNotFoundException, aerr.Error()) case elb.ErrCodeDuplicateListenerException: fmt.Println(elb.ErrCodeDuplicateListenerException, aerr.Error()) case elb.ErrCodeCertificateNotFoundException: fmt.Println(elb.ErrCodeCertificateNotFoundException, aerr.Error()) case elb.ErrCodeInvalidConfigurationRequestException: fmt.Println(elb.ErrCodeInvalidConfigurationRequestException, aerr.Error()) case elb.ErrCodeUnsupportedProtocolException: fmt.Println(elb.ErrCodeUnsupportedProtocolException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) } return } fmt.Println(result) } // To create a policy that enables Proxy Protocol on a load balancer // This example creates a policy that enables Proxy Protocol on the specified load balancer. func ExampleELB_CreateLoadBalancerPolicy_shared00() { svc := elb.New(session.New()) input := &elb.CreateLoadBalancerPolicyInput{ LoadBalancerName: aws.String("my-load-balancer"), PolicyAttributes: []*elb.PolicyAttribute{ { AttributeName: aws.String("ProxyProtocol"), AttributeValue: aws.String("true"), }, }, PolicyName: aws.String("my-ProxyProtocol-policy"), PolicyTypeName: aws.String("ProxyProtocolPolicyType"), } result, err := svc.CreateLoadBalancerPolicy(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case elb.ErrCodeAccessPointNotFoundException: fmt.Println(elb.ErrCodeAccessPointNotFoundException, aerr.Error()) case elb.ErrCodePolicyTypeNotFoundException: fmt.Println(elb.ErrCodePolicyTypeNotFoundException, aerr.Error()) case elb.ErrCodeDuplicatePolicyNameException: fmt.Println(elb.ErrCodeDuplicatePolicyNameException, aerr.Error()) case elb.ErrCodeTooManyPoliciesException: fmt.Println(elb.ErrCodeTooManyPoliciesException, aerr.Error()) case elb.ErrCodeInvalidConfigurationRequestException: fmt.Println(elb.ErrCodeInvalidConfigurationRequestException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) } return } fmt.Println(result) } // To create a public key policy // This example creates a public key policy. func ExampleELB_CreateLoadBalancerPolicy_shared01() { svc := elb.New(session.New()) input := &elb.CreateLoadBalancerPolicyInput{ LoadBalancerName: aws.String("my-load-balancer"), PolicyAttributes: []*elb.PolicyAttribute{ { AttributeName: aws.String("PublicKey"), AttributeValue: aws.String("MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwAYUjnfyEyXr1pxjhFWBpMlggUcqoi3kl+dS74kj//c6x7ROtusUaeQCTgIUkayttRDWchuqo1pHC1u+n5xxXnBBe2ejbb2WRsKIQ5rXEeixsjFpFsojpSQKkzhVGI6mJVZBJDVKSHmswnwLBdofLhzvllpovBPTHe+o4haAWvDBALJU0pkSI1FecPHcs2hwxf14zHoXy1e2k36A64nXW43wtfx5qcVSIxtCEOjnYRg7RPvybaGfQ+v6Iaxb/+7J5kEvZhTFQId+bSiJImF1FSUT1W1xwzBZPUbcUkkXDj45vC2s3Z8E+Lk7a3uZhvsQHLZnrfuWjBWGWvZ/MhZYgEXAMPLE"), }, }, PolicyName: aws.String("my-PublicKey-policy"), PolicyTypeName: aws.String("PublicKeyPolicyType"), } result, err := svc.CreateLoadBalancerPolicy(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case elb.ErrCodeAccessPointNotFoundException: fmt.Println(elb.ErrCodeAccessPointNotFoundException, aerr.Error()) case elb.ErrCodePolicyTypeNotFoundException: fmt.Println(elb.ErrCodePolicyTypeNotFoundException, aerr.Error()) case elb.ErrCodeDuplicatePolicyNameException: fmt.Println(elb.ErrCodeDuplicatePolicyNameException, aerr.Error()) case elb.ErrCodeTooManyPoliciesException: fmt.Println(elb.ErrCodeTooManyPoliciesException, aerr.Error()) case elb.ErrCodeInvalidConfigurationRequestException: fmt.Println(elb.ErrCodeInvalidConfigurationRequestException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) } return } fmt.Println(result) } // To create a backend server authentication policy // This example creates a backend server authentication policy that enables authentication // on your backend instance using a public key policy. func ExampleELB_CreateLoadBalancerPolicy_shared02() { svc := elb.New(session.New()) input := &elb.CreateLoadBalancerPolicyInput{ LoadBalancerName: aws.String("my-load-balancer"), PolicyAttributes: []*elb.PolicyAttribute{ { AttributeName: aws.String("PublicKeyPolicyName"), AttributeValue: aws.String("my-PublicKey-policy"), }, }, PolicyName: aws.String("my-authentication-policy"), PolicyTypeName: aws.String("BackendServerAuthenticationPolicyType"), } result, err := svc.CreateLoadBalancerPolicy(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case elb.ErrCodeAccessPointNotFoundException: fmt.Println(elb.ErrCodeAccessPointNotFoundException, aerr.Error()) case elb.ErrCodePolicyTypeNotFoundException: fmt.Println(elb.ErrCodePolicyTypeNotFoundException, aerr.Error()) case elb.ErrCodeDuplicatePolicyNameException: fmt.Println(elb.ErrCodeDuplicatePolicyNameException, aerr.Error()) case elb.ErrCodeTooManyPoliciesException: fmt.Println(elb.ErrCodeTooManyPoliciesException, aerr.Error()) case elb.ErrCodeInvalidConfigurationRequestException: fmt.Println(elb.ErrCodeInvalidConfigurationRequestException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) } return } fmt.Println(result) } // To delete a load balancer // This example deletes the specified load balancer. func ExampleELB_DeleteLoadBalancer_shared00() { svc := elb.New(session.New()) input := &elb.DeleteLoadBalancerInput{ LoadBalancerName: aws.String("my-load-balancer"), } result, err := svc.DeleteLoadBalancer(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { default: fmt.Println(aerr.Error()) } } else { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) } return } fmt.Println(result) } // To delete a listener from your load balancer // This example deletes the listener for the specified port from the specified load // balancer. func ExampleELB_DeleteLoadBalancerListeners_shared00() { svc := elb.New(session.New()) input := &elb.DeleteLoadBalancerListenersInput{ LoadBalancerName: aws.String("my-load-balancer"), LoadBalancerPorts: []*int64{ aws.Int64(80), }, } result, err := svc.DeleteLoadBalancerListeners(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case elb.ErrCodeAccessPointNotFoundException: fmt.Println(elb.ErrCodeAccessPointNotFoundException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) } return } fmt.Println(result) } // To delete a policy from your load balancer // This example deletes the specified policy from the specified load balancer. The policy // must not be enabled on any listener. func ExampleELB_DeleteLoadBalancerPolicy_shared00() { svc := elb.New(session.New()) input := &elb.DeleteLoadBalancerPolicyInput{ LoadBalancerName: aws.String("my-load-balancer"), PolicyName: aws.String("my-duration-cookie-policy"), } result, err := svc.DeleteLoadBalancerPolicy(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case elb.ErrCodeAccessPointNotFoundException: fmt.Println(elb.ErrCodeAccessPointNotFoundException, aerr.Error()) case elb.ErrCodeInvalidConfigurationRequestException: fmt.Println(elb.ErrCodeInvalidConfigurationRequestException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) } return } fmt.Println(result) } // To deregister instances from a load balancer // This example deregisters the specified instance from the specified load balancer. func ExampleELB_DeregisterInstancesFromLoadBalancer_shared00() { svc := elb.New(session.New()) input := &elb.DeregisterInstancesFromLoadBalancerInput{ Instances: []*elb.Instance{ { InstanceId: aws.String("i-d6f6fae3"), }, }, LoadBalancerName: aws.String("my-load-balancer"), } result, err := svc.DeregisterInstancesFromLoadBalancer(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case elb.ErrCodeAccessPointNotFoundException: fmt.Println(elb.ErrCodeAccessPointNotFoundException, aerr.Error()) case elb.ErrCodeInvalidEndPointException: fmt.Println(elb.ErrCodeInvalidEndPointException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) } return } fmt.Println(result) } // To describe the health of the instances for a load balancer // This example describes the health of the instances for the specified load balancer. func ExampleELB_DescribeInstanceHealth_shared00() { svc := elb.New(session.New()) input := &elb.DescribeInstanceHealthInput{ LoadBalancerName: aws.String("my-load-balancer"), } result, err := svc.DescribeInstanceHealth(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case elb.ErrCodeAccessPointNotFoundException: fmt.Println(elb.ErrCodeAccessPointNotFoundException, aerr.Error()) case elb.ErrCodeInvalidEndPointException: fmt.Println(elb.ErrCodeInvalidEndPointException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) } return } fmt.Println(result) } // To describe the attributes of a load balancer // This example describes the attributes of the specified load balancer. func ExampleELB_DescribeLoadBalancerAttributes_shared00() { svc := elb.New(session.New()) input := &elb.DescribeLoadBalancerAttributesInput{ LoadBalancerName: aws.String("my-load-balancer"), } result, err := svc.DescribeLoadBalancerAttributes(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case elb.ErrCodeAccessPointNotFoundException: fmt.Println(elb.ErrCodeAccessPointNotFoundException, aerr.Error()) case elb.ErrCodeLoadBalancerAttributeNotFoundException: fmt.Println(elb.ErrCodeLoadBalancerAttributeNotFoundException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) } return } fmt.Println(result) } // To describe a policy associated with a load balancer // This example describes the specified policy associated with the specified load balancer. func ExampleELB_DescribeLoadBalancerPolicies_shared00() { svc := elb.New(session.New()) input := &elb.DescribeLoadBalancerPoliciesInput{ LoadBalancerName: aws.String("my-load-balancer"), PolicyNames: []*string{ aws.String("my-authentication-policy"), }, } result, err := svc.DescribeLoadBalancerPolicies(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case elb.ErrCodeAccessPointNotFoundException: fmt.Println(elb.ErrCodeAccessPointNotFoundException, aerr.Error()) case elb.ErrCodePolicyNotFoundException: fmt.Println(elb.ErrCodePolicyNotFoundException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) } return } fmt.Println(result) } // To describe a load balancer policy type defined by Elastic Load Balancing // This example describes the specified load balancer policy type. func ExampleELB_DescribeLoadBalancerPolicyTypes_shared00() { svc := elb.New(session.New()) input := &elb.DescribeLoadBalancerPolicyTypesInput{ PolicyTypeNames: []*string{ aws.String("ProxyProtocolPolicyType"), }, } result, err := svc.DescribeLoadBalancerPolicyTypes(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case elb.ErrCodePolicyTypeNotFoundException: fmt.Println(elb.ErrCodePolicyTypeNotFoundException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) } return } fmt.Println(result) } // To describe one of your load balancers // This example describes the specified load balancer. func ExampleELB_DescribeLoadBalancers_shared00() { svc := elb.New(session.New()) input := &elb.DescribeLoadBalancersInput{ LoadBalancerNames: []*string{ aws.String("my-load-balancer"), }, } result, err := svc.DescribeLoadBalancers(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case elb.ErrCodeAccessPointNotFoundException: fmt.Println(elb.ErrCodeAccessPointNotFoundException, aerr.Error()) case elb.ErrCodeDependencyThrottleException: fmt.Println(elb.ErrCodeDependencyThrottleException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) } return } fmt.Println(result) } // To describe the tags for a load balancer // This example describes the tags for the specified load balancer. func ExampleELB_DescribeTags_shared00() { svc := elb.New(session.New()) input := &elb.DescribeTagsInput{ LoadBalancerNames: []*string{ aws.String("my-load-balancer"), }, } result, err := svc.DescribeTags(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case elb.ErrCodeAccessPointNotFoundException: fmt.Println(elb.ErrCodeAccessPointNotFoundException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) } return } fmt.Println(result) } // To detach a load balancer from a subnet // This example detaches the specified load balancer from the specified subnet. func ExampleELB_DetachLoadBalancerFromSubnets_shared00() { svc := elb.New(session.New()) input := &elb.DetachLoadBalancerFromSubnetsInput{ LoadBalancerName: aws.String("my-load-balancer"), Subnets: []*string{ aws.String("subnet-0ecac448"), }, } result, err := svc.DetachLoadBalancerFromSubnets(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case elb.ErrCodeAccessPointNotFoundException: fmt.Println(elb.ErrCodeAccessPointNotFoundException, aerr.Error()) case elb.ErrCodeInvalidConfigurationRequestException: fmt.Println(elb.ErrCodeInvalidConfigurationRequestException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) } return } fmt.Println(result) } // To disable an Availability Zone for a load balancer // This example removes the specified Availability Zone from the set of Availability // Zones for the specified load balancer. func ExampleELB_DisableAvailabilityZonesForLoadBalancer_shared00() { svc := elb.New(session.New()) input := &elb.DisableAvailabilityZonesForLoadBalancerInput{ AvailabilityZones: []*string{ aws.String("us-west-2a"), }, LoadBalancerName: aws.String("my-load-balancer"), } result, err := svc.DisableAvailabilityZonesForLoadBalancer(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case elb.ErrCodeAccessPointNotFoundException: fmt.Println(elb.ErrCodeAccessPointNotFoundException, aerr.Error()) case elb.ErrCodeInvalidConfigurationRequestException: fmt.Println(elb.ErrCodeInvalidConfigurationRequestException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) } return } fmt.Println(result) } // To enable an Availability Zone for a load balancer // This example adds the specified Availability Zone to the specified load balancer. func ExampleELB_EnableAvailabilityZonesForLoadBalancer_shared00() { svc := elb.New(session.New()) input := &elb.EnableAvailabilityZonesForLoadBalancerInput{ AvailabilityZones: []*string{ aws.String("us-west-2b"), }, LoadBalancerName: aws.String("my-load-balancer"), } result, err := svc.EnableAvailabilityZonesForLoadBalancer(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case elb.ErrCodeAccessPointNotFoundException: fmt.Println(elb.ErrCodeAccessPointNotFoundException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) } return } fmt.Println(result) } // To enable cross-zone load balancing // This example enables cross-zone load balancing for the specified load balancer. func ExampleELB_ModifyLoadBalancerAttributes_shared00() { svc := elb.New(session.New()) input := &elb.ModifyLoadBalancerAttributesInput{ LoadBalancerAttributes: &elb.LoadBalancerAttributes{ CrossZoneLoadBalancing: &elb.CrossZoneLoadBalancing{ Enabled: aws.Bool(true), }, }, LoadBalancerName: aws.String("my-load-balancer"), } result, err := svc.ModifyLoadBalancerAttributes(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case elb.ErrCodeAccessPointNotFoundException: fmt.Println(elb.ErrCodeAccessPointNotFoundException, aerr.Error()) case elb.ErrCodeLoadBalancerAttributeNotFoundException: fmt.Println(elb.ErrCodeLoadBalancerAttributeNotFoundException, aerr.Error()) case elb.ErrCodeInvalidConfigurationRequestException: fmt.Println(elb.ErrCodeInvalidConfigurationRequestException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) } return } fmt.Println(result) } // To enable connection draining // This example enables connection draining for the specified load balancer. func ExampleELB_ModifyLoadBalancerAttributes_shared01() { svc := elb.New(session.New()) input := &elb.ModifyLoadBalancerAttributesInput{ LoadBalancerAttributes: &elb.LoadBalancerAttributes{ ConnectionDraining: &elb.ConnectionDraining{ Enabled: aws.Bool(true), Timeout: aws.Int64(300), }, }, LoadBalancerName: aws.String("my-load-balancer"), } result, err := svc.ModifyLoadBalancerAttributes(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case elb.ErrCodeAccessPointNotFoundException: fmt.Println(elb.ErrCodeAccessPointNotFoundException, aerr.Error()) case elb.ErrCodeLoadBalancerAttributeNotFoundException: fmt.Println(elb.ErrCodeLoadBalancerAttributeNotFoundException, aerr.Error()) case elb.ErrCodeInvalidConfigurationRequestException: fmt.Println(elb.ErrCodeInvalidConfigurationRequestException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) } return } fmt.Println(result) } // To register instances with a load balancer // This example registers the specified instance with the specified load balancer. func ExampleELB_RegisterInstancesWithLoadBalancer_shared00() { svc := elb.New(session.New()) input := &elb.RegisterInstancesWithLoadBalancerInput{ Instances: []*elb.Instance{ { InstanceId: aws.String("i-d6f6fae3"), }, }, LoadBalancerName: aws.String("my-load-balancer"), } result, err := svc.RegisterInstancesWithLoadBalancer(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case elb.ErrCodeAccessPointNotFoundException: fmt.Println(elb.ErrCodeAccessPointNotFoundException, aerr.Error()) case elb.ErrCodeInvalidEndPointException: fmt.Println(elb.ErrCodeInvalidEndPointException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) } return } fmt.Println(result) } // To remove tags from a load balancer // This example removes the specified tag from the specified load balancer. func ExampleELB_RemoveTags_shared00() { svc := elb.New(session.New()) input := &elb.RemoveTagsInput{ LoadBalancerNames: []*string{ aws.String("my-load-balancer"), }, Tags: []*elb.TagKeyOnly{ { Key: aws.String("project"), }, }, } result, err := svc.RemoveTags(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case elb.ErrCodeAccessPointNotFoundException: fmt.Println(elb.ErrCodeAccessPointNotFoundException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) } return } fmt.Println(result) } // To update the SSL certificate for an HTTPS listener // This example replaces the existing SSL certificate for the specified HTTPS listener. func ExampleELB_SetLoadBalancerListenerSSLCertificate_shared00() { svc := elb.New(session.New()) input := &elb.SetLoadBalancerListenerSSLCertificateInput{ LoadBalancerName: aws.String("my-load-balancer"), LoadBalancerPort: aws.Int64(443), SSLCertificateId: aws.String("arn:aws:iam::123456789012:server-certificate/new-server-cert"), } result, err := svc.SetLoadBalancerListenerSSLCertificate(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case elb.ErrCodeCertificateNotFoundException: fmt.Println(elb.ErrCodeCertificateNotFoundException, aerr.Error()) case elb.ErrCodeAccessPointNotFoundException: fmt.Println(elb.ErrCodeAccessPointNotFoundException, aerr.Error()) case elb.ErrCodeListenerNotFoundException: fmt.Println(elb.ErrCodeListenerNotFoundException, aerr.Error()) case elb.ErrCodeInvalidConfigurationRequestException: fmt.Println(elb.ErrCodeInvalidConfigurationRequestException, aerr.Error()) case elb.ErrCodeUnsupportedProtocolException: fmt.Println(elb.ErrCodeUnsupportedProtocolException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) } return } fmt.Println(result) } // To replace the policies associated with a port for a backend instance // This example replaces the policies that are currently associated with the specified // port. func ExampleELB_SetLoadBalancerPoliciesForBackendServer_shared00() { svc := elb.New(session.New()) input := &elb.SetLoadBalancerPoliciesForBackendServerInput{ InstancePort: aws.Int64(80), LoadBalancerName: aws.String("my-load-balancer"), PolicyNames: []*string{ aws.String("my-ProxyProtocol-policy"), }, } result, err := svc.SetLoadBalancerPoliciesForBackendServer(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case elb.ErrCodeAccessPointNotFoundException: fmt.Println(elb.ErrCodeAccessPointNotFoundException, aerr.Error()) case elb.ErrCodePolicyNotFoundException: fmt.Println(elb.ErrCodePolicyNotFoundException, aerr.Error()) case elb.ErrCodeInvalidConfigurationRequestException: fmt.Println(elb.ErrCodeInvalidConfigurationRequestException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) } return } fmt.Println(result) } // To replace the policies associated with a listener // This example replaces the policies that are currently associated with the specified // listener. func ExampleELB_SetLoadBalancerPoliciesOfListener_shared00() { svc := elb.New(session.New()) input := &elb.SetLoadBalancerPoliciesOfListenerInput{ LoadBalancerName: aws.String("my-load-balancer"), LoadBalancerPort: aws.Int64(80), PolicyNames: []*string{ aws.String("my-SSLNegotiation-policy"), }, } result, err := svc.SetLoadBalancerPoliciesOfListener(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case elb.ErrCodeAccessPointNotFoundException: fmt.Println(elb.ErrCodeAccessPointNotFoundException, aerr.Error()) case elb.ErrCodePolicyNotFoundException: fmt.Println(elb.ErrCodePolicyNotFoundException, aerr.Error()) case elb.ErrCodeListenerNotFoundException: fmt.Println(elb.ErrCodeListenerNotFoundException, aerr.Error()) case elb.ErrCodeInvalidConfigurationRequestException: fmt.Println(elb.ErrCodeInvalidConfigurationRequestException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) } return } fmt.Println(result) }