func ExampleELBV2_SetSubnets_shared00() {
	svc := elbv2.New(session.New())
	input := &elbv2.SetSubnetsInput{
		LoadBalancerArn: aws.String("arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-load-balancer/50dc6c495c0c9188"),
		Subnets: []*string{
			aws.String("subnet-8360a9e7"),
			aws.String("subnet-b7d581c0"),
		},
	}

	result, err := svc.SetSubnets(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elbv2.ErrCodeLoadBalancerNotFoundException:
				fmt.Println(elbv2.ErrCodeLoadBalancerNotFoundException, aerr.Error())
			case elbv2.ErrCodeInvalidConfigurationRequestException:
				fmt.Println(elbv2.ErrCodeInvalidConfigurationRequestException, aerr.Error())
			case elbv2.ErrCodeSubnetNotFoundException:
				fmt.Println(elbv2.ErrCodeSubnetNotFoundException, aerr.Error())
			case elbv2.ErrCodeInvalidSubnetException:
				fmt.Println(elbv2.ErrCodeInvalidSubnetException, aerr.Error())
			case elbv2.ErrCodeAllocationIdNotFoundException:
				fmt.Println(elbv2.ErrCodeAllocationIdNotFoundException, aerr.Error())
			case elbv2.ErrCodeAvailabilityZoneNotSupportedException:
				fmt.Println(elbv2.ErrCodeAvailabilityZoneNotSupportedException, 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 Availability Zones for a load balancer
//
// This example enables the Availability Zones for the specified subnets for the specified
// load balancer.
To enable Availability Zones for a load balancer

This example enables the Availability Zones for the specified subnets for the specified
load balancer.
// To enable Availability Zones for a load balancer // // This example enables the Availability Zones for the specified subnets for the specified // load balancer .
func ExampleELBV2_SetSubnets_shared00() {
	svc := elbv2.New(session.New())
	input := &elbv2.SetSubnetsInput{
		LoadBalancerArn: aws.String("arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-load-balancer/50dc6c495c0c9188"),
		Subnets: []*string{
			aws.String("subnet-8360a9e7"),
			aws.String("subnet-b7d581c0"),
		},
	}
	result, err := svc.SetSubnets(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elbv2.ErrCodeLoadBalancerNotFoundException:
				fmt.Println(elbv2.ErrCodeLoadBalancerNotFoundException, aerr.Error())
			case elbv2.ErrCodeInvalidConfigurationRequestException:
				fmt.Println(elbv2.ErrCodeInvalidConfigurationRequestException, aerr.Error())
			case elbv2.ErrCodeSubnetNotFoundException:
				fmt.Println(elbv2.ErrCodeSubnetNotFoundException, aerr.Error())
			case elbv2.ErrCodeInvalidSubnetException:
				fmt.Println(elbv2.ErrCodeInvalidSubnetException, aerr.Error())
			case elbv2.ErrCodeAllocationIdNotFoundException:
				fmt.Println(elbv2.ErrCodeAllocationIdNotFoundException, aerr.Error())
			case elbv2.ErrCodeAvailabilityZoneNotSupportedException:
				fmt.Println(elbv2.ErrCodeAvailabilityZoneNotSupportedException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			fmt.Println(err.Error())
		}
		return
	}
	fmt.Println(result)
}
func ExampleELBV2_SetSubnets_shared00 ( ) { svc := elbv2 . New ( session . New ( ) ) input := & elbv2 . SetSubnetsInput { LoadBalancerArn : aws . String ( " " ) , Subnets : [ ] * string { aws . String ( " " ) , aws . String ( " " ) , } , } result , err := svc . SetSubnets ( input ) if err != nil { if aerr , ok := err . ( awserr . Error ) ; ok { switch aerr . Code ( ) { case elbv2 . ErrCodeLoadBalancerNotFoundException : fmt . Println ( elbv2 . ErrCodeLoadBalancerNotFoundException , aerr . Error ( ) ) case elbv2 . ErrCodeInvalidConfigurationRequestException : fmt . Println ( elbv2 . ErrCodeInvalidConfigurationRequestException , aerr . Error ( ) ) case elbv2 . ErrCodeSubnetNotFoundException : fmt . Println ( elbv2 . ErrCodeSubnetNotFoundException , aerr . Error ( ) ) case elbv2 . ErrCodeInvalidSubnetException : fmt . Println ( elbv2 . ErrCodeInvalidSubnetException , aerr . Error ( ) ) case elbv2 . ErrCodeAllocationIdNotFoundException : fmt . Println ( elbv2 . ErrCodeAllocationIdNotFoundException , aerr . Error ( ) ) case elbv2 . ErrCodeAvailabilityZoneNotSupportedException : fmt . Println ( elbv2 . ErrCodeAvailabilityZoneNotSupportedException , aerr . Error ( ) ) default : fmt . Println ( aerr . Error ( ) ) } } else { fmt . Println ( err . Error ( ) ) } return } fmt . Println ( result ) }
To enable Availability Zones for a load balancer
To enable Availability Zones for a load balancer
// Print the error, cast err to awserr.Error to get the Code and // Message from an error.