func ExampleELBV2_SetRulePriorities_shared00() {
	svc := elbv2.New(session.New())
	input := &elbv2.SetRulePrioritiesInput{
		RulePriorities: []*elbv2.RulePriorityPair{
			{
				Priority: aws.Int64(5),
				RuleArn:  aws.String("arn:aws:elasticloadbalancing:us-west-2:123456789012:listener-rule/app/my-load-balancer/50dc6c495c0c9188/f2f7dc8efc522ab2/1291d13826f405c3"),
			},
		},
	}

	result, err := svc.SetRulePriorities(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elbv2.ErrCodeRuleNotFoundException:
				fmt.Println(elbv2.ErrCodeRuleNotFoundException, aerr.Error())
			case elbv2.ErrCodePriorityInUseException:
				fmt.Println(elbv2.ErrCodePriorityInUseException, aerr.Error())
			case elbv2.ErrCodeOperationNotPermittedException:
				fmt.Println(elbv2.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 set the rule priority
//
// This example sets the priority of the specified rule.
To set the rule priority

This example sets the priority of the specified rule.
// To set the rule priority // // This example sets the priority of the specified rule .
func ExampleELBV2_SetRulePriorities_shared00() {
	svc := elbv2.New(session.New())
	input := &elbv2.SetRulePrioritiesInput{
		RulePriorities: []*elbv2.RulePriorityPair{
			{
				Priority: aws.Int64(5),
				RuleArn:  aws.String("arn:aws:elasticloadbalancing:us-west-2:123456789012:listener-rule/app/my-load-balancer/50dc6c495c0c9188/f2f7dc8efc522ab2/1291d13826f405c3"),
			},
		},
	}
	result, err := svc.SetRulePriorities(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elbv2.ErrCodeRuleNotFoundException:
				fmt.Println(elbv2.ErrCodeRuleNotFoundException, aerr.Error())
			case elbv2.ErrCodePriorityInUseException:
				fmt.Println(elbv2.ErrCodePriorityInUseException, aerr.Error())
			case elbv2.ErrCodeOperationNotPermittedException:
				fmt.Println(elbv2.ErrCodeOperationNotPermittedException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			fmt.Println(err.Error())
		}
		return
	}
	fmt.Println(result)
}
func ExampleELBV2_SetRulePriorities_shared00 ( ) { svc := elbv2 . New ( session . New ( ) ) input := & elbv2 . SetRulePrioritiesInput { RulePriorities : [ ] * elbv2 . RulePriorityPair { { Priority : aws . Int64 ( 5 ) , RuleArn : aws . String ( " " ) , } , } , } result , err := svc . SetRulePriorities ( input ) if err != nil { if aerr , ok := err . ( awserr . Error ) ; ok { switch aerr . Code ( ) { case elbv2 . ErrCodeRuleNotFoundException : fmt . Println ( elbv2 . ErrCodeRuleNotFoundException , aerr . Error ( ) ) case elbv2 . ErrCodePriorityInUseException : fmt . Println ( elbv2 . ErrCodePriorityInUseException , aerr . Error ( ) ) case elbv2 . ErrCodeOperationNotPermittedException : fmt . Println ( elbv2 . ErrCodeOperationNotPermittedException , aerr . Error ( ) ) default : fmt . Println ( aerr . Error ( ) ) } } else { fmt . Println ( err . Error ( ) ) } return } fmt . Println ( result ) }
To set the rule priority
To set the rule priority
// Print the error, cast err to awserr.Error to get the Code and // Message from an error.