func (user IAMUser) HasAccessKeys(svc *iam.Client) bool {
	input := &iam.ListAccessKeysInput{
		UserName: aws.String(user.Name),
	}

	result, err := svc.ListAccessKeys(context.TODO(), input)
	if err != nil {
		panic(err)
	}
	return len(result.AccessKeyMetadata) > 0
}
// HasAccessKeys checks if a user has access keys
HasAccessKeys checks if a user has access keys
// HasAccessKeys checks if a user has access keys
func (user IAMUser) HasAccessKeys(svc *iam.Client) bool {
	input := &iam.ListAccessKeysInput{
		UserName: aws.String(user.Name),
	}
	result, err := svc.ListAccessKeys(context.TODO(), input)
	if err != nil {
		panic(err)
	}
	return len(result.AccessKeyMetadata) > 0
}
func ( user IAMUser ) HasAccessKeys ( svc * iam . Client ) bool { input := & iam . ListAccessKeysInput { UserName : aws . String ( user . Name ) , } result , err := svc . ListAccessKeys ( context . TODO ( ) , input ) if err != nil { panic ( err ) } return len ( result . AccessKeyMetadata ) > 0 }
HasAccessKeys checks if a user has access keys
HasAccessKeys checks if a user has access keys