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 ecs_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/ecs" ) 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 create a new cluster // This example creates a cluster in your default region. func ExampleECS_CreateCluster_shared00() { svc := ecs.New(session.New()) input := &ecs.CreateClusterInput{ ClusterName: aws.String("my_cluster"), } result, err := svc.CreateCluster(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case ecs.ErrCodeServerException: fmt.Println(ecs.ErrCodeServerException, aerr.Error()) case ecs.ErrCodeClientException: fmt.Println(ecs.ErrCodeClientException, aerr.Error()) case ecs.ErrCodeInvalidParameterException: fmt.Println(ecs.ErrCodeInvalidParameterException, aerr.Error()) case ecs.ErrCodeNamespaceNotFoundException: fmt.Println(ecs.ErrCodeNamespaceNotFoundException, 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 new service // This example creates a service in your default region called “ecs-simple-service“. // The service uses the “hello_world“ task definition and it maintains 10 copies of // that task. func ExampleECS_CreateService_shared00() { svc := ecs.New(session.New()) input := &ecs.CreateServiceInput{ DesiredCount: aws.Int64(10), ServiceName: aws.String("ecs-simple-service"), TaskDefinition: aws.String("hello_world"), } result, err := svc.CreateService(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case ecs.ErrCodeServerException: fmt.Println(ecs.ErrCodeServerException, aerr.Error()) case ecs.ErrCodeClientException: fmt.Println(ecs.ErrCodeClientException, aerr.Error()) case ecs.ErrCodeInvalidParameterException: fmt.Println(ecs.ErrCodeInvalidParameterException, aerr.Error()) case ecs.ErrCodeClusterNotFoundException: fmt.Println(ecs.ErrCodeClusterNotFoundException, aerr.Error()) case ecs.ErrCodeUnsupportedFeatureException: fmt.Println(ecs.ErrCodeUnsupportedFeatureException, aerr.Error()) case ecs.ErrCodePlatformUnknownException: fmt.Println(ecs.ErrCodePlatformUnknownException, aerr.Error()) case ecs.ErrCodePlatformTaskDefinitionIncompatibilityException: fmt.Println(ecs.ErrCodePlatformTaskDefinitionIncompatibilityException, aerr.Error()) case ecs.ErrCodeAccessDeniedException: fmt.Println(ecs.ErrCodeAccessDeniedException, aerr.Error()) case ecs.ErrCodeNamespaceNotFoundException: fmt.Println(ecs.ErrCodeNamespaceNotFoundException, 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 new service behind a load balancer // This example creates a service in your default region called “ecs-simple-service-elb“. // The service uses the “ecs-demo“ task definition and it maintains 10 copies of that // task. You must reference an existing load balancer in the same region by its name. func ExampleECS_CreateService_shared01() { svc := ecs.New(session.New()) input := &ecs.CreateServiceInput{ DesiredCount: aws.Int64(10), LoadBalancers: []*ecs.LoadBalancer{ { ContainerName: aws.String("simple-app"), ContainerPort: aws.Int64(80), LoadBalancerName: aws.String("EC2Contai-EcsElast-15DCDAURT3ZO2"), }, }, Role: aws.String("ecsServiceRole"), ServiceName: aws.String("ecs-simple-service-elb"), TaskDefinition: aws.String("console-sample-app-static"), } result, err := svc.CreateService(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case ecs.ErrCodeServerException: fmt.Println(ecs.ErrCodeServerException, aerr.Error()) case ecs.ErrCodeClientException: fmt.Println(ecs.ErrCodeClientException, aerr.Error()) case ecs.ErrCodeInvalidParameterException: fmt.Println(ecs.ErrCodeInvalidParameterException, aerr.Error()) case ecs.ErrCodeClusterNotFoundException: fmt.Println(ecs.ErrCodeClusterNotFoundException, aerr.Error()) case ecs.ErrCodeUnsupportedFeatureException: fmt.Println(ecs.ErrCodeUnsupportedFeatureException, aerr.Error()) case ecs.ErrCodePlatformUnknownException: fmt.Println(ecs.ErrCodePlatformUnknownException, aerr.Error()) case ecs.ErrCodePlatformTaskDefinitionIncompatibilityException: fmt.Println(ecs.ErrCodePlatformTaskDefinitionIncompatibilityException, aerr.Error()) case ecs.ErrCodeAccessDeniedException: fmt.Println(ecs.ErrCodeAccessDeniedException, aerr.Error()) case ecs.ErrCodeNamespaceNotFoundException: fmt.Println(ecs.ErrCodeNamespaceNotFoundException, 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 your account setting // This example deletes the account setting for your user for the specified resource // type. func ExampleECS_DeleteAccountSetting_shared00() { svc := ecs.New(session.New()) input := &ecs.DeleteAccountSettingInput{ Name: aws.String("serviceLongArnFormat"), } result, err := svc.DeleteAccountSetting(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case ecs.ErrCodeServerException: fmt.Println(ecs.ErrCodeServerException, aerr.Error()) case ecs.ErrCodeClientException: fmt.Println(ecs.ErrCodeClientException, aerr.Error()) case ecs.ErrCodeInvalidParameterException: fmt.Println(ecs.ErrCodeInvalidParameterException, 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 the account settings for a specific IAM user or IAM role // This example deletes the account setting for a specific IAM user or IAM role for // the specified resource type. Only the root user can view or modify the account settings // for another user. func ExampleECS_DeleteAccountSetting_shared01() { svc := ecs.New(session.New()) input := &ecs.DeleteAccountSettingInput{ Name: aws.String("containerInstanceLongArnFormat"), PrincipalArn: aws.String("arn:aws:iam:::user/principalName"), } result, err := svc.DeleteAccountSetting(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case ecs.ErrCodeServerException: fmt.Println(ecs.ErrCodeServerException, aerr.Error()) case ecs.ErrCodeClientException: fmt.Println(ecs.ErrCodeClientException, aerr.Error()) case ecs.ErrCodeInvalidParameterException: fmt.Println(ecs.ErrCodeInvalidParameterException, 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 an empty cluster // This example deletes an empty cluster in your default region. func ExampleECS_DeleteCluster_shared00() { svc := ecs.New(session.New()) input := &ecs.DeleteClusterInput{ Cluster: aws.String("my_cluster"), } result, err := svc.DeleteCluster(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case ecs.ErrCodeServerException: fmt.Println(ecs.ErrCodeServerException, aerr.Error()) case ecs.ErrCodeClientException: fmt.Println(ecs.ErrCodeClientException, aerr.Error()) case ecs.ErrCodeInvalidParameterException: fmt.Println(ecs.ErrCodeInvalidParameterException, aerr.Error()) case ecs.ErrCodeClusterNotFoundException: fmt.Println(ecs.ErrCodeClusterNotFoundException, aerr.Error()) case ecs.ErrCodeClusterContainsContainerInstancesException: fmt.Println(ecs.ErrCodeClusterContainsContainerInstancesException, aerr.Error()) case ecs.ErrCodeClusterContainsServicesException: fmt.Println(ecs.ErrCodeClusterContainsServicesException, aerr.Error()) case ecs.ErrCodeClusterContainsTasksException: fmt.Println(ecs.ErrCodeClusterContainsTasksException, aerr.Error()) case ecs.ErrCodeUpdateInProgressException: fmt.Println(ecs.ErrCodeUpdateInProgressException, 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 service // This example deletes the my-http-service service. The service must have a desired // count and running count of 0 before you can delete it. func ExampleECS_DeleteService_shared00() { svc := ecs.New(session.New()) input := &ecs.DeleteServiceInput{ Service: aws.String("my-http-service"), } result, err := svc.DeleteService(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case ecs.ErrCodeServerException: fmt.Println(ecs.ErrCodeServerException, aerr.Error()) case ecs.ErrCodeClientException: fmt.Println(ecs.ErrCodeClientException, aerr.Error()) case ecs.ErrCodeInvalidParameterException: fmt.Println(ecs.ErrCodeInvalidParameterException, aerr.Error()) case ecs.ErrCodeClusterNotFoundException: fmt.Println(ecs.ErrCodeClusterNotFoundException, aerr.Error()) case ecs.ErrCodeServiceNotFoundException: fmt.Println(ecs.ErrCodeServiceNotFoundException, 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 a container instance from a cluster // This example deregisters a container instance from the specified cluster in your // default region. If there are still tasks running on the container instance, you must // either stop those tasks before deregistering, or use the force option. func ExampleECS_DeregisterContainerInstance_shared00() { svc := ecs.New(session.New()) input := &ecs.DeregisterContainerInstanceInput{ Cluster: aws.String("default"), ContainerInstance: aws.String("container_instance_UUID"), Force: aws.Bool(true), } result, err := svc.DeregisterContainerInstance(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case ecs.ErrCodeServerException: fmt.Println(ecs.ErrCodeServerException, aerr.Error()) case ecs.ErrCodeClientException: fmt.Println(ecs.ErrCodeClientException, aerr.Error()) case ecs.ErrCodeInvalidParameterException: fmt.Println(ecs.ErrCodeInvalidParameterException, aerr.Error()) case ecs.ErrCodeClusterNotFoundException: fmt.Println(ecs.ErrCodeClusterNotFoundException, 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 cluster // This example provides a description of the specified cluster in your default region. func ExampleECS_DescribeClusters_shared00() { svc := ecs.New(session.New()) input := &ecs.DescribeClustersInput{ Clusters: []*string{ aws.String("default"), }, } result, err := svc.DescribeClusters(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case ecs.ErrCodeServerException: fmt.Println(ecs.ErrCodeServerException, aerr.Error()) case ecs.ErrCodeClientException: fmt.Println(ecs.ErrCodeClientException, aerr.Error()) case ecs.ErrCodeInvalidParameterException: fmt.Println(ecs.ErrCodeInvalidParameterException, 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 container instance // This example provides a description of the specified container instance in your default // region, using the container instance UUID as an identifier. func ExampleECS_DescribeContainerInstances_shared00() { svc := ecs.New(session.New()) input := &ecs.DescribeContainerInstancesInput{ Cluster: aws.String("default"), ContainerInstances: []*string{ aws.String("f2756532-8f13-4d53-87c9-aed50dc94cd7"), }, } result, err := svc.DescribeContainerInstances(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case ecs.ErrCodeServerException: fmt.Println(ecs.ErrCodeServerException, aerr.Error()) case ecs.ErrCodeClientException: fmt.Println(ecs.ErrCodeClientException, aerr.Error()) case ecs.ErrCodeInvalidParameterException: fmt.Println(ecs.ErrCodeInvalidParameterException, aerr.Error()) case ecs.ErrCodeClusterNotFoundException: fmt.Println(ecs.ErrCodeClusterNotFoundException, 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 service // This example provides descriptive information about the service named “ecs-simple-service“. func ExampleECS_DescribeServices_shared00() { svc := ecs.New(session.New()) input := &ecs.DescribeServicesInput{ Services: []*string{ aws.String("ecs-simple-service"), }, } result, err := svc.DescribeServices(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case ecs.ErrCodeServerException: fmt.Println(ecs.ErrCodeServerException, aerr.Error()) case ecs.ErrCodeClientException: fmt.Println(ecs.ErrCodeClientException, aerr.Error()) case ecs.ErrCodeInvalidParameterException: fmt.Println(ecs.ErrCodeInvalidParameterException, aerr.Error()) case ecs.ErrCodeClusterNotFoundException: fmt.Println(ecs.ErrCodeClusterNotFoundException, 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 task definition // This example provides a description of the specified task definition. func ExampleECS_DescribeTaskDefinition_shared00() { svc := ecs.New(session.New()) input := &ecs.DescribeTaskDefinitionInput{ TaskDefinition: aws.String("hello_world:8"), } result, err := svc.DescribeTaskDefinition(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case ecs.ErrCodeServerException: fmt.Println(ecs.ErrCodeServerException, aerr.Error()) case ecs.ErrCodeClientException: fmt.Println(ecs.ErrCodeClientException, aerr.Error()) case ecs.ErrCodeInvalidParameterException: fmt.Println(ecs.ErrCodeInvalidParameterException, 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 task // This example provides a description of the specified task, using the task UUID as // an identifier. func ExampleECS_DescribeTasks_shared00() { svc := ecs.New(session.New()) input := &ecs.DescribeTasksInput{ Tasks: []*string{ aws.String("c5cba4eb-5dad-405e-96db-71ef8eefe6a8"), }, } result, err := svc.DescribeTasks(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case ecs.ErrCodeServerException: fmt.Println(ecs.ErrCodeServerException, aerr.Error()) case ecs.ErrCodeClientException: fmt.Println(ecs.ErrCodeClientException, aerr.Error()) case ecs.ErrCodeInvalidParameterException: fmt.Println(ecs.ErrCodeInvalidParameterException, aerr.Error()) case ecs.ErrCodeClusterNotFoundException: fmt.Println(ecs.ErrCodeClusterNotFoundException, 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 get the protection status of a task // In this example, we get the protection status for a single task. func ExampleECS_GetTaskProtection_shared00() { svc := ecs.New(session.New()) input := &ecs.GetTaskProtectionInput{ Cluster: aws.String("test-task-protection"), Tasks: []*string{ aws.String("b8b1cf532d0e46ba8d44a40d1de16772"), }, } result, err := svc.GetTaskProtection(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case ecs.ErrCodeAccessDeniedException: fmt.Println(ecs.ErrCodeAccessDeniedException, aerr.Error()) case ecs.ErrCodeClientException: fmt.Println(ecs.ErrCodeClientException, aerr.Error()) case ecs.ErrCodeClusterNotFoundException: fmt.Println(ecs.ErrCodeClusterNotFoundException, aerr.Error()) case ecs.ErrCodeInvalidParameterException: fmt.Println(ecs.ErrCodeInvalidParameterException, aerr.Error()) case ecs.ErrCodeResourceNotFoundException: fmt.Println(ecs.ErrCodeResourceNotFoundException, aerr.Error()) case ecs.ErrCodeServerException: fmt.Println(ecs.ErrCodeServerException, aerr.Error()) case ecs.ErrCodeUnsupportedFeatureException: fmt.Println(ecs.ErrCodeUnsupportedFeatureException, 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 view your effective account settings // This example displays the effective account settings for your account. func ExampleECS_ListAccountSettings_shared00() { svc := ecs.New(session.New()) input := &ecs.ListAccountSettingsInput{ EffectiveSettings: aws.Bool(true), } result, err := svc.ListAccountSettings(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case ecs.ErrCodeServerException: fmt.Println(ecs.ErrCodeServerException, aerr.Error()) case ecs.ErrCodeClientException: fmt.Println(ecs.ErrCodeClientException, aerr.Error()) case ecs.ErrCodeInvalidParameterException: fmt.Println(ecs.ErrCodeInvalidParameterException, 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 view the effective account settings for a specific IAM user or IAM role // This example displays the effective account settings for the specified user or role. func ExampleECS_ListAccountSettings_shared01() { svc := ecs.New(session.New()) input := &ecs.ListAccountSettingsInput{ EffectiveSettings: aws.Bool(true), PrincipalArn: aws.String("arn:aws:iam:::user/principalName"), } result, err := svc.ListAccountSettings(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case ecs.ErrCodeServerException: fmt.Println(ecs.ErrCodeServerException, aerr.Error()) case ecs.ErrCodeClientException: fmt.Println(ecs.ErrCodeClientException, aerr.Error()) case ecs.ErrCodeInvalidParameterException: fmt.Println(ecs.ErrCodeInvalidParameterException, 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 list your available clusters // This example lists all of your available clusters in your default region. func ExampleECS_ListClusters_shared00() { svc := ecs.New(session.New()) input := &ecs.ListClustersInput{} result, err := svc.ListClusters(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case ecs.ErrCodeServerException: fmt.Println(ecs.ErrCodeServerException, aerr.Error()) case ecs.ErrCodeClientException: fmt.Println(ecs.ErrCodeClientException, aerr.Error()) case ecs.ErrCodeInvalidParameterException: fmt.Println(ecs.ErrCodeInvalidParameterException, 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 list your available container instances in a cluster // This example lists all of your available container instances in the specified cluster // in your default region. func ExampleECS_ListContainerInstances_shared00() { svc := ecs.New(session.New()) input := &ecs.ListContainerInstancesInput{ Cluster: aws.String("default"), } result, err := svc.ListContainerInstances(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case ecs.ErrCodeServerException: fmt.Println(ecs.ErrCodeServerException, aerr.Error()) case ecs.ErrCodeClientException: fmt.Println(ecs.ErrCodeClientException, aerr.Error()) case ecs.ErrCodeInvalidParameterException: fmt.Println(ecs.ErrCodeInvalidParameterException, aerr.Error()) case ecs.ErrCodeClusterNotFoundException: fmt.Println(ecs.ErrCodeClusterNotFoundException, 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 list the services in a cluster // This example lists the services running in the default cluster for an account. func ExampleECS_ListServices_shared00() { svc := ecs.New(session.New()) input := &ecs.ListServicesInput{} result, err := svc.ListServices(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case ecs.ErrCodeServerException: fmt.Println(ecs.ErrCodeServerException, aerr.Error()) case ecs.ErrCodeClientException: fmt.Println(ecs.ErrCodeClientException, aerr.Error()) case ecs.ErrCodeInvalidParameterException: fmt.Println(ecs.ErrCodeInvalidParameterException, aerr.Error()) case ecs.ErrCodeClusterNotFoundException: fmt.Println(ecs.ErrCodeClusterNotFoundException, 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 list the tags for a cluster. // This example lists the tags for the 'dev' cluster. func ExampleECS_ListTagsForResource_shared00() { svc := ecs.New(session.New()) input := &ecs.ListTagsForResourceInput{ ResourceArn: aws.String("arn:aws:ecs:region:aws_account_id:cluster/dev"), } result, err := svc.ListTagsForResource(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case ecs.ErrCodeServerException: fmt.Println(ecs.ErrCodeServerException, aerr.Error()) case ecs.ErrCodeClientException: fmt.Println(ecs.ErrCodeClientException, aerr.Error()) case ecs.ErrCodeClusterNotFoundException: fmt.Println(ecs.ErrCodeClusterNotFoundException, aerr.Error()) case ecs.ErrCodeInvalidParameterException: fmt.Println(ecs.ErrCodeInvalidParameterException, 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 list your registered task definition families // This example lists all of your registered task definition families. func ExampleECS_ListTaskDefinitionFamilies_shared00() { svc := ecs.New(session.New()) input := &ecs.ListTaskDefinitionFamiliesInput{} result, err := svc.ListTaskDefinitionFamilies(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case ecs.ErrCodeServerException: fmt.Println(ecs.ErrCodeServerException, aerr.Error()) case ecs.ErrCodeClientException: fmt.Println(ecs.ErrCodeClientException, aerr.Error()) case ecs.ErrCodeInvalidParameterException: fmt.Println(ecs.ErrCodeInvalidParameterException, 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 filter your registered task definition families // This example lists the task definition revisions that start with "hpcc". func ExampleECS_ListTaskDefinitionFamilies_shared01() { svc := ecs.New(session.New()) input := &ecs.ListTaskDefinitionFamiliesInput{ FamilyPrefix: aws.String("hpcc"), } result, err := svc.ListTaskDefinitionFamilies(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case ecs.ErrCodeServerException: fmt.Println(ecs.ErrCodeServerException, aerr.Error()) case ecs.ErrCodeClientException: fmt.Println(ecs.ErrCodeClientException, aerr.Error()) case ecs.ErrCodeInvalidParameterException: fmt.Println(ecs.ErrCodeInvalidParameterException, 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 list your registered task definitions // This example lists all of your registered task definitions. func ExampleECS_ListTaskDefinitions_shared00() { svc := ecs.New(session.New()) input := &ecs.ListTaskDefinitionsInput{} result, err := svc.ListTaskDefinitions(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case ecs.ErrCodeServerException: fmt.Println(ecs.ErrCodeServerException, aerr.Error()) case ecs.ErrCodeClientException: fmt.Println(ecs.ErrCodeClientException, aerr.Error()) case ecs.ErrCodeInvalidParameterException: fmt.Println(ecs.ErrCodeInvalidParameterException, 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 list the registered task definitions in a family // This example lists the task definition revisions of a specified family. func ExampleECS_ListTaskDefinitions_shared01() { svc := ecs.New(session.New()) input := &ecs.ListTaskDefinitionsInput{ FamilyPrefix: aws.String("wordpress"), } result, err := svc.ListTaskDefinitions(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case ecs.ErrCodeServerException: fmt.Println(ecs.ErrCodeServerException, aerr.Error()) case ecs.ErrCodeClientException: fmt.Println(ecs.ErrCodeClientException, aerr.Error()) case ecs.ErrCodeInvalidParameterException: fmt.Println(ecs.ErrCodeInvalidParameterException, 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 list the tasks in a cluster // This example lists all of the tasks in a cluster. func ExampleECS_ListTasks_shared00() { svc := ecs.New(session.New()) input := &ecs.ListTasksInput{ Cluster: aws.String("default"), } result, err := svc.ListTasks(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case ecs.ErrCodeServerException: fmt.Println(ecs.ErrCodeServerException, aerr.Error()) case ecs.ErrCodeClientException: fmt.Println(ecs.ErrCodeClientException, aerr.Error()) case ecs.ErrCodeInvalidParameterException: fmt.Println(ecs.ErrCodeInvalidParameterException, aerr.Error()) case ecs.ErrCodeClusterNotFoundException: fmt.Println(ecs.ErrCodeClusterNotFoundException, aerr.Error()) case ecs.ErrCodeServiceNotFoundException: fmt.Println(ecs.ErrCodeServiceNotFoundException, 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 list the tasks on a particular container instance // This example lists the tasks of a specified container instance. Specifying a “containerInstance“ // value limits the results to tasks that belong to that container instance. func ExampleECS_ListTasks_shared01() { svc := ecs.New(session.New()) input := &ecs.ListTasksInput{ Cluster: aws.String("default"), ContainerInstance: aws.String("f6bbb147-5370-4ace-8c73-c7181ded911f"), } result, err := svc.ListTasks(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case ecs.ErrCodeServerException: fmt.Println(ecs.ErrCodeServerException, aerr.Error()) case ecs.ErrCodeClientException: fmt.Println(ecs.ErrCodeClientException, aerr.Error()) case ecs.ErrCodeInvalidParameterException: fmt.Println(ecs.ErrCodeInvalidParameterException, aerr.Error()) case ecs.ErrCodeClusterNotFoundException: fmt.Println(ecs.ErrCodeClusterNotFoundException, aerr.Error()) case ecs.ErrCodeServiceNotFoundException: fmt.Println(ecs.ErrCodeServiceNotFoundException, 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 modify your account settings // This example modifies your account settings to opt in to the new ARN and resource // ID format for Amazon ECS services. If you’re using this command as the root user, // then changes apply to the entire AWS account, unless an IAM user or role explicitly // overrides these settings for themselves. func ExampleECS_PutAccountSetting_shared00() { svc := ecs.New(session.New()) input := &ecs.PutAccountSettingInput{ Name: aws.String("serviceLongArnFormat"), Value: aws.String("enabled"), } result, err := svc.PutAccountSetting(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case ecs.ErrCodeServerException: fmt.Println(ecs.ErrCodeServerException, aerr.Error()) case ecs.ErrCodeClientException: fmt.Println(ecs.ErrCodeClientException, aerr.Error()) case ecs.ErrCodeInvalidParameterException: fmt.Println(ecs.ErrCodeInvalidParameterException, 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 modify the account settings for a specific IAM user or IAM role // This example modifies the account setting for a specific IAM user or IAM role to // opt in to the new ARN and resource ID format for Amazon ECS container instances. // If you’re using this command as the root user, then changes apply to the entire // AWS account, unless an IAM user or role explicitly overrides these settings for themselves. func ExampleECS_PutAccountSetting_shared01() { svc := ecs.New(session.New()) input := &ecs.PutAccountSettingInput{ Name: aws.String("containerInstanceLongArnFormat"), PrincipalArn: aws.String("arn:aws:iam:::user/principalName"), Value: aws.String("enabled"), } result, err := svc.PutAccountSetting(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case ecs.ErrCodeServerException: fmt.Println(ecs.ErrCodeServerException, aerr.Error()) case ecs.ErrCodeClientException: fmt.Println(ecs.ErrCodeClientException, aerr.Error()) case ecs.ErrCodeInvalidParameterException: fmt.Println(ecs.ErrCodeInvalidParameterException, 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 modify the default account settings for all IAM users or roles on an account // This example modifies the default account setting for the specified resource for // all IAM users or roles on an account. These changes apply to the entire AWS account, // unless an IAM user or role explicitly overrides these settings for themselves. func ExampleECS_PutAccountSettingDefault_shared00() { svc := ecs.New(session.New()) input := &ecs.PutAccountSettingDefaultInput{ Name: aws.String("serviceLongArnFormat"), Value: aws.String("enabled"), } result, err := svc.PutAccountSettingDefault(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case ecs.ErrCodeServerException: fmt.Println(ecs.ErrCodeServerException, aerr.Error()) case ecs.ErrCodeClientException: fmt.Println(ecs.ErrCodeClientException, aerr.Error()) case ecs.ErrCodeInvalidParameterException: fmt.Println(ecs.ErrCodeInvalidParameterException, 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 a task definition // This example registers a task definition to the specified family. func ExampleECS_RegisterTaskDefinition_shared00() { svc := ecs.New(session.New()) input := &ecs.RegisterTaskDefinitionInput{ ContainerDefinitions: []*ecs.ContainerDefinition{ { Command: []*string{ aws.String("sleep"), aws.String("360"), }, Cpu: aws.Int64(10), Essential: aws.Bool(true), Image: aws.String("busybox"), Memory: aws.Int64(10), Name: aws.String("sleep"), }, }, Family: aws.String("sleep360"), TaskRoleArn: aws.String(""), } result, err := svc.RegisterTaskDefinition(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case ecs.ErrCodeServerException: fmt.Println(ecs.ErrCodeServerException, aerr.Error()) case ecs.ErrCodeClientException: fmt.Println(ecs.ErrCodeClientException, aerr.Error()) case ecs.ErrCodeInvalidParameterException: fmt.Println(ecs.ErrCodeInvalidParameterException, 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 run a task on your default cluster // This example runs the specified task definition on your default cluster. func ExampleECS_RunTask_shared00() { svc := ecs.New(session.New()) input := &ecs.RunTaskInput{ Cluster: aws.String("default"), TaskDefinition: aws.String("sleep360:1"), } result, err := svc.RunTask(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case ecs.ErrCodeServerException: fmt.Println(ecs.ErrCodeServerException, aerr.Error()) case ecs.ErrCodeClientException: fmt.Println(ecs.ErrCodeClientException, aerr.Error()) case ecs.ErrCodeInvalidParameterException: fmt.Println(ecs.ErrCodeInvalidParameterException, aerr.Error()) case ecs.ErrCodeClusterNotFoundException: fmt.Println(ecs.ErrCodeClusterNotFoundException, aerr.Error()) case ecs.ErrCodeUnsupportedFeatureException: fmt.Println(ecs.ErrCodeUnsupportedFeatureException, aerr.Error()) case ecs.ErrCodePlatformUnknownException: fmt.Println(ecs.ErrCodePlatformUnknownException, aerr.Error()) case ecs.ErrCodePlatformTaskDefinitionIncompatibilityException: fmt.Println(ecs.ErrCodePlatformTaskDefinitionIncompatibilityException, aerr.Error()) case ecs.ErrCodeAccessDeniedException: fmt.Println(ecs.ErrCodeAccessDeniedException, aerr.Error()) case ecs.ErrCodeBlockedException: fmt.Println(ecs.ErrCodeBlockedException, aerr.Error()) case ecs.ErrCodeConflictException: fmt.Println(ecs.ErrCodeConflictException, 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 tag a cluster. // This example tags the 'dev' cluster with key 'team' and value 'dev'. func ExampleECS_TagResource_shared00() { svc := ecs.New(session.New()) input := &ecs.TagResourceInput{ ResourceArn: aws.String("arn:aws:ecs:region:aws_account_id:cluster/dev"), Tags: []*ecs.Tag{ { Key: aws.String("team"), Value: aws.String("dev"), }, }, } result, err := svc.TagResource(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case ecs.ErrCodeServerException: fmt.Println(ecs.ErrCodeServerException, aerr.Error()) case ecs.ErrCodeClientException: fmt.Println(ecs.ErrCodeClientException, aerr.Error()) case ecs.ErrCodeClusterNotFoundException: fmt.Println(ecs.ErrCodeClusterNotFoundException, aerr.Error()) case ecs.ErrCodeResourceNotFoundException: fmt.Println(ecs.ErrCodeResourceNotFoundException, aerr.Error()) case ecs.ErrCodeInvalidParameterException: fmt.Println(ecs.ErrCodeInvalidParameterException, 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 untag a cluster. // This example deletes the 'team' tag from the 'dev' cluster. func ExampleECS_UntagResource_shared00() { svc := ecs.New(session.New()) input := &ecs.UntagResourceInput{ ResourceArn: aws.String("arn:aws:ecs:region:aws_account_id:cluster/dev"), TagKeys: []*string{ aws.String("team"), }, } result, err := svc.UntagResource(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case ecs.ErrCodeServerException: fmt.Println(ecs.ErrCodeServerException, aerr.Error()) case ecs.ErrCodeClientException: fmt.Println(ecs.ErrCodeClientException, aerr.Error()) case ecs.ErrCodeClusterNotFoundException: fmt.Println(ecs.ErrCodeClusterNotFoundException, aerr.Error()) case ecs.ErrCodeResourceNotFoundException: fmt.Println(ecs.ErrCodeResourceNotFoundException, aerr.Error()) case ecs.ErrCodeInvalidParameterException: fmt.Println(ecs.ErrCodeInvalidParameterException, 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 change the task definition used in a service // This example updates the my-http-service service to use the amazon-ecs-sample task // definition. func ExampleECS_UpdateService_shared00() { svc := ecs.New(session.New()) input := &ecs.UpdateServiceInput{ Service: aws.String("my-http-service"), TaskDefinition: aws.String("amazon-ecs-sample"), } result, err := svc.UpdateService(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case ecs.ErrCodeServerException: fmt.Println(ecs.ErrCodeServerException, aerr.Error()) case ecs.ErrCodeClientException: fmt.Println(ecs.ErrCodeClientException, aerr.Error()) case ecs.ErrCodeInvalidParameterException: fmt.Println(ecs.ErrCodeInvalidParameterException, aerr.Error()) case ecs.ErrCodeClusterNotFoundException: fmt.Println(ecs.ErrCodeClusterNotFoundException, aerr.Error()) case ecs.ErrCodeServiceNotFoundException: fmt.Println(ecs.ErrCodeServiceNotFoundException, aerr.Error()) case ecs.ErrCodeServiceNotActiveException: fmt.Println(ecs.ErrCodeServiceNotActiveException, aerr.Error()) case ecs.ErrCodePlatformUnknownException: fmt.Println(ecs.ErrCodePlatformUnknownException, aerr.Error()) case ecs.ErrCodePlatformTaskDefinitionIncompatibilityException: fmt.Println(ecs.ErrCodePlatformTaskDefinitionIncompatibilityException, aerr.Error()) case ecs.ErrCodeAccessDeniedException: fmt.Println(ecs.ErrCodeAccessDeniedException, aerr.Error()) case ecs.ErrCodeNamespaceNotFoundException: fmt.Println(ecs.ErrCodeNamespaceNotFoundException, aerr.Error()) case ecs.ErrCodeUnsupportedFeatureException: fmt.Println(ecs.ErrCodeUnsupportedFeatureException, 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 change the number of tasks in a service // This example updates the desired count of the my-http-service service to 10. func ExampleECS_UpdateService_shared01() { svc := ecs.New(session.New()) input := &ecs.UpdateServiceInput{ DesiredCount: aws.Int64(10), Service: aws.String("my-http-service"), } result, err := svc.UpdateService(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case ecs.ErrCodeServerException: fmt.Println(ecs.ErrCodeServerException, aerr.Error()) case ecs.ErrCodeClientException: fmt.Println(ecs.ErrCodeClientException, aerr.Error()) case ecs.ErrCodeInvalidParameterException: fmt.Println(ecs.ErrCodeInvalidParameterException, aerr.Error()) case ecs.ErrCodeClusterNotFoundException: fmt.Println(ecs.ErrCodeClusterNotFoundException, aerr.Error()) case ecs.ErrCodeServiceNotFoundException: fmt.Println(ecs.ErrCodeServiceNotFoundException, aerr.Error()) case ecs.ErrCodeServiceNotActiveException: fmt.Println(ecs.ErrCodeServiceNotActiveException, aerr.Error()) case ecs.ErrCodePlatformUnknownException: fmt.Println(ecs.ErrCodePlatformUnknownException, aerr.Error()) case ecs.ErrCodePlatformTaskDefinitionIncompatibilityException: fmt.Println(ecs.ErrCodePlatformTaskDefinitionIncompatibilityException, aerr.Error()) case ecs.ErrCodeAccessDeniedException: fmt.Println(ecs.ErrCodeAccessDeniedException, aerr.Error()) case ecs.ErrCodeNamespaceNotFoundException: fmt.Println(ecs.ErrCodeNamespaceNotFoundException, aerr.Error()) case ecs.ErrCodeUnsupportedFeatureException: fmt.Println(ecs.ErrCodeUnsupportedFeatureException, 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 set task scale-in protection for a task for 60 minutes // This example enables scale-in protection for a task for 60 minutes. func ExampleECS_UpdateTaskProtection_shared00() { svc := ecs.New(session.New()) input := &ecs.UpdateTaskProtectionInput{ Cluster: aws.String("test-task-protection"), ExpiresInMinutes: aws.Int64(60), ProtectionEnabled: aws.Bool(true), Tasks: []*string{ aws.String("b8b1cf532d0e46ba8d44a40d1de16772"), }, } result, err := svc.UpdateTaskProtection(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case ecs.ErrCodeAccessDeniedException: fmt.Println(ecs.ErrCodeAccessDeniedException, aerr.Error()) case ecs.ErrCodeClientException: fmt.Println(ecs.ErrCodeClientException, aerr.Error()) case ecs.ErrCodeClusterNotFoundException: fmt.Println(ecs.ErrCodeClusterNotFoundException, aerr.Error()) case ecs.ErrCodeInvalidParameterException: fmt.Println(ecs.ErrCodeInvalidParameterException, aerr.Error()) case ecs.ErrCodeResourceNotFoundException: fmt.Println(ecs.ErrCodeResourceNotFoundException, aerr.Error()) case ecs.ErrCodeServerException: fmt.Println(ecs.ErrCodeServerException, aerr.Error()) case ecs.ErrCodeUnsupportedFeatureException: fmt.Println(ecs.ErrCodeUnsupportedFeatureException, 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 set task scale-in protection for the default time period in minutes // This example enables task scale-in protection for a task, without specifying the // expiresInMinutes parameter, for the default protection period of 120 minutes. func ExampleECS_UpdateTaskProtection_shared01() { svc := ecs.New(session.New()) input := &ecs.UpdateTaskProtectionInput{ Cluster: aws.String("test-task-protection"), ProtectionEnabled: aws.Bool(true), Tasks: []*string{ aws.String("b8b1cf532d0e46ba8d44a40d1de16772"), }, } result, err := svc.UpdateTaskProtection(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case ecs.ErrCodeAccessDeniedException: fmt.Println(ecs.ErrCodeAccessDeniedException, aerr.Error()) case ecs.ErrCodeClientException: fmt.Println(ecs.ErrCodeClientException, aerr.Error()) case ecs.ErrCodeClusterNotFoundException: fmt.Println(ecs.ErrCodeClusterNotFoundException, aerr.Error()) case ecs.ErrCodeInvalidParameterException: fmt.Println(ecs.ErrCodeInvalidParameterException, aerr.Error()) case ecs.ErrCodeResourceNotFoundException: fmt.Println(ecs.ErrCodeResourceNotFoundException, aerr.Error()) case ecs.ErrCodeServerException: fmt.Println(ecs.ErrCodeServerException, aerr.Error()) case ecs.ErrCodeUnsupportedFeatureException: fmt.Println(ecs.ErrCodeUnsupportedFeatureException, 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 task scale-in protection // This example removes scale-in protection for a task. func ExampleECS_UpdateTaskProtection_shared02() { svc := ecs.New(session.New()) input := &ecs.UpdateTaskProtectionInput{ Cluster: aws.String("test-task-protection"), ProtectionEnabled: aws.Bool(false), Tasks: []*string{ aws.String("b8b1cf532d0e46ba8d44a40d1de16772"), }, } result, err := svc.UpdateTaskProtection(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case ecs.ErrCodeAccessDeniedException: fmt.Println(ecs.ErrCodeAccessDeniedException, aerr.Error()) case ecs.ErrCodeClientException: fmt.Println(ecs.ErrCodeClientException, aerr.Error()) case ecs.ErrCodeClusterNotFoundException: fmt.Println(ecs.ErrCodeClusterNotFoundException, aerr.Error()) case ecs.ErrCodeInvalidParameterException: fmt.Println(ecs.ErrCodeInvalidParameterException, aerr.Error()) case ecs.ErrCodeResourceNotFoundException: fmt.Println(ecs.ErrCodeResourceNotFoundException, aerr.Error()) case ecs.ErrCodeServerException: fmt.Println(ecs.ErrCodeServerException, aerr.Error()) case ecs.ErrCodeUnsupportedFeatureException: fmt.Println(ecs.ErrCodeUnsupportedFeatureException, 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) }